Spaces:
Running
on
T4
Running
on
T4
add focal length as output
Browse files
app.py
CHANGED
@@ -138,7 +138,7 @@ def inference(img, model_type):
|
|
138 |
pred['pred_rel_cx'].cpu().item(),
|
139 |
pred['pred_rel_cy'].cpu().item(),
|
140 |
]
|
141 |
-
param = f"roll {pred['pred_roll'].cpu().item() :.2f}\npitch {pred['pred_pitch'].cpu().item() :.2f}\
|
142 |
param += f"principal point {pred['pred_rel_cx'].cpu().item() :.2f} {pred['pred_rel_cy'].cpu().item() :.2f}"
|
143 |
pred_vis = draw_from_r_p_f_cx_cy(
|
144 |
img[:,:,::-1],
|
|
|
138 |
pred['pred_rel_cx'].cpu().item(),
|
139 |
pred['pred_rel_cy'].cpu().item(),
|
140 |
]
|
141 |
+
param = f"roll {pred['pred_roll'].cpu().item() :.2f}\npitch {pred['pred_pitch'].cpu().item() :.2f}\nvfov {pred['pred_general_vfov'].cpu().item() :.2f}\nfocal_length {pred['pred_rel_focal'].cpu().item()*img.shape[0] :.2f}\n"
|
142 |
param += f"principal point {pred['pred_rel_cx'].cpu().item() :.2f} {pred['pred_rel_cy'].cpu().item() :.2f}"
|
143 |
pred_vis = draw_from_r_p_f_cx_cy(
|
144 |
img[:,:,::-1],
|