Skip to content

Commit 98d4eff

Browse files
fathomsonZwwWayne
authored andcommitted
Add tuple support in formatting results (#8549)
1 parent 80a1c7e commit 98d4eff

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

tools/analysis_tools/analyze_results.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,14 @@ def evaluate_and_show(self,
167167
elif isinstance(results[0], list):
168168
good_samples, bad_samples = self.detection_evaluate(
169169
dataset, results, topk=topk)
170+
elif isinstance(results[0], tuple):
171+
results_ = [result[0] for result in results]
172+
good_samples, bad_samples = self.detection_evaluate(
173+
dataset, results_, topk=topk)
170174
else:
171175
raise 'The format of result is not supported yet. ' \
172176
'Current dict for panoptic segmentation and list ' \
173-
'for object detection are supported.'
177+
'or tuple for object detection are supported.'
174178

175179
good_dir = osp.abspath(osp.join(show_dir, 'good'))
176180
bad_dir = osp.abspath(osp.join(show_dir, 'bad'))

0 commit comments

Comments
 (0)