d-li14 / psconv Goto Github PK
View Code? Open in Web Editor NEW[ECCV 2020] PSConv: Squeezing Feature Pyramid into One Compact Poly-Scale Convolutional Layer
Home Page: https://arxiv.org/abs/2007.06191
License: MIT License
[ECCV 2020] PSConv: Squeezing Feature Pyramid into One Compact Poly-Scale Convolutional Layer
Home Page: https://arxiv.org/abs/2007.06191
License: MIT License
Thanks for your great work. Can you share the code for training imagenet? I use the code (https://github.com/rwightman/pytorch-image-models) and train ResNeXt-50+PSConv with the same setting in your paper (SGD, 120 epochs, half cosine function shaped schedule, cross entropy, standard augmentation, weight decay 1e-4). The top1 performance is only 77.57%, which is lower than the results reported in your paper (79.622%).
x1, x2 = x.chunk(2, dim=1)
x_shift = self.gwconv_shift(torch.cat((x2, x1), dim=1))
return self.gwconv(x) + self.conv(x) + x_shift
I think the code is simply add with different dilation.
Hello, thank you for nice work!
It seems like that you made optimized version of PSConv as mentioned in the supplementary material of the paper. As it shows a great speedup, it could be very useful implementations for applying PSConv to various models.
Do you have a plan to release this optimized version of PSConv?
Hi! We meet again. Congratulations! It is an interesting work. Where is the paper ?
How does the code in the psconv.py file achieve the differentdilation rates written in the paper?
I tested PSconv through a small code in the psconv.py file.
if __name__ == '__main__':
net = PSConv2d(3, 3, 1, 1, 1, 1, 1, False)
print(net)
net = net.cuda()
var = torch.FloatTensor(1, 3, 127, 127).cuda()
RuntimeError: The size of tensor a (129) must match the size of tensor b (131) at non-singleton dimension 3
This is very interesting work. I am tempted to give it a try on my own model for segmentation. Can you provide some instructions on how to replace a standard conv with psconv in my model?
Thanks to the compact characteristic of PSConv, just replace nn.Conv2d
with PSConv2d
. Note that there exists another hyperparameter named parts
you may set in our PSConv operator.
Originally posted by @d-li14 in #3 (comment)
Hi, I'm reading your paper and there comes some problems, hope you could help me figer it out!
Origin Conv2d was
Conv2d(3, 64, kernel_size=(7, 7), stride=(2, 2), padding=(3, 3), bias=False)
PSConv2D are
PSGConv2d( (gwconv): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), groups=4, bias=False) (gwconv_shift): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(2, 2), dilation=(2, 2), groups=4, bias=False) (conv): Conv2d(64, 64, kernel_size=(3, 3), stride=(1, 1), padding=(1, 1), bias=False) )
And I add
self.weight = self.conv.weight self.bias = self.conv.bias
To solve the problem
" 'PSGConv2d' object has no attribute 'weight' " during building Resnet,
I don't know I'm right or wrong but it works temporarily.
After that ,durning training part,in PSConv2d.forward
self.gwconv(x).shape:
torch.Size([6, 256, 202, 274])
self.conv(x).shape
torch.Size([6, 256, 202, 274])
but x_shift.shape:
torch.Size([6, 256, 204, 276])
So....The size of tensor a (274) must match the size of tensor b (276) at non-singleton dimension 3
I'm using FCOS original code from tianzhi0549,thanks for the contribution, and add "psconv.py | conv_module.py | conv_ws.py " norm.py" from this respository.
Thank you for your time!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.