TNTWEN / OpenVINO-YOLOV4

This is implementation of YOLOv4,YOLOv4-relu,YOLOv4-tiny,YOLOv4-tiny-3l,Scaled-YOLOv4 and INT8 Quantization in OpenVINO2021.3
MIT License
238 stars 66 forks source link

Difference Inference result after the conversion. #42

Open mattiadp opened 3 years ago

mattiadp commented 3 years ago

Hello thank you for your work

I have a question for you. I have correctly converted a custom .weigth to openvino format. After converting to the openvino format, I was able to see a decrease in general performance as regards the quality of the detection. On average I noticed an 8% decrease in the neural network's ability to detect my custom objects. It's normal? Do you have any advice to be able to bring the quality of the results closer to those of the original weigth. I noticed that the loss of quality occurs in the transformation .weight to .pb

Thank you

TNTWEN commented 3 years ago

@mattiadp It is normal that there are differences in accuracy among different inferencing frameworks. But under normal circumstances, the accuracy of openvino will not lose too much. This has nothing to do with the precision of. pb.

I think you should check size of input image, confidence threshold,anchors ...... first,make sure these parameters are the same when you test your model in darknet and openvino.

Also you could use accuracy-checker(INT8 Quantization step 4) to calculate IR model's map.

mattiadp commented 3 years ago

Thanks for the quick response. OK! I got it. Maybe I could try training yolo4 directly with a TensorFlow framework implementation to get a better overall quality. Anyway thanks again.

TNTWEN commented 3 years ago

No,you should use darknet to train your model !!!!!! Many tensorflow and pytorch 's yolov4 implementation are different from darknet. It will cause your model can only run under the training framework, and the effect of converting to other frames is especially poor!!

Never train yolo4 directly with a TensorFlow framework then convert to other format.