Skip to content

rish-16/involution_pytorch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

involution_pytorch

Unofficial PyTorch implementation of "Involution: Inverting the Inherence of Convolution for Visual Recognition" by Li et al. presented at CVPR 2021.


[abs, pdf, Yannic's Video]

Installation

You can install involution_pytorch via pip:

pip install involution_pytorch

Usage

You can use the Inv2d layer as you would with any PyTorch layer:

import torch
from involution_pytorch import Inv2d

inv = Inv2d(
    channels=16,
    kernel_size=3,
    stride=1
)

x = torch.rand(1, 16, 32, 32)
y = inv(x) # [1, 16, 32, 32]

The paper talks about using Self-Attention for the dynamic kernel generation function. I'll try implementing it later if time permits.

Contributing

If I've made any errors anywhere in the implementation, please do let me know by raising an issue. If there's any cool addition you want to introduce, all PRs appreciated!

License

MIT

About

Unofficial PyTorch implementation of the Involution layer from CVPR 2021

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages