timm documentation
RepViT
快速入门
教程
模型页面
模型系列结果
卷积网络
视觉 Transformer
混合卷积 / 注意力网络
高效与移动网络
CPUBoneEdgeNeXtEfficientFormerEfficientFormer-V2EfficientNetEfficientViMEfficientViT(MIT)EfficientViT(MSRA)FasterNetFastViTGhostNetHardCoRe-NASiFormerLowFormerMobileNet-V3MobileViTPP-LCNetV2RepGhostRepViTReXNetSHViTStarNetSwiftFormer
MLP 及其他 token 混合器
多模态模型的视觉编码器
参考
RepViT
类别: Efficient/Mobile · 代码: timm/models/repvit.py · 架构: 8 · 预训练权重: 13(13 个具有 ImageNet-1k 结果)
RepViT 是一种移动 CNN,它将轻量级视觉 Transformer 的设计选择引入到 MobileNet-V3 风格的块中,并采用结构重参数化。
论文
用法
请参阅快速入门了解如何加载预训练权重、进行图像预处理和微调,以及查阅特征提取了解如何将模型用作骨干网络。
>>> import timm
>>> model = timm.create_model('repvit_m2_3.dist_300e_in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)模型 API 支持
✓ 支持,✓ (square) 仅支持方形尺寸,✗ 不支持,– 无需支持(模型本身已接受任意输入尺寸)。通过在每个功能上运行随机初始化的模型(RepVit 使用 repvit_m1,尺寸为 224)进行验证,预期同一类的其他架构表现相同。详情请参阅 Model API 页面。
架构
| 架构 | 参数(M) | GMAC | 输入大小 | 预训练权重 |
|---|---|---|---|---|
repvit_m0_9 | 5.07 | 0.82 | 224 | 2 |
repvit_m1 | 5.07 | 0.82 | 224 | 1 |
repvit_m1_0 | 6.81 | 1.11 | 224 | 2 |
repvit_m1_1 | 8.24 | 1.34 | 224 | 2 |
repvit_m1_5 | 14.05 | 2.27 | 224 | 2 |
repvit_m2 | 8.24 | 1.34 | 224 | 1 |
repvit_m2_3 | 22.93 | 4.52 | 224 | 2 |
repvit_m3 | 10.12 | 1.86 | 224 | 1 |
GMACs 和参数量对应于每种架构的默认输入大小和分类器,数据来自基准测试结果。
预训练权重
Top-1 是 results-imagenet.csv 中在所列评估规模下的 ImageNet-1k 验证准确率,- 表示该权重没有 ImageNet-1k 结果(例如预训练权重或图文权重)。Classes 是预训练分类器的大小,对于没有分类器的权重则为 none。
| 权重 | 输入大小 | Top-1(%) | 评估大小 | 类 | 许可证 | Hub |
|---|---|---|---|---|---|---|
repvit_m0_9.dist_300e_in1k | 224 | 78.652 | 224 | 1000 | apache-2.0 | timm |
repvit_m0_9.dist_450e_in1k | 224 | 79.058 | 224 | 1000 | apache-2.0 | timm |
repvit_m1.dist_in1k | 224 | 78.542 | 224 | 1000 | apache-2.0 | timm |
repvit_m1_0.dist_300e_in1k | 224 | 80.152 | 224 | 1000 | apache-2.0 | timm |
repvit_m1_0.dist_450e_in1k | 224 | 80.430 | 224 | 1000 | apache-2.0 | timm |
repvit_m1_1.dist_300e_in1k | 224 | 80.826 | 224 | 1000 | apache-2.0 | timm |
repvit_m1_1.dist_450e_in1k | 224 | 81.314 | 224 | 1000 | apache-2.0 | timm |
repvit_m1_5.dist_300e_in1k | 224 | 82.382 | 224 | 1000 | apache-2.0 | timm |
repvit_m1_5.dist_450e_in1k | 224 | 82.520 | 224 | 1000 | apache-2.0 | timm |
repvit_m2.dist_in1k | 224 | 80.468 | 224 | 1000 | apache-2.0 | timm |
repvit_m2_3.dist_300e_in1k | 224 | 83.524 | 224 | 1000 | apache-2.0 | timm |
repvit_m2_3.dist_450e_in1k | 224 | 83.746 | 224 | 1000 | apache-2.0 | timm |
repvit_m3.dist_in1k | 224 | 81.494 | 224 | 1000 | apache-2.0 | timm |
引用
@misc{wang2023repvit,
title={RepViT: Revisiting Mobile CNN From ViT Perspective},
author={Ao Wang and Hui Chen and Zijia Lin and Hengjun Pu and Guiguang Ding},
year={2023},
eprint={2307.09283},
archivePrefix={arXiv},
primaryClass={cs.CV}
}