cs-chan / Total-Text-Dataset

Total Text Dataset. It consists of 1555 images with more than 3 different text orientations: Horizontal, Multi-Oriented, and Curved, one of a kind.
BSD 3-Clause "New" or "Revised" License
747 stars 140 forks source link

A Bug in Pascal_VOC.py #22

Closed happycoding1996 closed 5 years ago

happycoding1996 commented 5 years ago

Dear Authors,

Thanks for your great work.

When I was using your evaluation code in Pascal_VOC.py, I noticed a potential bug which lied in the line 71 where only the condition 'len(groundtruths) > 0' was considered. I think the condition 'len(groundtruths) == 0' should also be taken into consideration.

If all labels in gt are marked as '###' (like the 1st testing image in ICDAR15 dataset) and there exists predictions that do not match any box marked by '###', these false positive predictions will not be counted in the case of 'len(groundtruths) > 0'.

ckchng commented 5 years ago

Thanks for pointing it out. I fixed it by dividing the total number of detection in line 113. In this way, all even though when there is no ground truth but more than 1 prediction, it will be penalised as well. Cheers!