Coder Social home page Coder Social logo

d-li14 / psconv Goto Github PK

View Code? Open in Web Editor NEW
175.0 5.0 25.0 436 KB

[ECCV 2020] PSConv: Squeezing Feature Pyramid into One Compact Poly-Scale Convolutional Layer

Home Page: https://arxiv.org/abs/2007.06191

License: MIT License

Python 83.74% C++ 5.41% Cuda 10.68% Shell 0.17%
convolution multi-scale feature-pyramids object-detection instance-segmentation mmdetection pytorch eccv2020

psconv's Introduction

Duo Li's github stats

psconv's People

Contributors

d-li14 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

psconv's Issues

Optimized version of PSConv

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?

Paper link

Hi! We meet again. Congratulations! It is an interesting work. Where is the paper ?

I had a problem trying to use PSconv

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

how to i use psconv in my own model

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?

Can't simply replace nn.Conv2d with PSConv2d

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!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.