arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2203.11926cs.CVcs.AIcs.LG
收藏

聚焦调制网络

Focal Modulation Networks

Microsoft Research(微软研究院);Microsoft Cloud + AI(微软云计算与人工智能部门)

Jianwei Yang, Chunyuan Li, Xiyang Dai, Lu Yuan, Jianfeng Gao

摘要:

我们提出了焦点调制网络(简称FocalNets),其中自我注意力(SA)完全被焦点调制机制所取代,用于对视觉中的令牌交互进行建模。焦点调制包括三个组件:(i)使用深度卷积层的堆栈实现的分层上下文化,以从短到长范围编码视觉上下文,(ii)门控聚合,以基于其内容选择性地收集每个查询令牌的上下文,以及(iii)元素调制或仿射变换,以将聚合的上下文注入查询。广泛的实验表明,FocalNets的性能优于最先进的SA对应物(例如,Swin和Focal Transformers)在图像分类、目标检测和分割任务上具有相似的计算成本。具体来说,具有微小和基本尺寸的FocalNets在ImageNet-1 K上实现了82.3%和83.9%的top-1准确率。在ImageNet-22 K上以224分辨率进行预训练后,当以224和384分辨率进行微调时,它分别达到了86.5%和87.3%的top-1准确率。当转移到下游任务时,FocalNets表现出明显的优势。对于使用Mask R-CNN的目标检测,使用1个\times训练的FocalNet基础比Swin对手高出2.1个点,并且已经超过了使用3个\times时间表训练的Swin(49.0 vs. 48.5)。对于使用UPerNet的语义分割,FocalNet在单尺度下的性能优于Swin 2.4,在多尺度下优于Swin(50.5 vs. 49.7)。使用大型FocalNet和Mask 2former,我们为ADE 20 K语义分割实现了58.5 mIoU,为COCO全景分割实现了57.9 PQ。使用巨大的FocalNet和DINO,我们在COCO minival和test-dev上分别实现了64.3和64.4 mAP,在更大的基于注意力的模型(如Swinv 2-G和BEIT-3)之上建立了新的SoTA。代码和检查点可在https://github.com/microsoft/FocalNet上获得。

英文摘要:

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 1\times outperforms the Swin counterpart by 2.1 points and already surpasses Swin trained with 3\times schedule (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.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑