timm documentation

MobileNet-V3

Hugging Face's logo
Join the Hugging Face community

and get access to the augmented documentation experience

to get started

MobileNet-V3

类别: Efficient/Mobile · 代码: timm/models/mobilenetv3.py · 架构: 33 · 预训练权重: 45(其中 39 个包含 ImageNet-1k 结果)

MobileNet-V3 以及基于同一 MobileNetV3 类构建的相关网络:MobileNet-V4、LCNet(PP-LCNet)、FBNet-V3 以及 TensorFlow 移植的 MobileNet-V3 权重(tf_*)。

论文

用法

请参阅快速入门了解如何加载预训练权重、进行图像预处理和微调,以及查阅特征提取了解如何将模型用作骨干网络。

>>> import timm
>>> model = timm.create_model('mobilenetv4_conv_aa_large.e230_r384_in12k_ft_in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)

模型 API 支持

功能MobileNetV3
features_only=True 特征图✓(步长 2、4、8、16、32)
forward_intermediates()✓
prune_intermediate_layers()✓
任意输入尺寸,无需更改✓
set_input_size()–
dynamic_img_size=True–
set_grad_checkpointing()✓
逐层学习率衰减(group_matcher())✓
reset_classifier()✓

✓ 支持,✓ (square) 仅支持方形尺寸,✗ 不支持,– 无需支持(模型本身已接受任意输入尺寸)。通过在每个功能上运行随机初始化的模型(MobileNetV3 使用 mobilenetv3_small_050,尺寸为 224)进行验证,预期同一类的其他架构表现相同。详情请参阅 Model API 页面。

架构

架构参数(M)GMAC输入大小预训练权重
fbnetv3_b8.600.422241
fbnetv3_d10.310.522241
fbnetv3_g16.621.282401
lcnet_0351.640.032240
lcnet_0501.880.052241
lcnet_0752.360.102241
lcnet_1002.950.162241
lcnet_1504.500.342240
mobilenetv3_large_0753.990.162240
mobilenetv3_large_1005.480.232244
mobilenetv3_large_150d14.621.032561
mobilenetv3_rw5.480.232241
mobilenetv3_small_0501.590.032241
mobilenetv3_small_0752.040.052241
mobilenetv3_small_1002.540.062241
mobilenetv4_conv_aa_large32.599.634484
mobilenetv4_conv_aa_medium9.721.582560
mobilenetv4_conv_blur_medium9.721.222241
mobilenetv4_conv_large32.596.433842
mobilenetv4_conv_medium9.721.102566
mobilenetv4_conv_small3.770.192243
mobilenetv4_conv_small_0351.910.052240
mobilenetv4_conv_small_0502.240.072241
mobilenetv4_hybrid_large37.767.773842
mobilenetv4_hybrid_large_07522.752.062560
mobilenetv4_hybrid_medium11.071.292565
mobilenetv4_hybrid_medium_0757.310.662240
tf_mobilenetv3_large_0753.990.162241
tf_mobilenetv3_large_1005.480.232241
tf_mobilenetv3_large_minimal_1003.920.222241
tf_mobilenetv3_small_0752.040.052241
tf_mobilenetv3_small_1002.540.062241
tf_mobilenetv3_small_minimal_1002.040.062241

GMACs 和参数量对应于每种架构的默认输入大小和分类器,数据来自基准测试结果。

预训练权重

Top-1 是 results-imagenet.csv 中在所列评估规模下的 ImageNet-1k 验证准确率,- 表示该权重没有 ImageNet-1k 结果(例如预训练权重或图文权重)。Classes 是预训练分类器的大小,对于没有分类器的权重则为 none。

权重按来源分组:预训练配置中给出的论文或来源,否则为 timm 以外的 Hub 组织,否则为预训练标签的第一部分(architecture.tag)。仅包含单个权重的来源列在 other 下。

ra2 标签

权重输入大小Top-1(%)评估大小类许可证Hub
fbnetv3_b.ra2_in1k224(测试 256)79.1542561000apache-2.0timm
fbnetv3_d.ra2_in1k224(测试 256)79.6822561000apache-2.0timm
fbnetv3_g.ra2_in1k240(测试 288)82.0342881000apache-2.0timm
lcnet_050.ra2_in1k22463.1382241000apache-2.0timm
lcnet_075.ra2_in1k22468.7862241000apache-2.0timm
lcnet_100.ra2_in1k22472.1302241000apache-2.0timm

ix 标签

权重输入大小Top-1(%)评估大小类许可证Hub
mobilenetv4_hybrid_large.ix_e600_r384_in1k384(测试 448)84.3524481000apache-2.0timm
mobilenetv4_hybrid_medium.ix_e550_r256_in1k256(测试 320)82.5003201000apache-2.0timm
mobilenetv4_hybrid_medium.ix_e550_r384_in1k384(测试 448)83.3904481000apache-2.0timm

lamb 标签

权重输入大小Top-1(%)评估大小类许可证Hub
mobilenetv3_small_050.lamb_in1k22457.9182241000apache-2.0timm
mobilenetv3_small_075.lamb_in1k22465.2842241000apache-2.0timm
mobilenetv3_small_100.lamb_in1k22467.6362241000apache-2.0timm

ra4 标签

权重输入大小Top-1(%)评估大小类许可证Hub
mobilenetv3_large_100.ra4_e3600_r224_in1k224(测试 256)77.1822561000apache-2.0timm
mobilenetv3_large_150d.ra4_e3600_r256_in1k256(测试 320)81.8323201000apache-2.0timm

面向大众的 ImageNet-21K 预训练

预训练配置引用了 面向大众的 ImageNet-21K 预训练。

权重输入大小Top-1(%)评估大小类许可证Hub
mobilenetv3_large_100.miil_in21k224--11221apache-2.0timm
mobilenetv3_large_100.miil_in21k_ft_in1k22477.9202241000apache-2.0timm

其他

权重输入大小Top-1(%)评估大小类许可证Hub
mobilenetv3_large_100.ra_in1k22475.7842241000apache-2.0timm
mobilenetv3_rw.rmsp_in1k22475.6162241000apache-2.0timm
mobilenetv4_conv_aa_large.e230_r384_in12k384(测试 448)--11821apache-2.0timm
mobilenetv4_conv_aa_large.e230_r384_in12k_ft_in1k384(测试 480)84.7724801000apache-2.0timm
mobilenetv4_conv_aa_large.e230_r448_in12k_ft_in1k448(测试 544)84.9905441000apache-2.0timm
mobilenetv4_conv_aa_large.e600_r384_in1k384(测试 480)83.8264801000apache-2.0timm
mobilenetv4_conv_blur_medium.e500_r224_in1k224(测试 256)80.1522561000apache-2.0timm
mobilenetv4_conv_large.e500_r256_in1k256(测试 320)82.6723201000apache-2.0timm
mobilenetv4_conv_large.e600_r384_in1k384(测试 448)83.4184481000apache-2.0timm
mobilenetv4_conv_medium.e180_ad_r384_in12k384--11821apache-2.0timm
mobilenetv4_conv_medium.e180_r384_in12k384--11821apache-2.0timm
mobilenetv4_conv_medium.e250_r384_in12k384--11821apache-2.0timm
mobilenetv4_conv_medium.e250_r384_in12k_ft_in1k38482.7763841000apache-2.0timm
mobilenetv4_conv_medium.e500_r224_in1k224(测试 256)79.8362561000apache-2.0timm
mobilenetv4_conv_medium.e500_r256_in1k256(测试 320)80.8903201000apache-2.0timm
mobilenetv4_conv_small.e1200_r224_in1k224(测试 256)74.2822561000apache-2.0timm
mobilenetv4_conv_small.e2400_r224_in1k224(测试 256)74.6442561000apache-2.0timm
mobilenetv4_conv_small.e3600_r256_in1k256(测试 320)75.6163201000apache-2.0timm
mobilenetv4_conv_small_050.e3000_r224_in1k224(测试 256)65.8262561000apache-2.0timm
mobilenetv4_hybrid_large.e600_r384_in1k384(测试 448)84.2644481000apache-2.0timm
mobilenetv4_hybrid_medium.e200_r256_in12k256(测试 320)--11821apache-2.0timm
mobilenetv4_hybrid_medium.e200_r256_in12k_ft_in1k256(测试 320)82.9983201000apache-2.0timm
mobilenetv4_hybrid_medium.e500_r224_in1k224(测试 256)81.2842561000apache-2.0timm
tf_mobilenetv3_large_075.in1k22473.4422241000apache-2.0timm
tf_mobilenetv3_large_100.in1k22475.5102241000apache-2.0timm
tf_mobilenetv3_large_minimal_100.in1k22472.2702241000apache-2.0timm
tf_mobilenetv3_small_075.in1k22465.7062241000apache-2.0timm
tf_mobilenetv3_small_100.in1k22467.9222241000apache-2.0timm
tf_mobilenetv3_small_minimal_100.in1k22462.8922241000apache-2.0timm
Update on GitHub