hunglc007 / tensorflow-yolov4-tflite

YOLOv4, YOLOv4-tiny, YOLOv3, YOLOv3-tiny Implemented in Tensorflow 2.0, Android. Convert YOLO v4 .weights tensorflow, tensorrt and tflite
https://github.com/hunglc007/tensorflow-yolov4-tflite
MIT License
2.25k stars 1.24k forks source link

Bounding boxes smaller than expected with yolov4-tiny #198

Open vinorth-v opened 4 years ago

vinorth-v commented 4 years ago

Hello,

I don't understand, the results are perfect with my darknet model but after converting to TF, the detection results are two times smaller for the bounding boxes.

I am using this config file https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-tiny-3l.cfg which is a bit different from the default one: https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-tiny.cfg (one more yolo-layer)

Also, I only have 4 classes so filters=27 (instead of filters=255 before the yolo layers).

How should I change the parameters in config.py?

Thank you in advance!

15800436469try commented 4 years ago

Hello,

I don't understand, the results are perfect with my darknet model but after converting to TF, the detection results are two times smaller for the bounding boxes.

I am using this config file https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-tiny-3l.cfg which is a bit different from the default one: https://github.com/AlexeyAB/darknet/blob/master/cfg/yolov4-tiny.cfg (one more yolo-layer)

Also, I only have 4 classes so filters=27 (instead of filters=255 before the yolo layers).

How should I change the parameters in config.py?

Thank you in advance! the author did not add code to process yolov4-tiny in dataset.py,you can try to add some code to reduce the bboxes numbers to 2 rather than 3.and it will work