All Projects → ChristophReich1996 → Involution

ChristophReich1996 / Involution

Licence: MIT license
PyTorch reimplementation of the paper "Involution: Inverting the Inherence of Convolution for Visual Recognition" (2D and 3D Involution) [CVPR 2021].

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Involution

LabelRelaxation-CVPR21
Official PyTorch Implementation of Embedding Transfer with Label Relaxation for Improved Metric Learning, CVPR 2021
Stars: ✭ 37 (-62.24%)
Mutual labels:  cvpr2021
single-positive-multi-label
Multi-Label Learning from Single Positive Labels - CVPR 2021
Stars: ✭ 63 (-35.71%)
Mutual labels:  cvpr2021
DCNet
Dense Relation Distillation with Context-aware Aggregation for Few-Shot Object Detection, CVPR 2021
Stars: ✭ 113 (+15.31%)
Mutual labels:  cvpr2021
BCNet
Deep Occlusion-Aware Instance Segmentation with Overlapping BiLayers [CVPR 2021]
Stars: ✭ 434 (+342.86%)
Mutual labels:  cvpr2021
CondenseNetV2
[CVPR 2021] CondenseNet V2: Sparse Feature Reactivation for Deep Networks
Stars: ✭ 73 (-25.51%)
Mutual labels:  cvpr2021
cvpr-buzz
🐝 Explore Trending Papers at CVPR
Stars: ✭ 37 (-62.24%)
Mutual labels:  cvpr2021
CCL
PyTorch Implementation on Paper [CVPR2021]Distilling Audio-Visual Knowledge by Compositional Contrastive Learning
Stars: ✭ 76 (-22.45%)
Mutual labels:  cvpr2021
RfDNet
Implementation of CVPR'21: RfD-Net: Point Scene Understanding by Semantic Instance Reconstruction
Stars: ✭ 150 (+53.06%)
Mutual labels:  cvpr2021
Im2Vec
[CVPR 2021 Oral] Im2Vec Synthesizing Vector Graphics without Vector Supervision
Stars: ✭ 229 (+133.67%)
Mutual labels:  cvpr2021
CVPR2021-Papers-with-Code-Demo
收集 CVPR 最新的成果,包括论文、代码和demo视频等,欢迎大家推荐!
Stars: ✭ 752 (+667.35%)
Mutual labels:  cvpr2021
watson-waste-sorter
Create an iOS phone application that sorts waste into three categories (landfill, recycling, compost) using a Watson Visual Recognition custom classifier
Stars: ✭ 45 (-54.08%)
Mutual labels:  visual-recognition
RainNet
[CVPR 2021] Region-aware Adaptive Instance Normalization for Image Harmonization
Stars: ✭ 125 (+27.55%)
Mutual labels:  cvpr2021
HESIC
Official Code of "Deep Homography for Efficient Stereo Image Compression"[cvpr21oral]
Stars: ✭ 42 (-57.14%)
Mutual labels:  cvpr2021
CS231n
CS231n Assignments Solutions - Spring 2020
Stars: ✭ 48 (-51.02%)
Mutual labels:  visual-recognition
MetaBIN
[CVPR2021] Meta Batch-Instance Normalization for Generalizable Person Re-Identification
Stars: ✭ 58 (-40.82%)
Mutual labels:  cvpr2021
DeFLOCNet
The official pytorch code of DeFLOCNet: Deep Image Editing via Flexible Low-level Controls (CVPR2021)
Stars: ✭ 38 (-61.22%)
Mutual labels:  cvpr2021
FixBi
FixBi: Bridging Domain Spaces for Unsupervised Domain Adaptation (CVPR 2021)
Stars: ✭ 48 (-51.02%)
Mutual labels:  cvpr2021
Modaily-Aware-Audio-Visual-Video-Parsing
Code for CVPR 2021 paper Exploring Heterogeneous Clues for Weakly-Supervised Audio-Visual Video Parsing
Stars: ✭ 19 (-80.61%)
Mutual labels:  cvpr2021
BLIP
Official Implementation of CVPR2021 paper: Continual Learning via Bit-Level Information Preserving
Stars: ✭ 33 (-66.33%)
Mutual labels:  cvpr2021
SkeletonMerger
Code repository for paper `Skeleton Merger: an Unsupervised Aligned Keypoint Detector`.
Stars: ✭ 49 (-50%)
Mutual labels:  cvpr2021

Involution: Inverting the Inherence of Convolution for Visual Recognition

License: MIT

Unofficial PyTorch reimplementation of the paper Involution: Inverting the Inherence of Convolution for Visual Recognition by Duo Li, Jie Hu, Changhu Wang et al. published at CVPR 2021.

This repository includes a pure PyTorch implementation of a 2D and 3D involution.

Please note that the official implementation provides a more memory efficient CuPy implementation of the 2D involution. Additionally, shikishima-TasakiLab provides a fast and memory efficent CUDA implementation of the 2D Involution.

Installation

The 2D and 3D involution can be easily installed by using pip.

pip install git+https://github.com/ChristophReich1996/Involution

Example Usage

Additional examples, such as strided involutions or transposed convolution like involutions, can be found in the example.py file.

The 2D involution can be used as a nn.Module as follows:

import torch
from involution import Involution2d

involution = Involution2d(in_channels=32, out_channels=64)
output = involution(torch.rand(1, 32, 128, 128))

The 2D involution takes the following parameters.

Parameter Description Type
in_channels Number of input channels int
out_channels Number of output channels int
sigma_mapping Non-linear mapping as introduced in the paper. If none BN + ReLU is utilized (default=None) Optional[nn.Module]
kernel_size Kernel size to be used (default=(7, 7)) Union[int, Tuple[int, int]]
stride Stride factor to be utilized (default=(1, 1)) Union[int, Tuple[int, int]]
groups Number of groups to be employed (default=1) int
reduce_ratio Reduce ration of involution channels (default=1) int
dilation Dilation in unfold to be employed (default=(1, 1)) Union[int, Tuple[int, int]]
padding Padding to be used in unfold operation (default=(3, 3)) Union[int, Tuple[int, int]]
bias If true bias is utilized in each convolution layer (default=False) bool
force_shape_match If true potential shape mismatch is solved by performing avg pool (default=False) bool
**kwargs Unused additional key word arguments Any

The 3D involution can be used as a nn.Module as follows:

import torch
from involution import Involution3d

involution = Involution3d(in_channels=8, out_channels=16)
output = involution(torch.rand(1, 8, 32, 32, 32))

The 3D involution takes the following parameters.

Parameter Description Type
in_channels Number of input channels int
out_channels Number of output channels int
sigma_mapping Non-linear mapping as introduced in the paper. If none BN + ReLU is utilized Optional[nn.Module]
kernel_size Kernel size to be used (default=(7, 7, 7)) Union[int, Tuple[int, int, int]]
stride Stride factor to be utilized (default=(1, 1, 1)) Union[int, Tuple[int, int, int]]
groups Number of groups to be employed (default=1) int
reduce_ratio Reduce ration of involution channels (default=1) int
dilation Dilation in unfold to be employed (default=(1, 1, 1)) Union[int, Tuple[int, int, int]]
padding Padding to be used in unfold operation (default=(3, 3, 3)) Union[int, Tuple[int, int, int]]
bias If true bias is utilized in each convolution layer (default=False) bool
force_shape_match If true potential shape mismatch is solved by performing avg pool (default=False) bool
**kwargs Unused additional key word arguments Any

Reference

@inproceedings{Li2021,
    author = {Li, Duo and Hu, Jie and Wang, Changhu and Li, Xiangtai and She, Qi and Zhu, Lei and Zhang, Tong and Chen, Qifeng},
    title = {Involution: Inverting the Inherence of Convolution for Visual Recognition},
    booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
    month = {June},
    year = {2021}
}
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].