Sense-X / Co-DETR

[ICCV 2023] DETRs with Collaborative Hybrid Assignments Training
MIT License
969 stars 105 forks source link

Export a model CODETR to onnx #57

Open MarouaneMja opened 1 year ago

MarouaneMja commented 1 year ago

Hello ,

I am trying to export Co-DETR/projects/configs/co_dino/co_dino_5scale_swin_large_16e_o365tococo.py to onnx using the file tools/deployment/pytorch2onnx.py, but when I run the file it tells me that KeyError: 'CoDETR is not in the models registry', does the project does not support the export for this specific model or there is a solution to this?

Sincerely, Marouane

bluceliuljx commented 1 year ago

image

I have the same issue

u should import image

but it get a new issue AttributeError: 'CoDINOHead' object has no attribute 'input_proj'

image

MarouaneMja commented 1 year ago

Thank you, I have done the import as you did, but I also found the same error AttributeError: 'CoDINOHead' object has no attribute 'input_proj' . I am trying to use MMdeploy as @TempleX98 suggested in https://github.com/Sense-X/Co-DETR/issues/26#issuecomment-1707752118 to export the model to onnx

YOODS-Xu commented 5 months ago

@MarouaneMja Did you success? I have the same needs to deploy co-detr to any type, ts, onnx or openvino.

MarouaneMja commented 5 months ago

I actually used mmdeploy to convert the model to onnx, I did not succeed using this project

YOODS-Xu commented 5 months ago

@MarouaneMja Thank you so much for your answer. Why did you not succeed? Actually, I am trying using CODETR to one class clowed object detection. Any advice would be appreciated.

wl654655902 commented 1 month ago

I actually used mmdeploy to convert the model to onnx, I did not succeed using this project

Did you success?

YOODS-Xu commented 3 weeks ago

No, I did not success.