HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

TransNeXt: Robust Foveal Visual Perception for Vision Transformers

Dai Shi

TransNeXt: Robust Foveal Visual Perception for Vision Transformers

Abstract

Due to the depth degradation effect in residual connections, many efficient Vision Transformers models that rely on stacking layers for information exchange often fail to form sufficient information mixing, leading to unnatural visual perception. To address this issue, in this paper, we propose Aggregated Attention, a biomimetic design-based token mixer that simulates biological foveal vision and continuous eye movement while enabling each token on the feature map to have a global perception. Furthermore, we incorporate learnable tokens that interact with conventional queries and keys, which further diversifies the generation of affinity matrices beyond merely relying on the similarity between queries and keys. Our approach does not rely on stacking for information exchange, thus effectively avoiding depth degradation and achieving natural visual perception. Additionally, we propose Convolutional GLU, a channel mixer that bridges the gap between GLU and SE mechanism, which empowers each token to have channel attention based on its nearest neighbor image features, enhancing local modeling capability and model robustness. We combine aggregated attention and convolutional GLU to create a new visual backbone called TransNeXt. Extensive experiments demonstrate that our TransNeXt achieves state-of-the-art performance across multiple model sizes. At a resolution of $224^2$, TransNeXt-Tiny attains an ImageNet accuracy of 84.0%, surpassing ConvNeXt-B with 69% fewer parameters. Our TransNeXt-Base achieves an ImageNet accuracy of 86.2% and an ImageNet-A accuracy of 61.6% at a resolution of $384^2$, a COCO object detection mAP of 57.1, and an ADE20K semantic segmentation mIoU of 54.7.

Code Repositories

daishiresearch/transnext
Official
pytorch
Mentioned in GitHub
Westlake-AI/openmixup
pytorch
Mentioned in GitHub
chenller/mmseg-extension
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
domain-generalization-on-imagenet-aTransNeXt-Base (IN-1K supervised, 224)
Number of params: 89.7M
Top-1 accuracy %: 50.6
domain-generalization-on-imagenet-aTransNeXt-Small (IN-1K supervised, 224)
Number of params: 49.7M
Top-1 accuracy %: 47.1
domain-generalization-on-imagenet-aTransNeXt-Small (IN-1K supervised, 384)
Number of params: 49.7M
Top-1 accuracy %: 58.3
domain-generalization-on-imagenet-aTransNeXt-Base (IN-1K supervised, 384)
Number of params: 89.7M
Top-1 accuracy %: 61.6
image-classification-on-imagenetTransNeXt-Micro (IN-1K supervised, 224)
GFLOPs: 2.7
Number of params: 12.8M
Top 1 Accuracy: 82.5%
image-classification-on-imagenetTransNeXt-Small (IN-1K supervised, 384)
GFLOPs: 32.1
Number of params: 49.7M
Top 1 Accuracy: 86.0%
image-classification-on-imagenetTransNeXt-Base (IN-1K supervised, 384)
GFLOPs: 56.3
Number of params: 89.7M
Top 1 Accuracy: 86.2%
image-classification-on-imagenetTransNeXt-Small (IN-1K supervised, 224)
GFLOPs: 10.3
Number of params: 49.7M
Top 1 Accuracy: 84.7%
image-classification-on-imagenetTransNeXt-Tiny (IN-1K supervised, 224)
GFLOPs: 5.7
Number of params: 28.2M
Top 1 Accuracy: 84.0%
object-detection-on-coco-minivalTransNeXt-Tiny (IN-1K pretrain, DINO 1x)
box AP: 55.7
object-detection-on-coco-minivalTransNeXt-Base (IN-1K pretrain, DINO 1x)
box AP: 57.1
object-detection-on-coco-minivalTransNeXt-Small (IN-1K pretrain, DINO 1x)
box AP: 56.6
semantic-segmentation-on-ade20kTransNeXt-Base (IN-1K pretrain, Mask2Former, 512)
Params (M): 109
Validation mIoU: 54.7
semantic-segmentation-on-ade20kTransNeXt-Tiny (IN-1K pretrain, Mask2Former, 512)
Params (M): 47.5
Validation mIoU: 53.4
semantic-segmentation-on-ade20kTransNeXt-Small (IN-1K pretrain, Mask2Former, 512)
Params (M): 69
Validation mIoU: 54.1

Build AI with AI

From idea to launch — accelerate your AI development with free AI co-coding, out-of-the-box environment and best price of GPUs.

AI Co-coding
Ready-to-use GPUs
Best Pricing
Get Started

Hyper Newsletters

Subscribe to our latest updates
We will deliver the latest updates of the week to your inbox at nine o'clock every Monday morning
Powered by MailChimp