Skip to content

Commit 72ee234

Browse files
authored
Update ibpc_tester.py (opencv#44)
* Update ibpc_tester.py Inverting scene queries passed to the estimator. * Update ibpc_tester.py Removed commented for-loop code * record and pass only unique object ids in the requesst to the estimator process
1 parent ceaa4d1 commit 72ee234

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ibpc_tester/ibpc_tester/ibpc_tester.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,8 @@ def main(argv=sys.argv):
227227
scene_gt = load_scene_gt(
228228
test_split["scene_gt_rgb_photoneo_tpath"].format(scene_id=scene_id)
229229
)
230-
for img_id, obj_gts in scene_gt.items():
230+
231+
for img_id, obj_gts in list(scene_gt.items())[::-1]:
231232
request = GetPoseEstimates.Request()
232233
request.cameras.append(
233234
BOPCamera(scene_dir, "cam1", img_id).to_camera_msg(node, debug_cam_1)
@@ -244,6 +245,9 @@ def main(argv=sys.argv):
244245
# todo(Yadunund): Load corresponding rgb, depth and polarized image for this img_id.
245246
for obj_gt in obj_gts:
246247
request.object_ids.append(int(obj_gt["obj_id"]))
248+
249+
request.object_ids = list(set(request.object_ids))
250+
247251
node.get_logger().info(
248252
f"Sending request for scene_id {scene_id} img_id {img_id} for objects {request.object_ids}"
249253
)

0 commit comments

Comments
 (0)