Comments (7)
I have the same confusion here. For every point of output, there should be a offset grid of 2x9 points. So I think the number of channels should be 2N
, instead of n_channels
.
from pytorch-deform-conv.
I think u are right, in official repository (https://github.com/msracver/Deformable-ConvNets), the number of channel in offset is 2N=29=18 for 3x3 kernel.
from pytorch-deform-conv.
I think u are right, in official repository (https://github.com/msracver/Deformable-ConvNets), the number of channel in offset is 2_N=2_9=18 for 3x3 kernel.
Do you have fixed this bug ??
from pytorch-deform-conv.
I believe its a bug. The tensorflow implementation the author follows https://github.com/kastnerkyle/deform-conv also has the bug.
from pytorch-deform-conv.
from pytorch-deform-conv.
I don't know if my understanding is correct... The kernel offsets should be different for each output pixel, thus it is impossible to generate a deformed feature map and apply convolution on it later. Rather, there should be different kernel offset for different output pixels.
You can check https://github.com/chengdazhi/Deformable-Convolution-V2-PyTorch for a pytorch implementation using cuda. Perhaps it would be too slow to implement it in pure python.
Any ideas?
from pytorch-deform-conv.
Instead of learning the offsets on the kernels, this code implements the deformable convolution by learning the offsets on the feature map. For example, by using x = self.offset12(x), we can get a feature map augmented with offsets. Then by using the self.conv12(x) (here self.conv12 has 3x3 kernel), the convolutional operation is implemented on the 3x3 neighbors and each neighbor has already be augmented with the offset.
Hello,
I am confused about the shape of offset.
The paper mentions:
"The grid R defines the receptive field size and dilation. For example,R = {(−1,−1),(−1,0),...,(0,1),(1,1)}.
In deformable convolution, the regular grid R is aug- mented with offsets {∆pn |n = 1, ..., N }, where N = |R|.
The output offset fields have the same spatial resolution with the input feature map. The channel dimension 2N corresponds to N 2D offsets."
So, I think the shape of offset field would be [2_9, H, W] if 3x3 kernel is used. While in your implementation, the shape of offset seems to be [batch_size, 2_n_channels, H, W]?
from pytorch-deform-conv.
Related Issues (20)
- Question about implementation HOT 1
- Input image w!=h HOT 5
- Gif image visualization HOT 6
- Offset output channel HOT 1
- What is the size of the offset? HOT 3
- A re-train normal CNN on scaled data beats deform-conv. HOT 3
- about the implementation.. view instead of permute ? HOT 5
- Why only fine tuning on deformable convnet HOT 1
- Weighting in deformed kernel
- Fixed
- only for test, cannot be used for training
- The deform-conv layers reduce the detection accuracy
- Offset BUG HOT 1
- How to get the sampling points?
- related to TF_version #4
- related to TF_version #4
- related to TF_version #4
- Process finished with exit code 139 (interrupted by signal 11: SIGSEGV) HOT 1
- Deformable Pooling is not included HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pytorch-deform-conv.