-
Notifications
You must be signed in to change notification settings - Fork 212
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
A Method for Support ONNX Converting #192
Comments
We greatly appreciate your providing this onnx example and we will include it in the tutorial. We also very welcome your participation in building this open-source project ! |
Thanks, i'd like to participate in building this open-source project. I will push some KD methods for DETR families in the future. |
Sure, we will really appreciate it! @powermano BTW, we've pinned this issue, which will help more people when they need onnx output~ |
As we have already pinned this issue, we're going to close it. Feel free to reopen it if necessary. |
Hey @powermano, |
I have converted the onnx model to openvino(https://docs.openvino.ai/2023.1/home.html) and used the cpu for inference. The inference speed of onnxruntime and openvino using a single process is almost the same. I didn't test the speed of pytorch because it uses multiple processes. |
Does this work for Mask DINO? |
Hi! I tried to convert MASK DINO model to onnx using these scripts but it just failed when it came to the forward function. I don't know how I should handle with this. Is this possible to provide scripts for MASK DINO. I would really appriciate! |
Taking DN-DETR as example
1 add a dn_detr_onnx.py, you only need to change the
forward
function.2 add new_file dn_detr_r50_onnx.py, change
DNDETR
toDNDETR_ONNX
.3 add new_file
dn_detr_r50_50ep_onnx.py
4 add new_file
torch2onnx.py
in the tools foder.5 run with command
python tools/torch2onnx.py --config-file projects/dn_detr/configs/dn_detr_r50_50ep_onnx.py --eval-only train.init_checkpoint=$<YOUR_MODEL_PATH>
It worked for me. The torch results and onnx results are the same.
The text was updated successfully, but these errors were encountered: