dbolya / tide

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

ZeroDivisionError #10

Closed dvd42 closed 3 years ago

dvd42 commented 3 years ago

I am getting ZeroDivisionError when using tide.summarize() for two custom datasets in COCO format.

 File "/home/diego/Projects/tfm/detr/util/plot_utils.py", line 25, in plot_tide
    tide.summarize()
  File "/home/diego/.pyenv/versions/master/lib/python3.6/site-packages/tidecv/quantify.py", line 494, in summarize
    main_errors    = self.get_main_errors()
  File "/home/diego/.pyenv/versions/master/lib/python3.6/site-packages/tidecv/quantify.py", line 603, in get_main_errors
    for error, value in run.fix_main_errors().items()
  File "/home/diego/.pyenv/versions/master/lib/python3.6/site-packages/tidecv/quantify.py", line 349, in fix_main_errors
    new_ap = _ap_data.get_mAP()
  File "/home/diego/.pyenv/versions/master/lib/python3.6/site-packages/tidecv/ap.py", line 150, in get_mAP
    return sum(aps) / len(aps)
ZeroDivisionError: division by zero

Why is this happening exactly?

dbolya commented 3 years ago

Hmm it seems there were no detections after fixing one of the error types, so computing the new mAP resulted in an error.

Does your dataset and results file run fine in COCOEval? And have you selected the right evaluation mode for your task (TIDE.box, TIDE.mask)?

dvd42 commented 3 years ago

Yes the dataset and results run fine on COCOEval. However I am closing this issue, since after reinstalling TIDE I can no longer reproduce the error.

djaym7 commented 3 years ago

float division by zero Error in td.plot and td.summarize when all errors are 0 and maps are 0