Visual Attention Network

20 Feb 2022  ยท  Meng-Hao Guo, Cheng-Ze Lu, Zheng-Ning Liu, Ming-Ming Cheng, Shi-Min Hu ยท

While originally designed for natural language processing tasks, the self-attention mechanism has recently taken various computer vision areas by storm. However, the 2D nature of images brings three challenges for applying self-attention in computer vision. (1) Treating images as 1D sequences neglects their 2D structures. (2) The quadratic complexity is too expensive for high-resolution images. (3) It only captures spatial adaptability but ignores channel adaptability. In this paper, we propose a novel linear attention named large kernel attention (LKA) to enable self-adaptive and long-range correlations in self-attention while avoiding its shortcomings. Furthermore, we present a neural network based on LKA, namely Visual Attention Network (VAN). While extremely simple, VAN surpasses similar size vision transformers(ViTs) and convolutional neural networks(CNNs) in various tasks, including image classification, object detection, semantic segmentation, panoptic segmentation, pose estimation, etc. For example, VAN-B6 achieves 87.8% accuracy on ImageNet benchmark and set new state-of-the-art performance (58.2 PQ) for panoptic segmentation. Besides, VAN-B2 surpasses Swin-T 4% mIoU (50.1 vs. 46.1) for semantic segmentation on ADE20K benchmark, 2.6% AP (48.8 vs. 46.2) for object detection on COCO dataset. It provides a novel method and a simple yet strong baseline for the community. Code is available at https://github.com/Visual-Attention-Network.

PDF Abstract
Task Dataset Model Metric Name Metric Value Global Rank Result Benchmark
Semantic Segmentation ADE20K VAN-Large Validation mIoU 48.1 # 144
Params (M) 49 # 51
Semantic Segmentation ADE20K VAN-Tiny Validation mIoU 38.5 # 215
Params (M) 8 # 63
Semantic Segmentation ADE20K VAN-Small Validation mIoU 42.9 # 207
Params (M) 18 # 59
Semantic Segmentation ADE20K VAN-B6 Validation mIoU 54.7 # 50
Semantic Segmentation ADE20K VAN-Base (Semantic-FPN) Validation mIoU 46.7 # 166
Semantic Segmentation ADE20K VAN-Large (HamNet) Validation mIoU 50.2 # 112
Params (M) 55 # 49
Panoptic Segmentation COCO minival Visual Attention Network (VAN-B6 + Mask2Former) PQ 58.2 # 7
PQth 64.8 # 4
PQst 48.2 # 8
Panoptic Segmentation COCO panoptic VAN-B6* PQ 58.2 # 1
Image Classification ImageNet VAN-B1 Top 1 Accuracy 81.1% # 661
Number of params 13.9M # 544
GFLOPs 2.5 # 165
Image Classification ImageNet VAN-B0 Top 1 Accuracy 75.4% # 948
Number of params 4.1M # 418
GFLOPs 0.9 # 101
Image Classification ImageNet VAN-B2 Top 1 Accuracy 82.8% # 496
Number of params 26.6M # 651
GFLOPs 5 # 241
Image Classification ImageNet VAN-B5 (22K, 384res) Top 1 Accuracy 87% # 119
GFLOPs 50.6 # 471
Image Classification ImageNet VAN-B6 (22K, 384res) Top 1 Accuracy 87.8% # 76
Number of params 200M # 965
GFLOPs 114.3 # 507
Image Classification ImageNet VAN-B4 (22K) Top 1 Accuracy 85.7% # 212
GFLOPs 12.2 # 340
Image Classification ImageNet VAN-B6 (22K) Top 1 Accuracy 86.9% # 122
Number of params 200M # 965
GFLOPs 38.9 # 455
Image Classification ImageNet VAN-B4 (22K, 384res) Top 1 Accuracy 86.6% # 140
Number of params 60M # 812
GFLOPs 35.9 # 445
Image Classification ImageNet VAN-B5 (22K) Top 1 Accuracy 86.3% # 162
Number of params 90M # 905
GFLOPs 17.2 # 387

Methods