
摘要
Transformer 在计算机视觉领域引起了越来越多的关注,但其性能仍落后于当前最先进的卷积神经网络。本文指出,尽管 Transformer 通常具备更大的模型容量,但由于缺乏合适的归纳偏置(inductive bias),其泛化能力可能反而不如卷积网络。为有效融合两类架构的优势,我们提出了 CoAtNets(发音为“coat nets”),这是一类基于两个关键洞察的混合模型:(1)通过简单的相对注意力机制,深度可分离卷积(depthwise convolution)与自注意力机制可自然统一;(2)以合理的方式垂直堆叠卷积层与注意力层,出人意料地显著提升了模型的泛化能力、容量与效率。实验结果表明,在多种数据集和不同资源约束条件下,CoAtNets 均取得了当前最优的性能表现:在不依赖额外数据的情况下,CoAtNet 在 ImageNet 上实现了 86.0% 的 top-1 准确率;当使用来自 ImageNet-21K 的 1300 万张图像进行预训练时,CoAtNet 达到 88.56% 的 top-1 准确率,与使用 JFT-300M 数据集(3 亿张图像)预训练的 ViT-Huge 模型性能相当,但所用数据量仅为后者的 1/23;尤为突出的是,当进一步在 JFT-3B 数据集上扩展 CoAtNet 时,其在 ImageNet 上的 top-1 准确率提升至 90.88%,创造了新的 SOTA(state-of-the-art)纪录。
代码仓库
chinhsuanwu/coatnet-pytorch
pytorch
GitHub 中提及
tyeso/Image_Classification_with_CoAtNet_and_ResNet18
pytorch
GitHub 中提及
rwightman/pytorch-image-models
pytorch
GitHub 中提及
hw666666666666/CoAtNet
mindspore
LongLeCE/CoAtNet-PyTorch
pytorch
GitHub 中提及
Burf/CoAtNet-Tensorflow2
tf
GitHub 中提及
nqt228/CoAtNet-tensorflow
tf
GitHub 中提及
canturan10/satellighte
pytorch
pranavsinghps1/dedl
pytorch
GitHub 中提及
Mind23-2/MindCode-19
mindspore
基准测试
| 基准 | 方法 | 指标 |
|---|---|---|
| image-classification-on-gashissdb | CoAtNet-1 | Accuracy: 98.74 F1-Score: 99.38 Precision: 99.97 |
| image-classification-on-imagenet | CoAtNet-1 | GFLOPs: 8.4 Number of params: 42M Top 1 Accuracy: 83.3% |
| image-classification-on-imagenet | CoAtNet-2 | GFLOPs: 15.7 Number of params: 75M Top 1 Accuracy: 84.1% |
| image-classification-on-imagenet | CoAtNet-3 (21k) | Top 1 Accuracy: 87.6% |
| image-classification-on-imagenet | CoAtNet-3 @384 | GFLOPs: 114 Top 1 Accuracy: 88.52% |
| image-classification-on-imagenet | CoAtNet-3 | GFLOPs: 34.7 Number of params: 168M Top 1 Accuracy: 84.5% |
| image-classification-on-imagenet | CoAtNet-0 | GFLOPs: 4.2 Number of params: 25M Top 1 Accuracy: 81.6% |
| image-classification-on-imagenet | CoAtNet-2 (21k) | Top 1 Accuracy: 87.1% |