Skip to content

Commit 4fe2da5

Browse files
committed
Add MixNet Small and Large PyTorch native weights (no same padding)
1 parent 15e6686 commit 4fe2da5

File tree

2 files changed

+29
-34
lines changed

2 files changed

+29
-34
lines changed

README.md

Lines changed: 22 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -69,35 +69,28 @@ A CSV file containing an ImageNet-1K validation results summary for all included
6969
### Self-trained Weights
7070
I've leveraged the training scripts in this repository to train a few of the models with missing weights to good levels of performance. These numbers are all for 224x224 training and validation image sizing with the usual 87.5% validation crop.
7171

72-
#### @ 224x224
73-
|Model | Prec@1 (Err) | Prec@5 (Err) | Param # | Image Scaling |
74-
|---|---|---|---|---|
75-
| resnext50d_32x4d | 79.674 (20.326) | 94.868 (5.132) | 25.1M | bicubic |
76-
| resnext50_32x4d | 78.512 (21.488) | 94.042 (5.958) | 25M | bicubic |
77-
| resnet50 | 78.470 (21.530) | 94.266 (5.734) | 25.6M | bicubic |
78-
| mixnet_m | 77.256 (22.744) | 93.418 (6.582) | 5.01M | bicubic |
79-
| seresnext26_32x4d | 77.104 (22.896) | 93.316 (6.684) | 16.8M | bicubic |
80-
| efficientnet_b0 | 76.912 (23.088) | 93.210 (6.790) | 5.29M | bicubic |
81-
| resnet26d | 76.68 (23.32) | 93.166 (6.834) | 16M | bicubic |
82-
| mobilenetv3_100 | 75.634 (24.366) | 92.708 (7.292) | 5.5M | bicubic |
83-
| mnasnet_a1 | 75.448 (24.552) | 92.604 (7.396) | 3.89M | bicubic |
84-
| resnet26 | 75.292 (24.708) | 92.57 (7.43) | 16M | bicubic |
85-
| fbnetc_100 | 75.124 (24.876) | 92.386 (7.614) | 5.6M | bilinear |
86-
| resnet34 | 75.110 (24.890) | 92.284 (7.716) | 22M | bilinear |
87-
| seresnet34 | 74.808 (25.192) | 92.124 (7.876) | 22M | bilinear |
88-
| mnasnet_b1 | 74.658 (25.342) | 92.114 (7.886) | 4.38M | bicubic |
89-
| spnasnet_100 | 74.084 (25.916) | 91.818 (8.182) | 4.42M | bilinear |
90-
| seresnet18 | 71.742 (28.258) | 90.334 (9.666) | 11.8M | bicubic |
91-
92-
#### @ 240x240
93-
|Model | Prec@1 (Err) | Prec@5 (Err) | Param # | Image Scaling |
94-
|---|---|---|---|---|
95-
| efficientnet_b1 | 78.692 (21.308) | 94.086 (5.914) | 7.79M | bicubic |
96-
97-
#### @ 260x260
98-
|Model | Prec@1 (Err) | Prec@5 (Err) | Param # | Image Scaling |
99-
|---|---|---|---|---|
100-
| efficientnet_b2 | 79.760 (20.240) | 94.714 (5.286) | 9.11M | bicubic |
72+
|Model | Prec@1 (Err) | Prec@5 (Err) | Param # | Image Scaling | Image Size |
73+
|---|---|---|---|---|---|
74+
| efficientnet_b2 | 79.760 (20.240) | 94.714 (5.286) | 9.11M | bicubic | 260 |
75+
| resnext50d_32x4d | 79.674 (20.326) | 94.868 (5.132) | 25.1M | bicubic | 224 |
76+
| mixnet_l | 78.976 (21.024 | 94.184 (5.816) | 7.33M | bicubic | 224 |
77+
| efficientnet_b1 | 78.692 (21.308) | 94.086 (5.914) | 7.79M | bicubic | 240 |
78+
| resnext50_32x4d | 78.512 (21.488) | 94.042 (5.958) | 25M | bicubic | 224 |
79+
| resnet50 | 78.470 (21.530) | 94.266 (5.734) | 25.6M | bicubic | 224 |
80+
| mixnet_m | 77.256 (22.744) | 93.418 (6.582) | 5.01M | bicubic | 224 |
81+
| seresnext26_32x4d | 77.104 (22.896) | 93.316 (6.684) | 16.8M | bicubic | 224 |
82+
| efficientnet_b0 | 76.912 (23.088) | 93.210 (6.790) | 5.29M | bicubic | 224 |
83+
| resnet26d | 76.68 (23.32) | 93.166 (6.834) | 16M | bicubic | 224 |
84+
| mixnet_s | 75.988 (24.012) | 92.794 (7.206) | 4.13M | bicubic | 224 |
85+
| mobilenetv3_100 | 75.634 (24.366) | 92.708 (7.292) | 5.5M | bicubic | 224 |
86+
| mnasnet_a1 | 75.448 (24.552) | 92.604 (7.396) | 3.89M | bicubic | 224 |
87+
| resnet26 | 75.292 (24.708) | 92.57 (7.43) | 16M | bicubic | 224 |
88+
| fbnetc_100 | 75.124 (24.876) | 92.386 (7.614) | 5.6M | bilinear 224 |
89+
| resnet34 | 75.110 (24.890) | 92.284 (7.716) | 22M | bilinear | 224 |
90+
| seresnet34 | 74.808 (25.192) | 92.124 (7.876) | 22M | bilinear | 224 |
91+
| mnasnet_b1 | 74.658 (25.342) | 92.114 (7.886) | 4.38M | bicubic | 224 |
92+
| spnasnet_100 | 74.084 (25.916) | 91.818 (8.182) | 4.42M | bilinear | 224 |
93+
| seresnet18 | 71.742 (28.258) | 90.334 (9.666) | 11.8M | bicubic | 224 |
10194

10295
### Ported Weights
10396

timm/models/gen_efficientnet.py

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -112,10 +112,12 @@ def _cfg(url='', **kwargs):
112112
'tf_efficientnet_b7': _cfg(
113113
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_efficientnet_b7_aa-076e3472.pth',
114114
input_size=(3, 600, 600), pool_size=(19, 19), crop_pct=0.949),
115-
'mixnet_s': _cfg(url=''),
115+
'mixnet_s': _cfg(
116+
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mixnet_s-a907afbc.pth'),
116117
'mixnet_m': _cfg(
117118
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mixnet_m-4647fc68.pth'),
118-
'mixnet_l': _cfg(url=''),
119+
'mixnet_l': _cfg(
120+
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/mixnet_l-5a9a2ed8.pth'),
119121
'tf_mixnet_s': _cfg(
120122
url='https://github.com/rwightman/pytorch-image-models/releases/download/v0.1-weights/tf_mixnet_s-89d3354b.pth'),
121123
'tf_mixnet_m': _cfg(
@@ -1636,12 +1638,12 @@ def tf_efficientnet_b7(pretrained=False, num_classes=1000, in_chans=3, **kwargs)
16361638
def mixnet_s(pretrained=False, num_classes=1000, in_chans=3, **kwargs):
16371639
"""Creates a MixNet Small model.
16381640
"""
1639-
default_cfg = default_cfgs['mixnet_m']
1641+
default_cfg = default_cfgs['mixnet_s']
16401642
model = _gen_mixnet_s(
16411643
channel_multiplier=1.0, num_classes=num_classes, in_chans=in_chans, **kwargs)
16421644
model.default_cfg = default_cfg
1643-
#if pretrained:
1644-
# load_pretrained(model, default_cfg, num_classes, in_chans)
1645+
if pretrained:
1646+
load_pretrained(model, default_cfg, num_classes, in_chans)
16451647
return model
16461648

16471649

0 commit comments

Comments
 (0)