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 !
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 (viaYoloZone.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 withint()
, or even on an area of 0. Eventhough this is pretty rare, i think it's worth flagging it !