WongKinYiu / yolov9

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

issue of pt to onnx #540

Open wangsun1996 opened 1 month ago

wangsun1996 commented 1 month 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 1 month ago

To detach the auxiliary branch use reparameterization.ipynb.

gwd777 commented 1 month ago

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

R4Ajeti commented 1 month 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?