Yzichen / FlashOCC

Apache License 2.0
279 stars 29 forks source link

metric计算 #57

Open yanyangchun opened 2 months ago

yanyangchun commented 2 months ago

https://github.com/Yzichen/FlashOCC/blob/d64804d7bf4178b1a79284f50f53c1bbf79dd1aa/projects/mmdet3d_plugin/core/evaluation/occ_metrics.py#L94 作者您好, 请教下,repo中的metric计算,在计统计直方图之前,并没有将free类进行过滤,而是进行了完整的18类的计算,我理解这里此处代码是不是应该改为k = (gt >= 0) & (gt < (n_cl - 1))呢? 我进行了相应的测试,各类的iou以及miou均会在数值上提升。

yanyangchun commented 2 months ago

比如:projects/configs/flashocc/flashocc-r50-4d-stereo.py 使用提供的ckpt,进行推理评测 修改前是 ===> per class IoU of 6019 samples: ===> others - IoU = 9.37 ===> barrier - IoU = 46.72 ===> bicycle - IoU = 19.43 ===> bus - IoU = 41.69 ===> car - IoU = 51.07 ===> construction_vehicle - IoU = 24.99 ===> motorcycle - IoU = 21.24 ===> pedestrian - IoU = 23.6 ===> traffic_cone - IoU = 24.22 ===> trailer - IoU = 31.22 ===> truck - IoU = 38.18 ===> driveable_surface - IoU = 81.12 ===> other_flat - IoU = 40.13 ===> sidewalk - IoU = 51.93 ===> terrain - IoU = 55.31 ===> manmade - IoU = 47.01 ===> vegetation - IoU = 39.89 ===> mIoU of 6019 samples: 38.07 修改后 ===> per class IoU of 6019 samples: ===> others - IoU = 9.75 ===> barrier - IoU = 52.16 ===> bicycle - IoU = 20.9 ===> bus - IoU = 54.65 ===> car - IoU = 60.63 ===> construction_vehicle - IoU = 29.99 ===> motorcycle - IoU = 23.82 ===> pedestrian - IoU = 27.66 ===> traffic_cone - IoU = 26.47 ===> trailer - IoU = 37.74 ===> truck - IoU = 47.09 ===> driveable_surface - IoU = 83.81 ===> other_flat - IoU = 41.81 ===> sidewalk - IoU = 53.96 ===> terrain - IoU = 59.77 ===> manmade - IoU = 61.39 ===> vegetation - IoU = 55.62 ===> mIoU of 6019 samples: 43.96

yanyangchun commented 2 months ago

@Yzichen 作者您好,辛苦帮忙看下,十分感谢

Yzichen commented 1 week ago

我觉得原始代码没有问题, 我们需要考虑gt中free区域的预测情况, 这些区域常常会产生误检. 而你修改之后, 没有考虑这部分误减.