open-mmlab / mmdeploy

OpenMMLab Model Deployment Framework
https://mmdeploy.readthedocs.io/en/latest/
Apache License 2.0
2.75k stars 631 forks source link

Hope support DCN module someday [Feature] #1412

Open X00123 opened 1 year ago

X00123 commented 1 year ago

Motivation

I want use mmdeploy to convert DBNetpp_r50dcn into torchscript model but got RuntimeError

Could not export Python function call 'ModulatedDeformConv2dFunction'. Remove calls to Python functions before export. Did you forget to add @script or @script_method annotation? If this is a nn.ModuleList, add it to __constants__

Find it's an error about DCNv2 module function, I tried fix this error but failed :(

So is there any one can give me some suggestion about how to modify DCN code in order to make it usable in torchscript?

thanks~

Related resources

get the DCN code in docs but don't know how to modify it :((((((

Additional context

No response

lvhan028 commented 1 year ago

@AllentDan could you check if #1493 can resolve this issue?

AllentDan commented 1 year ago

Nope. I've asked @grimoire to add the support of MDCN to torchscript.

AllentDan commented 1 year ago

1508

jturner116 commented 1 year ago

@AllentDan Does this mean that DBNetpp will be officially supported in a future release? 👀👀

AllentDan commented 1 year ago

@AllentDan Does this mean that DBNetpp will be officially supported in a future release? eyeseyes

Yes, actually other backends like ONNXRuntime or TensorRT were supported.