Open tdurand opened 4 years ago
I tried your onnx file and found a couple of issues:
We are working on a release this week and both fixes will be included. If you want to try it now, please checkout PR 612 and let us know if works for you.
ok ! great, will wait for the release then
@tdurand hi, I used the same method to convert yolov5 model from pytorch weights --> onnx weights --> tensorflow weights, and it worked successfully now. But it seems there're some differences on the model output (feature maps in the model predictitions). Have you encountered this problem? Or should I make some modifications on the converting code in onnx-tensorflow? @chinhuang007
hope for your help !
attacting the predictions from pytorch and tensorflow weights. 1) pytorch [ 4.47754e-01, 1.94092e-01, -1.46484e-01, ..., -8.39062e+00, -8.77344e+00, -8.06250e+00], [-7.99561e-02, 4.58496e-01, 9.13086e-01, ..., -8.55469e+00, -8.94531e+00, -8.40625e+00], [-9.25293e-02, 3.60840e-01, 1.17383e+00, ..., -8.60938e+00, -9.16406e+00, -8.60156e+00],....
2) tensorflow [ 4.45807695e-01, 1.93201512e-01, -1.47372961e-01, ..., -8.40334892e+00, -8.77904129e+00, -8.06796741e+00], [-7.97356218e-02, 4.55422223e-01, 9.14129257e-01, ..., -8.55984402e+00, -8.95124817e+00, -8.40561104e+00], [-9.17178839e-02, 3.59077632e-01, 1.17550290e+00, ..., -8.61985493e+00, -9.16726494e+00, -8.60023499e+00],...
@Chilicy no sorry, I didn't work further on this
@tdurand thanks anyway. @chinhuang007 can you provide me some advices?
@tdurand hi, I used the same method to convert yolov5 model from pytorch weights --> onnx weights --> tensorflow weights, and it worked successfully now. But it seems there're some differences on the model output (feature maps in the model predictitions). Have you encountered this problem? Or should I make some modifications on the converting code in onnx-tensorflow? @chinhuang007
hope for your help !
attacting the predictions from pytorch and tensorflow weights.
- pytorch [ 4.47754e-01, 1.94092e-01, -1.46484e-01, ..., -8.39062e+00, -8.77344e+00, -8.06250e+00], [-7.99561e-02, 4.58496e-01, 9.13086e-01, ..., -8.55469e+00, -8.94531e+00, -8.40625e+00], [-9.25293e-02, 3.60840e-01, 1.17383e+00, ..., -8.60938e+00, -9.16406e+00, -8.60156e+00],....
- tensorflow [ 4.45807695e-01, 1.93201512e-01, -1.47372961e-01, ..., -8.40334892e+00, -8.77904129e+00, -8.06796741e+00], [-7.97356218e-02, 4.55422223e-01, 9.14129257e-01, ..., -8.55984402e+00, -8.95124817e+00, -8.40561104e+00], [-9.17178839e-02, 3.59077632e-01, 1.17550290e+00, ..., -8.61985493e+00, -9.16726494e+00, -8.60023499e+00],...
Hello!! Could you detail a bit more the steps to do the conversion please?? @Chilicy
Hi,
Describe the bug
Error while converting Yolov5s onnx weights to tensorflow
To Reproduce
ONNX model file
https://u.pcloud.link/publink/show?code=XZkXEUkZeHMBgszcW2SMXgmuxnp5rmbLyj9V
Python, ONNX, ONNX-TF, Tensorflow version
Python version: 3.6.9 (default, Apr 18 2020, 01:56:04) [GCC 8.4.0] ONNX version: 1.7.0 ONNX-TF version: 1.5.0 Tensorflow version: 1.14.0
PS: installed ONNX-TF with
pip install onnx-tf
Additional context
I create the onnx weights file from https://github.com/ultralytics/yolov5
Using onnx_export.py
With the following command
Thanks for you work !