"examples/pytorch/git@developer.sourcefind.cn:OpenDAS/dgl.git" did not exist on "6e8f7605187c2699a18e815c646a4f21e456defa"
Commit 075a0fc0 authored by wangtai's avatar wangtai Committed by zhangwenwei
Browse files

Fix bugs in lyft eval and rename configs

parent adfffc71
_base_ = './hv_pointpillars_regnet-400mf_fpn_sbn-all_1x16_2x_lyft-3d.py' _base_ = './hv_pointpillars_regnet-400mf_fpn_sbn-all_2x8_2x_lyft-3d.py'
# model settings # model settings
model = dict( model = dict(
pts_neck=dict( pts_neck=dict(
......
...@@ -106,9 +106,7 @@ def lyft_eval(lyft, data_root, res_path, eval_set, output_dir, logger=None): ...@@ -106,9 +106,7 @@ def lyft_eval(lyft, data_root, res_path, eval_set, output_dir, logger=None):
predictions = load_lyft_predictions(res_path) predictions = load_lyft_predictions(res_path)
class_names = get_class_names(gts) class_names = get_class_names(gts)
print_log('Evaluating...', logger=logger) print('Calculating mAP@0.5:0.95...')
class_table = AsciiTable([class_names], title='Class Names')
print_log(class_table.table, logger=logger)
iou_thresholds = [0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95] iou_thresholds = [0.5, 0.55, 0.6, 0.65, 0.7, 0.75, 0.8, 0.85, 0.9, 0.95]
metrics = {} metrics = {}
...@@ -131,7 +129,8 @@ def lyft_eval(lyft, data_root, res_path, eval_set, output_dir, logger=None): ...@@ -131,7 +129,8 @@ def lyft_eval(lyft, data_root, res_path, eval_set, output_dir, logger=None):
row = [class_names[i], round(mAPs_cate[i], 3)] row = [class_names[i], round(mAPs_cate[i], 3)]
APs_data.append(row) APs_data.append(row)
APs_data.append(['Overall', round(final_mAP, 3)]) APs_data.append(['Overall', round(final_mAP, 3)])
APs_table = AsciiTable(APs_data, title='mAPs@0.5:0.95') APs_table = AsciiTable(
APs_data, title='mAPs@0.5:0.95', inner_footing_row_border=True)
print_log(APs_table.table, logger=logger) print_log(APs_table.table, logger=logger)
res_path = osp.join(output_dir, 'lyft_metrics.json') res_path = osp.join(output_dir, 'lyft_metrics.json')
......
...@@ -299,7 +299,7 @@ class LyftDataset(Custom3DDataset): ...@@ -299,7 +299,7 @@ class LyftDataset(Custom3DDataset):
metric_prefix = f'{result_name}_Lyft' metric_prefix = f'{result_name}_Lyft'
for i, name in enumerate(metrics['class_names']): for i, name in enumerate(metrics['class_names']):
AP = float("f{round(metrics['mAPs_cate'][i], 3)}") AP = float(metrics['mAPs_cate'][i])
detail[f'{metric_prefix}/{name}_AP'] = AP detail[f'{metric_prefix}/{name}_AP'] = AP
detail[f'{metric_prefix}/mAP'] = metrics['Final mAP'] detail[f'{metric_prefix}/mAP'] = metrics['Final mAP']
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment