WongKinYiu / yolov9

Implementation of paper - YOLOv9: Learning What You Want to Learn Using Programmable Gradient Information
GNU General Public License v3.0
9.04k stars 1.44k forks source link

issue of pt to onnx #540

Open wangsun1996 opened 4 months ago

wangsun1996 commented 4 months ago

在训练时采用双分支训练(一个辅助分支+主分支),训练完成后我希望将pt模型转为只有主分支的onnx模型,请问该如何处理?

I use double branch training (one auxiliary branch + main branch) during training. After the training, I want to convert the pt model into onnx model with only main branch. What should I do

ankandrew commented 4 months ago

To detach the auxiliary branch use reparameterization.ipynb.

gwd777 commented 4 months ago

Bro Look this. https://github.com/gwd777/YoloV9-onnx-Pro

R4Ajeti commented 4 months ago

https://github.com/gwd777/YoloV9-onnx-Pro

@gwd777 I have a model that is .pt that I trained 1 month ago. Its custom model does it work using this link you refer to convert to onnx? or tflite

My only problem is that I need to install full pytorch when I wanna run inference. What are other choices I have?