Skip to content
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

Plan to support for ONNX #83

Open
limz230 opened this issue Sep 28, 2022 · 13 comments
Open

Plan to support for ONNX #83

limz230 opened this issue Sep 28, 2022 · 13 comments

Comments

@limz230
Copy link

limz230 commented Sep 28, 2022

Hello,

Thanks for your release of DETR-like models! As I know, DETR can be converted to ONNX now, will you have plan to support these DETR-like models for ONNX?
I am looking forward to your reply, thanks!

@rentainhe
Copy link
Collaborator

rentainhe commented Sep 28, 2022

Hello,

Thanks for your release of DETR-like models! As I know, DETR can be converted to ONNX now, will you have plan to support these DETR-like models for ONNX? I am looking forward to your reply, thanks!

Thanks for reporting this question, we plan to support ONNX for a partial of DETR-like models in the future. Cuz some custom operators like MultiScaleDeformableAttention may not be that easy to be exported into ONNX format. @limz230

@rentainhe rentainhe mentioned this issue Oct 4, 2022
14 tasks
@qingwan7
Copy link

Excuse me, when will you launch onnx?

@rentainhe
Copy link
Collaborator

Excuse me, when will you launch onnx?

We will start to explore detrex onnx export these days!Please stay tuned : )

@ichitaka
Copy link

@rentainhe Any updates on this? I've successfully exported MaskDINO to ONNX, but something is broken, the model is way worse and smaller. Still analyzing...

@rentainhe
Copy link
Collaborator

@rentainhe Any updates on this? I've successfully exported MaskDINO to ONNX, but something is broken, the model is way worse and smaller. Still analyzing...

@powermano has provided a detailed usage in this issue #192, maybe you can refer to this for more details @ichitaka , we did not have time to export maskdino to onnx these days but we will try to figure it out in the future, very sorry.

@alrightkami
Copy link
Contributor

I'm also very interested in MaskDINO to ONNX, have you used @powermano's script? @ichitaka
It would be great if you could provide the script for MaskDINO as well! maybe we can fix the errors together?

@DuckJ
Copy link

DuckJ commented Jun 27, 2023

@alrightkami hi, Do you have the script export MaskDINO into ONNX,thanks

@SangbumChoi
Copy link

jozhang97/DETA#24

I have tried converting DETA Pytorch -> ONNX into TensorRT inference. There is a workaround solution for MSMHDA.

@SergiyShebotnov
Copy link

Anyone had success with exporting Mask Dino to ONNX or any other format for deployment?

@ichitaka
Copy link

ichitaka commented Dec 1, 2023

@SergiyShebotnov I successfully deployed it using TorchTensorRT. Had to add the custom CUDA kernels by rewriting them a bit. It was a bit of work. Sadly can't share it, since my old customer owns that. Look at the custom modules sections in the docs. If you know C++, you should be fine.

@SangbumChoi
Copy link

@SergiyShebotnov I successfully deployed it using TorchTensorRT. Had to add the custom CUDA kernels by rewriting them a bit. It was a bit of work. Sadly can't share it, since my old customer owns that. Look at the custom modules sections in the docs. If you know C++, you should be fine.

Can you share little bit of detail which part should be converted to C++? (MSHDA perhaps?)

@ichitaka
Copy link

ichitaka commented Dec 3, 2023 via email

@yu-xi-wang
Copy link

I'm trying to export MaskDINO to TorchScript (using trace) following the Detectron2's deploy guide, but it turns out the traced model does not generate same result since backbone (Swin backbone used here) inference step. Does anyone know that whether the Swin backbone can be correctly traced? Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

9 participants