Skip to content

Commit f7a5d53

Browse files
authored
Include each class metrics in logs (open-mmlab#445)
* Include each class metrics in logs * format * fix the unitest * fix the custom int class_name * fix the custom int class_name
1 parent 1fc3e37 commit f7a5d53

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

mmseg/datasets/custom.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -374,6 +374,11 @@ def evaluate(self,
374374
for i in range(1, len(summary_table_data[0])):
375375
eval_results[summary_table_data[0]
376376
[i]] = summary_table_data[1][i] / 100.0
377+
for idx, sub_metric in enumerate(class_table_data[0][1:], 1):
378+
for item in class_table_data[1:]:
379+
eval_results[str(sub_metric) + '.' +
380+
str(item[0])] = item[idx] / 100.0
381+
377382
if mmcv.is_list_of(results, str):
378383
for file_name in results:
379384
os.remove(file_name)

0 commit comments

Comments
 (0)