PonteIneptique / YALTAi

You Actually Look Twice At it
GNU General Public License v3.0
29 stars 1 forks source link

Danger with xyxy100 #1

Open sven-nm opened 2 years ago

sven-nm commented 2 years ago

Hey @PonteIneptique, I was looking at your code and thanks a lot it's very usefull! If I understand it correctly, get_scores relies on a factor of 100 (via YoloZone.xyxy100) rather than on image width and height to "de-normalize" Yolo's gt and preds. Though this does not alter the computation of IoU, I think there is a danger in using that method.

Take some of my page numbers for instance : a really tiny zone, sometimes very close to the image boundary. Say it has (40,50, 90,90) as orignal xyxy. Now if you normalize this with something like h=5000 and w= 2000 and de-normalize it with 100 you might end up with weird rounding effects with int(), or even on an area of 0. Eventhough this is pretty rare, i think it's worth flagging it !

PonteIneptique commented 2 years ago

Damn, I missed this message ! Hmm, I need to dive back into this part of the code. I agree with you that it might be an issue