CharlesShang / DCNv2

Deformable Convolutional Networks v2 with Pytorch
BSD 3-Clause "New" or "Revised" License
1.28k stars 400 forks source link

difference between DCNv2 and deform_conv2d in torchvision #124

Open sparshgarg23 opened 2 years ago

sparshgarg23 commented 2 years ago

Since both torchvision's deform_conv2d and this repo tend to replicate the deformable convolutional net,would like to know what seperates this implementation from the torch implementation.

DonggeunYu commented 2 years ago

What's the difference?

ibayer commented 2 years ago

@Licht-T

Thanks for contributing https://github.com/pytorch/vision/pull/2791 to torchvision! We are wondering if we could use your torchvision implementation as drop in replacement for the cuda extension in DCNv2.

I think this would require replacing

with their torchvision equivalents.

The same question has bee raised elsewhere as well https://github.com/jinfagang/DCNv2_latest/issues/29.

Would be great to get you thoughts on using your torchvision implementation here. This might eliminate the need to compile the cuda extension and therefore simply integration of DCNv2 a lot.

Implementation in torchvision

edit: add links to torchvision docs

ibayer commented 2 years ago

Not yet tested but the README sounds promising:

PyTorch Deformable Convolutional Networks v2 (no compile required) This is developed for use with FairMOT inference. Referenced PyTorch-Deformable-Convolution-v2 for the use of torchvision.ops.deform_conv2d. Referenced DCNv2 for the class constructor signature.

https://github.com/liyier90/pytorch-dcnv2