#500 · Primary category: Computer Vision

GFNet

computer-vision deep-learning image-classification image-recognition vision-transformer

[NeurIPS 2021] [T-PAMI] Global Filter Networks for Image Classification

Project last updated:06/12/23

GitHub Stars

511

Forks

47

Contributors

3

License

MIT

Why we included this project

Most vision transformers pay for self-attention's quadratic cost, but GFNet offers a cheaper route: it swaps the attention layer for a global filter that works in the frequency domain with the FFT. That keeps long-range spatial dependencies within reach at log-linear cost, which matters when you are working with high-resolution feature maps in a small ViT-style network. The repo ships ImageNet-pretrained checkpoints from a 7M-parameter tiny model up to a 54M-parameter large one, each with its top-1 accuracy listed, so you can size your choice to your compute budget. Since the code follows the familiar timm and DeiT conventions, it slots into existing PyTorch training setups with little friction. If you want to experiment with Fourier-based token mixing, the GlobalFilter layer is compact enough to lift straight into your own architectures.

Articles for this project

No articles for this project yet.

To suggest a topic or contribute an article, contact us.

Related projects in this category