Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
MengzhangLI a68e7c2823 | 1 year ago | |
---|---|---|
.. | ||
README.md | 1 year ago | |
fpn_poolformer_m36_8x4_512x512_40k_ade20k.py | 1 year ago | |
fpn_poolformer_m48_8x4_512x512_40k_ade20k.py | 1 year ago | |
fpn_poolformer_s12_8x4_512x512_40k_ade20k.py | 1 year ago | |
fpn_poolformer_s24_8x4_512x512_40k_ade20k.py | 1 year ago | |
fpn_poolformer_s36_8x4_512x512_40k_ade20k.py | 1 year ago | |
poolformer.yml | 1 year ago |
MetaFormer is Actually What You Need for Vision
Transformers have shown great potential in computer vision tasks. A common belief is their attention-based token mixer module contributes most to their competence. However, recent works show the attention-based module in transformers can be replaced by spatial MLPs and the resulted models still perform quite well. Based on this observation, we hypothesize that the general architecture of the transformers, instead of the specific token mixer module, is more essential to the model's performance. To verify this, we deliberately replace the attention module in transformers with an embarrassingly simple spatial pooling operator to conduct only the most basic token mixing. Surprisingly, we observe that the derived model, termed as PoolFormer, achieves competitive performance on multiple computer vision tasks. For example, on ImageNet-1K, PoolFormer achieves 82.1% top-1 accuracy, surpassing well-tuned vision transformer/MLP-like baselines DeiT-B/ResMLP-B24 by 0.3%/1.1% accuracy with 35%/52% fewer parameters and 48%/60% fewer MACs. The effectiveness of PoolFormer verifies our hypothesis and urges us to initiate the concept of "MetaFormer", a general architecture abstracted from transformers without specifying the token mixer. Based on the extensive experiments, we argue that MetaFormer is the key player in achieving superior results for recent transformer and MLP-like models on vision tasks. This work calls for more future research dedicated to improving MetaFormer instead of focusing on the token mixer modules. Additionally, our proposed PoolFormer could serve as a starting baseline for future MetaFormer architecture design. Code is available at this https URL
@inproceedings{yu2022metaformer,
title={Metaformer is actually what you need for vision},
author={Yu, Weihao and Luo, Mi and Zhou, Pan and Si, Chenyang and Zhou, Yichen and Wang, Xinchao and Feng, Jiashi and Yan, Shuicheng},
booktitle={Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition},
pages={10819--10829},
year={2022}
}
pip install mmcls>=0.23.0
Method | Backbone | Crop Size | pretrain | Batch Size | Lr schd | Mem (GB) | Inf time (fps) | mIoU | mIoU(ms+flip) | mIoU* | mIoU*(ms+flip) | config | download |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
FPN | PoolFormer-S12 | 512x512 | ImageNet-1K | 32 | 40000 | 4.17 | 23.48 | 36.68 | 38.22 | 37.07 | 38.44 | config | model | log |
FPN | PoolFormer-S24 | 512x512 | ImageNet-1K | 32 | 40000 | 5.47 | 15.74 | 40.12 | 40.97 | 40.36 | 41.08 | config | model | log |
FPN | PoolFormer-S36 | 512x512 | ImageNet-1K | 32 | 40000 | 6.77 | 11.34 | 41.61 | 42.61 | 41.81 | 42.72 | config | model | log |
FPN | PoolFormer-M36 | 512x512 | ImageNet-1K | 32 | 40000 | 8.59 | 8.97 | 41.95 | 43.24 | 42.35 | 43.34 | config | model | log |
FPN | PoolFormer-M48 | 512x512 | ImageNet-1K | 32 | 40000 | 10.48 | 6.69 | 42.43 | 43.60 | 42.76 | 43.57 | config | model | log |
Note:
We replace AlignedResize
in original PoolFormer implementation to Resize + ResizeToMultiple
.
mIoU
with * is collected when Resize + ResizeToMultiple
is adopted in test_pipeline
, so do mIoU
in logs.
No Description
Python Markdown Shell Dockerfile other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》