Open evakasch opened 2 years ago
Thanks for your pointing out this issue. Indeed, there is a silly bug in calculating the IoU metric. We will first update the Readme to remind the users of PETRv2 BEV segmentation. After that, we will fix this issue and update the IoU performances in both the PETR repo and PETRv2 paper on the arxiv. Thanks again for your kind reminder!
The IoU function seems to be (I + I)/(I +U) in mmdet3d_plugin/models/detectors/petr3d_seg.py, but not I/U that we common used.
This may lead to higher IoU value than that calculated by normal IoU metrics. So why not to use normal IoU metrics?
The source code of the IoU function is shown below:
def IOU (intputs,targets): numerator = 2 (intputs targets).sum(dim=1) denominator = intputs.sum(dim=1) + targets.sum(dim=1) loss = (numerator + 0.01) / (denominator + 0.01) return loss