Spaces:
Running
on
Zero
Running
on
Zero
fix output of inference
Browse files
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 |
|