Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deform_fusion #2

Open
xiaoyudanaa opened this issue May 21, 2022 · 1 comment
Open

deform_fusion #2

xiaoyudanaa opened this issue May 21, 2022 · 1 comment

Comments

@xiaoyudanaa
Copy link

Hello, I also use the feature processing of cnn and transformer in my network. Is it also possible to do fusion with your deform_fusion module? If possible, you set "self.conv_offset = nn.Conv2d(in_channels, 233, 3, 1, 1)" in deform_fusion, I don't quite understand the meaning of 233. There are also input and output channels as "in_channels=7685, cnn_channels=2563, out_channels=256*3", why are you multiplying by 5 and 3 respectively.

@yuanygong
Copy link
Collaborator

yuanygong commented May 26, 2022

While in deform_fusion, self.conv_offset is used to calculate the offset for the deformable convolution. For each pixel in the input feature map, we calculate 2*3*3 offsets, in which 2 means the x and y offsets, 3*3 mean the size of the convolution kernel. In short, the output channels mean the x and y offset for a 3*3 convolution kernel. For more details, please refer to the link: https://pytorch.org/vision/main/generated/torchvision.ops.deform_conv2d.html. And for the multiply parameters, it is because we extracted features from three layers of CNN and five layers of Transformer.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants