tensorflow-yolov4-tflite icon indicating copy to clipboard operation
tensorflow-yolov4-tflite copied to clipboard

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

Open limchr opened this issue 4 years ago • 0 comments

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.

limchr avatar Aug 08 '21 23:08 limchr