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.23k stars 1.24k forks source link

Saved model gives Poor result (TF framework) #315

Open hadizand opened 3 years ago

hadizand commented 3 years ago

I trained YOLOV4-Tiny model over a custom dataset which had three classes. I used main darknet approach:"https://github.com/AlexeyAB/darknet#yolo-v4-in-other-frameworks" in order to train/test the model, and it detects and predicts very well. In next step, I used this repository (saved_model.py) to convert the xx.weight file to .pb file. While there is no error in converion, but it gives very poor results. I manipulated the iou & score paramteres, but the model does not detect and predict well. For example, it shows many bounding boxes with score 1. Attached is an example of the results of .weight and .pb.

Any comment or suggestion to solve this issue?

Thanks

resultFromWeight

result_from_Saved_model

Micky-123 commented 3 years ago

@hadizand : Were you able to figure out the issue with the above?

hadizand commented 3 years ago

@hadizand : Were you able to figure out the issue with the above?

I could not resolve the issue, and I switched to this github code (YOLOv5), it works perfectly. https://github.com/ultralytics/yolov5

khg2478 commented 3 years ago

@hadizand Hello. Do you mean you could change the model into tflite format? If solved, please let me know. :)