dbolya / tide

A General Toolbox for Identifying Object Detection Errors
https://dbolya.github.io/tide
MIT License
702 stars 115 forks source link

Crashes with a DivideByZeroError when there are no detections #39

Open drewm1980 opened 2 years ago

drewm1980 commented 2 years ago

Badly trained algorithms might not return detections at all. Tide should return meaningful results in this case instead of crashing on line:

https://github.com/dbolya/tide/blob/49a5d2a4aeb56795e93a3ed7cc7e6d25757bb4c1/tidecv/ap.py#L150

With a quick search, I see several other places in the code that perform unchecked divisions. Tide should check for zero and either return meaningful results or meaningful error messages in all of them.

BartvanMarrewijk commented 2 years ago

Similar issue when the using the plot function with a AP50 of 100%

nikheelpandey commented 2 years ago

Hey, has anyone found a fix for it?

meftehs commented 1 year ago

Hey, Similar for me too, I tried to test yolov7 on coco dataset and then when i run tide.summarize(), an error of division by 0 appears !!!