Skip to content

Commit e34074b

Browse files
committed
Add final weights for MobileNet-V2 experiments
1 parent a6a5565 commit e34074b

File tree

2 files changed

+25
-10
lines changed

2 files changed

+25
-10
lines changed

README.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,13 @@
22

33
## What's New
44

5+
### April 5, 2020
6+
* Add some newly trained MobileNet-V2 models trained with latest h-params, rand augment. They compare quite favourably to EfficientNet-Lite
7+
* 3.5M param MobileNet-V2 100 @ 73%
8+
* 4.5M param MobileNet-V2 110d @ 75%
9+
* 6.1M param MobileNet-V2 140 @ 76.5%
10+
* 5.8M param MobileNet-V2 120d @ 77.3%
11+
512
### March 18, 2020
613
* Add EfficientNet-Lite models w/ weights ported from [Tensorflow TPU](https://github.com/tensorflow/tpu/tree/master/models/official/efficientnet/lite)
714

@@ -193,21 +200,25 @@ I've leveraged the training scripts in this repository to train a few of the mod
193200
| seresnext26tn_32x4d | 77.986 (22.014) | 93.746 (6.254) | 16.8M | bicubic | 224 |
194201
| efficientnet_b0 | 77.698 (22.302) | 93.532 (6.468) | 5.29M | bicubic | 224 |
195202
| seresnext26d_32x4d | 77.602 (22.398) | 93.608 (6.392) | 16.8M | bicubic | 224 |
203+
| mobilenetv2_120d | 77.294 (22.706 | 93.502 (6.498) | 5.8M | bicubic | 224 |
196204
| mixnet_m | 77.256 (22.744) | 93.418 (6.582) | 5.01M | bicubic | 224 |
197205
| seresnext26_32x4d | 77.104 (22.896) | 93.316 (6.684) | 16.8M | bicubic | 224 |
198206
| skresnet34 | 76.912 (23.088) | 93.322 (6.678) | 22.2M | bicubic | 224 |
199207
| resnet26d | 76.68 (23.32) | 93.166 (6.834) | 16M | bicubic | 224 |
208+
| mobilenetv2_140 | 76.524 (23.476) | 92.990 (7.010) | 6.1M | bicubic | 224 |
200209
| mixnet_s | 75.988 (24.012) | 92.794 (7.206) | 4.13M | bicubic | 224 |
201210
| mobilenetv3_large_100 | 75.766 (24.234) | 92.542 (7.458) | 5.5M | bicubic | 224 |
202211
| mobilenetv3_rw | 75.634 (24.366) | 92.708 (7.292) | 5.5M | bicubic | 224 |
203212
| mnasnet_a1 | 75.448 (24.552) | 92.604 (7.396) | 3.89M | bicubic | 224 |
204213
| resnet26 | 75.292 (24.708) | 92.57 (7.43) | 16M | bicubic | 224 |
205214
| fbnetc_100 | 75.124 (24.876) | 92.386 (7.614) | 5.6M | bilinear | 224 |
206215
| resnet34 | 75.110 (24.890) | 92.284 (7.716) | 22M | bilinear | 224 |
216+
| mobilenetv2_110d | 75.052 (24.948) | 92.180 (7.820) | 4.5M | bicubic | 224 |
207217
| seresnet34 | 74.808 (25.192) | 92.124 (7.876) | 22M | bilinear | 224 |
208218
| mnasnet_b1 | 74.658 (25.342) | 92.114 (7.886) | 4.38M | bicubic | 224 |
209219
| spnasnet_100 | 74.084 (25.916) | 91.818 (8.182) | 4.42M | bilinear | 224 |
210220
| skresnet18 | 73.038 (26.962) | 91.168 (8.832) | 11.9M | bicubic | 224 |
221+
| mobilenetv2_100 | 72.978 (27.022) | 91.016 (8.984) | 3.5M | bicubic | 224 |
211222
| seresnet18 | 71.742 (28.258) | 90.334 (9.666) | 11.8M | bicubic | 224 |
212223

213224
### Ported Weights

timm/models/efficientnet.py

Lines changed: 14 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -60,10 +60,14 @@ def _cfg(url='', **kwargs):
6060
'semnasnet_140': _cfg(url=''),
6161
'mnasnet_small': _cfg(url=''),
6262

63-
'mobilenetv2_100': _cfg(url=''),
64-
'mobilenetv2_100d': _cfg(url=''),
65-
'mobilenetv2_110d': _cfg(url=''),
66-
'mobilenetv2_140': _cfg(url=''),
63+
'mobilenetv2_100': _cfg(
64+
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mobilenetv2_100_ra-b33bc2c4.pth'),
65+
'mobilenetv2_110d': _cfg(
66+
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mobilenetv2_110d_ra-77090ade.pth'),
67+
'mobilenetv2_120d': _cfg(
68+
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mobilenetv2_120d_ra-5987e2ed.pth'),
69+
'mobilenetv2_140': _cfg(
70+
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mobilenetv2_140_ra-21a4e913.pth'),
6771

6872
'fbnetc_100': _cfg(
6973
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/fbnetc_100-c345b898.pth',
@@ -953,31 +957,31 @@ def mnasnet_small(pretrained=False, **kwargs):
953957

954958
@register_model
955959
def mobilenetv2_100(pretrained=False, **kwargs):
956-
""" MobileNet V2 """
960+
""" MobileNet V2 w/ 1.0 channel multiplier """
957961
model = _gen_mobilenet_v2('mobilenetv2_100', 1.0, pretrained=pretrained, **kwargs)
958962
return model
959963

960964

961965
@register_model
962966
def mobilenetv2_140(pretrained=False, **kwargs):
963-
""" MobileNet V2 """
967+
""" MobileNet V2 w/ 1.4 channel multiplier """
964968
model = _gen_mobilenet_v2('mobilenetv2_140', 1.4, pretrained=pretrained, **kwargs)
965969
return model
966970

967971

968972
@register_model
969973
def mobilenetv2_110d(pretrained=False, **kwargs):
970-
""" MobileNet V2 """
974+
""" MobileNet V2 w/ 1.1 channel, 1.2 depth multipliers"""
971975
model = _gen_mobilenet_v2(
972-
'mobilenetv2_100d', 1.1, depth_multiplier=1.2, fix_stem_head=True, pretrained=pretrained, **kwargs)
976+
'mobilenetv2_110d', 1.1, depth_multiplier=1.2, fix_stem_head=True, pretrained=pretrained, **kwargs)
973977
return model
974978

975979

976980
@register_model
977981
def mobilenetv2_120d(pretrained=False, **kwargs):
978-
""" MobileNet V2 """
982+
""" MobileNet V2 w/ 1.2 channel, 1.4 depth multipliers """
979983
model = _gen_mobilenet_v2(
980-
'mobilenetv2_110d', 1.2, depth_multiplier=1.4, fix_stem_head=True, pretrained=pretrained, **kwargs)
984+
'mobilenetv2_120d', 1.2, depth_multiplier=1.4, fix_stem_head=True, pretrained=pretrained, **kwargs)
981985
return model
982986

983987

0 commit comments

Comments
 (0)