Utilities

packnet_sfm.models.model_utils.merge_outputs(*outputs)[source]

Merges model outputs for logging

Parameters

outputs (tuple of dict) – Outputs to be merged

Returns

output – Dictionary with a “metrics” key containing a dictionary with various metrics and all other keys that are not “loss” (it is handled differently).

Return type

dict

packnet_sfm.models.model_utils.stack_batch(batch)[source]

Stack multi-camera batches (B,N,C,H,W becomes BN,C,H,W)

Parameters

batch (dict) – Batch

Returns

batch – Stacked batch

Return type

dict