HyperAIHyperAI

Command Palette

Search for a command to run...

3 months ago

DAT++: Spatially Dynamic Vision Transformer with Deformable Attention

Zhuofan Xia Xuran Pan Shiji Song Li Erran Li Gao Huang

DAT++: Spatially Dynamic Vision Transformer with Deformable Attention

Abstract

Transformers have shown superior performance on various vision tasks. Their large receptive field endows Transformer models with higher representation power than their CNN counterparts. Nevertheless, simply enlarging the receptive field also raises several concerns. On the one hand, using dense attention in ViT leads to excessive memory and computational cost, and features can be influenced by irrelevant parts that are beyond the region of interests. On the other hand, the handcrafted attention adopted in PVT or Swin Transformer is data agnostic and may limit the ability to model long-range relations. To solve this dilemma, we propose a novel deformable multi-head attention module, where the positions of key and value pairs in self-attention are adaptively allocated in a data-dependent way. This flexible scheme enables the proposed deformable attention to dynamically focus on relevant regions while maintains the representation power of global attention. On this basis, we present Deformable Attention Transformer (DAT), a general vision backbone efficient and effective for visual recognition. We further build an enhanced version DAT++. Extensive experiments show that our DAT++ achieves state-of-the-art results on various visual recognition benchmarks, with 85.9% ImageNet accuracy, 54.5 and 47.0 MS-COCO instance segmentation mAP, and 51.5 ADE20K semantic segmentation mIoU.

Code Repositories

leaplabthu/dat
Official
pytorch
Mentioned in GitHub

Benchmarks

BenchmarkMethodologyMetrics
image-classification-on-imagenetDAT-S++
GFLOPs: 9.4
Number of params: 53M
Top 1 Accuracy: 84.6%
image-classification-on-imagenetDAT-T++
GFLOPs: 4.3
Number of params: 24M
Top 1 Accuracy: 83.9%
image-classification-on-imagenetDAT-B++ (224x224)
GFLOPs: 16.6
Number of params: 93M
Top 1 Accuracy: 84.9%
image-classification-on-imagenetDAT-B++ (384x384)
GFLOPs: 49.7
Number of params: 94M
Top 1 Accuracy: 85.9%
object-detection-on-coco-2017DAT-T++
AP: 49.2
object-detection-on-coco-2017DAT-S++
AP: 50.2
semantic-segmentation-on-ade20kDAT-S++
Validation mIoU: 51.2
semantic-segmentation-on-ade20kDAT-T++
Validation mIoU: 50.3
semantic-segmentation-on-ade20kDAT-B++
Validation mIoU: 51.5

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