Skip to content
forked from lbin/DCNv2

Deformable Convolutional Networks v2 with Pytorch

License

Notifications You must be signed in to change notification settings

Meltemi-Q/DCNv2

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Deformable Convolutional Networks V2 with Pytorch

Build

    ./make.sh         # build
    python test.py    # run examples and gradient check 

An Example

    from dcn_v2 import DCN
    input = torch.randn(2, 64, 128, 128).cuda()
    # wrap all things (offset and mask) in DCN
    dcn = DCN(64, 64, kernel_size=(3,3), stride=1, padding=1, deformable_groups=2).cuda()
    output = dcn(input)
    print(output.shape)

Known Issues:

  • Gradient check w.r.t offset
  • Backward is not reentrant

This is an adaption of the official Deformable-ConvNets. I have ran the gradient check for many times with DOUBLE type. Every tensor except offset passes. However, when I set the offset to 0.5, it passes. I'm still wondering what cause this problem. Is it because some non-differential points?

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

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

About

Deformable Convolutional Networks v2 with Pytorch

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C++ 38.4%
  • Cuda 32.5%
  • Python 22.6%
  • C 6.5%