Skip to main content

Involution Operation - Pytorch

Project description

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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

involution_pytorch-0.0.2.2.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

involution_pytorch-0.0.2.2-py3-none-any.whl (3.9 kB view details)

Uploaded Python 3

File details

Details for the file involution_pytorch-0.0.2.2.tar.gz.

File metadata

  • Download URL: involution_pytorch-0.0.2.2.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for involution_pytorch-0.0.2.2.tar.gz
Algorithm Hash digest
SHA256 983fc96d6eaeeab10f9293c9ee23f1b320ab86d998b15398fef2c30d97b61bf7
MD5 f4f76d7bc325dd01a8e5a380ccb05813
BLAKE2b-256 1b4e0f32b3fb362dd04f6f00ad36732895156a8f085c4d0a5c9695bb05bd97a5

See more details on using hashes here.

File details

Details for the file involution_pytorch-0.0.2.2-py3-none-any.whl.

File metadata

  • Download URL: involution_pytorch-0.0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 3.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.2 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.60.0 CPython/3.6.13

File hashes

Hashes for involution_pytorch-0.0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 206910f731619a67a4351876d472ca74e3a9aa67a26206fed9199b13ebd7429d
MD5 5f5e0b01827f4ee176f004ca0c7438d2
BLAKE2b-256 5c8a35a17bdebea7f3e02a13996957f7ad0cc0c0960a550bb3902cf5a97bfbae

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page