Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed crucial bug in dataset.py that resulted in wrong label information #384

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

limchr
Copy link

@limchr limchr commented Aug 8, 2021

For generating label data for e.g. training the network, the COCO label information are translated into YOLO grid cell labels. Doing this, an IOU score was calculated wrongly, mixing up pixel-scale and grid-scale coordinates in dataset.py.

This is resulting in very small IOU values for the middle and large grid scale, preventing a training signal for this part of the network. This does may also explain the poorer training performance compared to the original implementation, because 2/3 of the network is not getting a training signal. I fixed the bug simply by dividing the anchor boxes by the strides. Doing this, the IOU is calculated consistently with grid-level coordinates. The resulting target for training the network looks correct now.

…pixel-scale and grid-scale coordinates. This is resulting in very small IOU values for the middle and large grid scale, preventing a training signal for this part of the network. This does may also explain the poorer training performance compared to the original implementation, because 2/3 of the network is not getting a training signal. I fixed the bug simply by dividing the anchor boxes by the strides for calculating the IOU consistently with grid-level coordinaes. The result looks correct now.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant