Spaces:
Sleeping
Sleeping
imabackstabber
commited on
Commit
·
f65bf7c
1
Parent(s):
dfa57c9
test postometro pipeline
Browse files- main/inference.py +5 -9
main/inference.py
CHANGED
@@ -99,11 +99,11 @@ class Inferer:
|
|
99 |
|
100 |
ok_bboxes.append(bbox)
|
101 |
|
102 |
-
# test mmdet pipeline
|
103 |
-
if bbox is not None:
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
|
108 |
# human model inference
|
109 |
img, img2bb_trans, bb2img_trans = generate_patch_image(original_img, bbox, 1.0, 0.0, False, self.cfg.input_img_shape)
|
@@ -135,10 +135,6 @@ class Inferer:
|
|
135 |
pred_cam[1] + cx_delta / (pred_cam[0] / (original_img_width / bbox[2])),
|
136 |
pred_cam[2] + cy_delta / (pred_cam[0] / (original_img_height / bbox[3]))],
|
137 |
mesh_as_vertices=mesh_as_vertices)
|
138 |
-
# vis_img = render_mesh(vis_img, pred_3d_vertices_fine, self.faces, [pred_cam[0] / (original_img_width / bbox[2]), pred_cam[0] / (original_img_height / bbox[3]), 0, 0], mesh_as_vertices=mesh_as_vertices)
|
139 |
-
|
140 |
-
# bbox_meta = {'bbox': bbox, 'img_hw': [original_img_height, original_img_width]}
|
141 |
-
# vis_img = self.renderer(pred_3d_vertices_fine, bbox_meta, vis_img, pred_cam)
|
142 |
vis_img = vis_img.astype('uint8')
|
143 |
return vis_img, len(ok_bboxes), ok_bboxes
|
144 |
|
|
|
99 |
|
100 |
ok_bboxes.append(bbox)
|
101 |
|
102 |
+
# [DEBUG] test mmdet pipeline
|
103 |
+
# if bbox is not None:
|
104 |
+
# top_left = (int(bbox[0]), int(bbox[1]))
|
105 |
+
# bottom_right = (int(bbox[0] + bbox[2]), int(bbox[1] + bbox[3]))
|
106 |
+
# cv2.rectangle(vis_img, top_left, bottom_right, (0, 0, 255), 2)
|
107 |
|
108 |
# human model inference
|
109 |
img, img2bb_trans, bb2img_trans = generate_patch_image(original_img, bbox, 1.0, 0.0, False, self.cfg.input_img_shape)
|
|
|
135 |
pred_cam[1] + cx_delta / (pred_cam[0] / (original_img_width / bbox[2])),
|
136 |
pred_cam[2] + cy_delta / (pred_cam[0] / (original_img_height / bbox[3]))],
|
137 |
mesh_as_vertices=mesh_as_vertices)
|
|
|
|
|
|
|
|
|
138 |
vis_img = vis_img.astype('uint8')
|
139 |
return vis_img, len(ok_bboxes), ok_bboxes
|
140 |
|