OpenGVLab / InternImage

[CVPR 2023 Highlight] InternImage: Exploring Large-Scale Vision Foundation Models with Deformable Convolutions
https://arxiv.org/abs/2211.05778
MIT License
2.52k stars 234 forks source link

How to use DCNv3 in my own network? #209

Open Tempesting opened 1 year ago

Tempesting commented 1 year ago

I've installed the DCNv3 via the whl file, but I don't know how to use it , where can I see instructions for that?

"from DCNv3 import DCNv3 DCNv3(*args)" is wrong.

czczup commented 1 year ago

You should copy the whole folder of dcnv3_ops in your project, and then from ops_dcnv3 import modules as opsm.

https://github.com/OpenGVLab/InternImage/tree/master/detection/ops_dcnv3

You can refer to this file to use DCNv3 in your model.

https://github.com/OpenGVLab/InternImage/blob/master/detection/mmdet_custom/models/backbones/intern_image.py#L377