Include each class metrics in logs (#445)

* Include each class metrics in logs

* format

* fix the unitest

* fix the custom int class_name

* fix the custom int class_name
pull/450/head
sshuair 2021-03-30 00:53:54 +08:00 committed by GitHub
parent 1fc3e374e2
commit f7a5d53a4b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 5 additions and 0 deletions

View File

@ -374,6 +374,11 @@ class CustomDataset(Dataset):
for i in range(1, len(summary_table_data[0])): for i in range(1, len(summary_table_data[0])):
eval_results[summary_table_data[0] eval_results[summary_table_data[0]
[i]] = summary_table_data[1][i] / 100.0 [i]] = summary_table_data[1][i] / 100.0
for idx, sub_metric in enumerate(class_table_data[0][1:], 1):
for item in class_table_data[1:]:
eval_results[str(sub_metric) + '.' +
str(item[0])] = item[idx] / 100.0
if mmcv.is_list_of(results, str): if mmcv.is_list_of(results, str):
for file_name in results: for file_name in results:
os.remove(file_name) os.remove(file_name)