MathGaron / mean_average_precision

Small and simple python/numpy utility to compute mean average precision (mAP) on detection task.
MIT License
117 stars 45 forks source link

fix division with intergers #14

Closed YuCosine closed 6 years ago

YuCosine commented 6 years ago

If coordinates of bounding boxes are all integers, jaccard will return 0. After adding astype('float32') in line 49, the problem is solved.

YuCosine commented 6 years ago

Maybe this happens only in python2. I am using python 2.7, and it works well after the change.