Skip to content
/ DCNv2 Public
forked from tteepe/DCNv2

Deformable Convolutional Networks v2 (DCNv2) with Pytorch 1.8+ & JIT Compilation

License

Notifications You must be signed in to change notification settings

wharu/DCNv2

 
 

Repository files navigation

DCNv2 with Pytorch 1.8+ & JIT Compilation

CI testing

Requirements

pip install torch torchvision torchaudio

sudo apt-get install ninja-build

Test

cd tests
python test_cuda.py  # run examples and gradient check on gpu
python test_cpu.py   # run examples and gradient check on cpu 

Note

Now the master branch is for pytorch 1.x, you can switch back to pytorch 0.4 with,

git checkout pytorch_0.4

Known Issues:

  • Gradient check w.r.t offset (solved)
  • Backward is not reentrant (minor)

This is an adaption of the official Deformable-ConvNets.

Update: all gradient check passes with double precision.

Another issue is that it raises RuntimeError: Backward is not reentrant. However, the error is very small (<1e-7 for float <1e-15 for double), so it may not be a serious problem (?)

Please post an issue or PR if you have any comments.

About

Deformable Convolutional Networks v2 (DCNv2) with Pytorch 1.8+ & JIT Compilation

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 37.4%
  • Cuda 32.6%
  • Python 19.5%
  • C 7.2%
  • Shell 3.3%