-
-
Notifications
You must be signed in to change notification settings - Fork 17.2k
Description
Search before asking
- I have searched the YOLOv5 issues and discussions and found no similar questions.
Question
Hello, here is a question that confuse me a lot. I download the model yolov5m.onnx and yolov5m.pt , and the test command is as follow:
onnx model tested on COCO:
python detect.py --source /datasets/coco128/images/train2017 --weights /data/zoubaihan/pyproject/yolov5/yolov5m.onnx
One of the image detected by onnx model is as follow:
pytorch model tested on COCO:
python detect.py --source /datasets/coco128/images/train2017 --weights /data/zoubaihan/pyproject/yolov5/yolov5m.pt
While the same input image detected by pytorch model is as follow:
Jesus! Why the same model and the same weight under different deeplearning framework output different results?
I have also tried to convert some other deep learning models between different deep learning frameworks, but the output results are often different, or even very different. Could you please explain why this is?
I also tried to use export.py to convert model from pytorch to onnx, but their results is also not equal. The command is as follow:
python export.py --weights yolov5m.pt --include onnx
But another confusing problem came out: the file size of the output onnx model is not equal to the onnx model I download from your github. Is the yolov5m.onnx model you put in the release really converted by you by running export.py?
Additional
I tried the export.py and other convert tools, but all not work well. Their output results are not the same.
Anybody know why?
Here is the collection of model converter:
https://github.com/ysh329/deep-learning-model-convertor