lch01 commited on
Commit
2e95ac7
·
1 Parent(s): 36d3877

fix output of inference

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -119,7 +119,7 @@ def run_model(target_dir, model) -> dict:
119
 
120
  # Convert pose encoding to extrinsic and intrinsic matrices
121
  print("Converting pose encoding to extrinsic and intrinsic matrices...")
122
- extrinsic, intrinsic = pose_encoding_to_extri_intri(predictions["pose_enc"], images.shape[-2:])
123
  predictions["extrinsic"] = extrinsic
124
  predictions["intrinsic"] = intrinsic
125
 
 
119
 
120
  # Convert pose encoding to extrinsic and intrinsic matrices
121
  print("Converting pose encoding to extrinsic and intrinsic matrices...")
122
+ extrinsic, intrinsic = pose_encoding_to_extri_intri(predictions["pose_enc"].unsqueeze(0) if predictions["pose_enc"].ndim == 2 else predictions["pose_enc"], images.shape[-2:])
123
  predictions["extrinsic"] = extrinsic
124
  predictions["intrinsic"] = intrinsic
125