Focal Modulation Networks
Jianwei Yang, Chunyuan Li, Xiyang Dai, Jianfeng Gao
摘要
We propose focal modulation networks (FocalNets in short), where self-attention (SA) is completely replaced by a focal modulation mechanism for modeling token interactions in vision. Focal modulation comprises three components: (i) hierarchical contextualization, implemented using a stack of depth-wise convolutional layers, to encode visual contexts from short to long ranges, (ii) gated aggregation to selectively gather contexts for each query token based on its content, and (iii) element-wise modulation or affine transformation to inject the aggregated context into the query. Extensive experiments show FocalNets outperform the state-of-the-art SA counterparts (e.g., Swin and Focal Transformers) with similar computational costs on the tasks of image classification, object detection, and segmentation. Specifically, FocalNets with tiny and base size achieve 82.3% and 83.9% top-1 accuracy on ImageNet-1K. After pretrained on ImageNet-22K in 224 resolution, it attains 86.5% and 87.3% top-1 accuracy when finetuned with resolution 224 and 384, respectively. When transferred to downstream tasks, FocalNets exhibit clear superiority. For object detection with Mask R-CNN, FocalNet base trained with 1outperforms the Swin counterpart by 2.1 points and already surpasses Swin trained with 3schedule (49.0 v.s. 48.5). For semantic segmentation with UPerNet, FocalNet base at single-scale outperforms Swin by 2.4, and beats Swin at multi-scale (50.5 v.s. 49.7). Using large FocalNet and Mask2former, we achieve 58.5 mIoU for ADE20K semantic segmentation, and 57.9 PQ for COCO Panoptic Segmentation. Using huge FocalNet and DINO, we achieved 64.3 and 64.4 mAP on COCO minival and test-dev, respectively, establishing new SoTA on top of much larger attention-based models like Swinv2-G and BEIT-3. Code and checkpoints are available at https://github.com/microsoft/FocalNet.
问 Lune
几分钟读透这篇 Paper,不用再花一下午。
Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。
已有 72 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。
脉络
- HorNet: Efficient High-Order Spatial Interactions with Recursive Gated Convolutions 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- HorNet: Efficient High-Order Spatial Interactions with Recursive Gated Convolutions 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- HorNet: Efficient High-Order Spatial Interactions with Recursive Gated Convolutions 引用了 Training data-efficient image transformers & distillation through attention
- InceptionNeXt: When Inception Meets ConvNeXt 引用了 HorNet: Efficient High-Order Spatial Interactions with Recursive Gated Convolutions
- InceptionNeXt: When Inception Meets ConvNeXt 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- InceptionNeXt: When Inception Meets ConvNeXt 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- InceptionNeXt: When Inception Meets ConvNeXt 引用了 Training data-efficient image transformers & distillation through attention
- DETRs with Collaborative Hybrid Assignments Training 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- DETRs with Collaborative Hybrid Assignments Training 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- DETRs with Collaborative Hybrid Assignments Training 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Training data-efficient image transformers & distillation through attention
- Swin Transformer: Hierarchical Vision Transformer using Shifted Windows 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
- Training data-efficient image transformers & distillation through attention 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
- SegFormer: Simple and Efficient Design for Semantic Segmentation with Transformers 引用了 Swin Transformer: Hierarchical Vision Transformer using Shifted Windows
- DETRs Beat YOLOs on Real-time Object Detection 引用了 DETRs with Collaborative Hybrid Assignments Training
- DETRs Beat YOLOs on Real-time Object Detection 引用了 Deformable DETR: Deformable Transformers for End-to-End Object Detection
引用它的顶会 Paper72
- DETRs Beat YOLOs on Real-time Object DetectionYian Zhao, Wenyu Lv, Shangliang Xu, Jinman Wei 等CVPR 2024 · 3,046 次引用
- Segment Everything Everywhere All at OnceXueyan Zou, Jianwei Yang, Hao Zhang, Feng Li 等NeurIPS 2023 · 889 次引用
- DETRs with Collaborative Hybrid Assignments TrainingZhuofan Zong, Guanglu Song, Yu LiuICCV 2023 · 594 次引用
- HorNet: Efficient High-Order Spatial Interactions with Recursive Gated ConvolutionsYongming Rao, Wenliang Zhao, Yansong Tang, Jie Zhou 等NeurIPS 2022 · 422 次引用
- InceptionNeXt: When Inception Meets ConvNeXtWeihao Yu, Pan Zhou, Shuicheng Yan, Xinchao WangCVPR 2024 · 326 次引用
它引用的 Paper51
- Swin Transformer: Hierarchical Vision Transformer using Shifted WindowsZe Liu, Yutong Lin, Yue Cao, Han Hu 等ICCV 2021 · 31,683 次引用
- An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
- SegFormer: Simple and Efficient Design for Semantic Segmentation with TransformersEnze Xie, Wenhai Wang, Zhiding Yu, Anima Anandkumar 等NeurIPS 2021 · 9,661 次引用
- Training data-efficient image transformers & distillation through attentionHugo Touvron, Matthieu Cord, Matthijs Douze, Francisco Massa 等ICML 2021 · 8,974 次引用
- Deformable DETR: Deformable Transformers for End-to-End Object DetectionXizhou Zhu, Weijie Su, Lewei Lu, Bin Li 等ICLR 2021 · 7,353 次引用
相关 Paper
- Focal Attention for Long-Range Interactions in Vision TransformersJianwei Yang, Chunyuan Li, Pengchuan Zhang, Xiyang Dai 等NeurIPS 2021 · 228 次引用
- Scale-Aware Modulation Meet TransformerWeifeng Lin, Ziheng Wu, Jiayu Chen, Jun Huang 等ICCV 2023 · 154 次引用
- Global Context Vision TransformersAli Hatamizadeh, Hongxu Yin, Greg Heinrich, Jan Kautz 等ICML 2023 · 213 次引用
- A ConvNet for the 2020sZhuang Liu, Hanzi Mao, Chao-Yuan Wu, Christoph Feichtenhofer 等CVPR 2022 · 6,782 次引用
- HiViT: A Simpler and More Efficient Design of Hierarchical Vision TransformerXiaosong Zhang, Yunjie Tian, Lingxi Xie, Wei Huang 等ICLR 2023
