Skip to content

Commit

Permalink
[Bugfix] analyze_results (#10876)
Browse files Browse the repository at this point in the history
  • Loading branch information
okotaku committed Sep 4, 2023
1 parent 3bccdaf commit a9c4c01
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions tools/analysis_tools/analyze_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,12 @@ def _save_image_gts_results(self,

if task == 'det':
gt_instances = InstanceData()
gt_instances.bboxes = results[index]['gt_instances']['bboxes']
gt_instances.labels = results[index]['gt_instances']['labels']
gt_instances.bboxes = [
d['bbox'] for d in data_info['gt_instances']
]
gt_instances.labels = [
d['bbox_label'] for d in data_info['gt_instances']
]

pred_instances = InstanceData()
pred_instances.bboxes = results[index]['pred_instances'][
Expand All @@ -141,7 +145,9 @@ def _save_image_gts_results(self,

elif task == 'seg':
gt_panoptic_seg = PixelData()
gt_panoptic_seg.sem_seg = results[index]['gt_seg_map']
gt_panoptic_seg.sem_seg = [
d['gt_seg_map'] for d in data_info['gt_instances']
]

pred_panoptic_seg = PixelData()
pred_panoptic_seg.sem_seg = results[index][
Expand Down

0 comments on commit a9c4c01

Please sign in to comment.