BYOBNet (GENet, RepVGG, MobileOne, ...)
Category: CNN · Code:
timm/models/byobnet.py ·
Architectures: 53 · Pretrained weights: 57 (41 with ImageNet-1k results)
Bring-Your-Own-Blocks Network, a flexible network built from dataclass configs that stack blocks into stages. It
implements GPU-Efficient Networks (gernet_*), RepVGG, MobileOne, RegNetZ, the ResNet image towers of CLIP (*_clip)
and a number of ResNet style timm variants.
Papers
- Neural Architecture Design for GPU-Efficient Networks
- RepVGG: Making VGG-style ConvNets Great Again
- MobileOne: An Improved One millisecond Mobile Backbone
- Fast and Accurate Model Scaling
- Evolving Normalization-Activation Layers
- Learning Transferable Visual Models From Natural Language Supervision
Usage
See the Quickstart for loading pretrained weights, image preprocessing and fine-tuning, and Feature
Extraction for using the models as backbones.
>>> import timm
>>> model = timm.create_model('repvgg_a2.rvgg_in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)
Model API support
| Feature |
ByobNet |
features_only=True feature maps |
✓ (strides 2, 4, 8, 16, 32) |
forward_intermediates() |
✓ |
prune_intermediate_layers() |
✓ |
| Any input size, no changes needed |
✓ |
set_input_size() |
– |
dynamic_img_size=True |
– |
set_grad_checkpointing() |
✓ |
Layer-wise LR decay (group_matcher()) |
✓ |
reset_classifier() |
✓ |
✓ supported, ✓ (square) works for square sizes only, ✗ not supported, – not needed (the model already accepts any input
size). Checked by running each feature on a randomly initialized model (ByobNet with mobileone_s1 at 224), other
architectures of the same class are expected to behave the same. See the Model API page for details.
Architectures
표 (54행)
| Architecture |
Params (M) |
GMACs |
Input size |
Pretrained weights |
bat_resnext26ts |
10.73 |
2.53 |
256 |
1 |
eca_resnet33ts |
19.68 |
4.76 |
256 |
1 |
eca_resnext26ts |
10.30 |
2.43 |
256 |
1 |
gcresnet33ts |
19.88 |
4.76 |
256 |
1 |
gcresnet50t |
25.90 |
5.42 |
256 |
1 |
gcresnext26ts |
10.48 |
2.43 |
256 |
1 |
gcresnext50ts |
15.67 |
3.75 |
256 |
1 |
gernet_l |
31.08 |
4.57 |
256 |
1 |
gernet_m |
21.14 |
3.02 |
224 |
1 |
gernet_s |
8.17 |
0.75 |
224 |
1 |
mobileone_s0 |
2.08 |
0.28 |
224 |
1 |
mobileone_s1 |
4.76 |
0.83 |
224 |
1 |
mobileone_s2 |
7.81 |
1.30 |
224 |
1 |
mobileone_s3 |
10.08 |
1.90 |
224 |
1 |
mobileone_s4 |
14.84 |
2.98 |
224 |
1 |
regnetz_b16 |
9.72 |
1.45 |
224 |
1 |
regnetz_b16_evos |
9.74 |
1.43 |
224 |
0 |
regnetz_c16 |
13.46 |
2.51 |
256 |
1 |
regnetz_c16_evos |
13.49 |
2.48 |
256 |
1 |
regnetz_d8 |
23.37 |
3.97 |
256 |
1 |
regnetz_d8_evos |
23.46 |
4.50 |
256 |
1 |
regnetz_d32 |
27.58 |
5.98 |
256 |
1 |
regnetz_e8 |
57.70 |
9.91 |
256 |
1 |
repvgg_a0 |
8.31 |
1.36 |
224 |
1 |
repvgg_a1 |
12.79 |
2.36 |
224 |
1 |
repvgg_a2 |
25.50 |
5.12 |
224 |
1 |
repvgg_b0 |
14.34 |
3.06 |
224 |
1 |
repvgg_b1 |
51.83 |
11.82 |
224 |
1 |
repvgg_b1g4 |
36.13 |
7.31 |
224 |
1 |
repvgg_b2 |
80.32 |
18.38 |
224 |
1 |
repvgg_b2g4 |
55.78 |
11.33 |
224 |
1 |
repvgg_b3 |
110.96 |
26.21 |
224 |
1 |
repvgg_b3g4 |
75.63 |
16.06 |
224 |
1 |
repvgg_d2se |
120.39 |
66.99 |
320 |
1 |
resnet32ts |
17.96 |
4.63 |
256 |
1 |
resnet33ts |
19.68 |
4.76 |
256 |
1 |
resnet50_clip |
38.32 |
6.14 |
224 |
3 |
resnet50_clip_gap |
23.53 |
5.39 |
224 |
3 |
resnet50_mlp |
26.65 |
7.05 |
256 |
0 |
resnet50x4_clip |
87.14 |
21.35 |
288 |
1 |
resnet50x4_clip_gap |
65.62 |
19.57 |
288 |
1 |
resnet50x16_clip |
167.33 |
74.90 |
384 |
1 |
resnet50x16_clip_gap |
136.20 |
70.32 |
384 |
1 |
resnet50x64_clip |
420.38 |
265.02 |
448 |
1 |
resnet50x64_clip_gap |
365.03 |
253.96 |
448 |
1 |
resnet51q |
35.70 |
6.38 |
256 |
1 |
resnet61q |
36.85 |
7.80 |
256 |
1 |
resnet101_clip |
56.26 |
9.81 |
224 |
2 |
resnet101_clip_gap |
42.52 |
9.11 |
224 |
2 |
resnext26ts |
10.30 |
2.43 |
256 |
1 |
seresnet33ts |
19.78 |
4.76 |
256 |
1 |
seresnext26ts |
10.39 |
2.43 |
256 |
1 |
test_byobnet |
0.46 |
0.03 |
160 |
1 |
GMACs and parameter counts are for the default input size and classifier of each architecture, from the benchmark
results.
Pretrained weights
Top-1 is ImageNet-1k validation accuracy from
results-imagenet.csv at
the listed eval size, - if the weight has no ImageNet-1k result (e.g. pretraining or image-text weights). Classes is the
size of the pretrained classifier, none for weights without one.
Weights are grouped by source: the paper or origin given in the pretrained config, else a Hub organization other than
timm, else the first part of the pretrained tag (architecture.tag). Sources with a single weight are listed under
other.
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
repvgg_a0.rvgg_in1k |
224 |
72.426 |
224 |
1000 |
mit |
timm |
repvgg_a1.rvgg_in1k |
224 |
74.474 |
224 |
1000 |
mit |
timm |
repvgg_a2.rvgg_in1k |
224 |
76.488 |
224 |
1000 |
mit |
timm |
repvgg_b0.rvgg_in1k |
224 |
75.158 |
224 |
1000 |
mit |
timm |
repvgg_b1.rvgg_in1k |
224 |
78.370 |
224 |
1000 |
mit |
timm |
repvgg_b1g4.rvgg_in1k |
224 |
77.608 |
224 |
1000 |
mit |
timm |
repvgg_b2.rvgg_in1k |
224 |
78.788 |
224 |
1000 |
mit |
timm |
repvgg_b2g4.rvgg_in1k |
224 |
79.396 |
224 |
1000 |
mit |
timm |
repvgg_b3.rvgg_in1k |
224 |
80.528 |
224 |
1000 |
mit |
timm |
repvgg_b3g4.rvgg_in1k |
224 |
80.224 |
224 |
1000 |
mit |
timm |
repvgg_d2se.rvgg_in1k |
320 |
83.550 |
320 |
1000 |
mit |
timm |
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
resnet50_clip.openai |
224 |
- |
- |
1024 |
mit |
timm |
resnet50_clip_gap.openai |
224 |
- |
- |
none |
mit |
timm |
resnet50x4_clip.openai |
288 |
- |
- |
640 |
mit |
timm |
resnet50x4_clip_gap.openai |
288 |
- |
- |
none |
mit |
timm |
resnet50x16_clip.openai |
384 |
- |
- |
768 |
mit |
timm |
resnet50x16_clip_gap.openai |
384 |
- |
- |
none |
mit |
timm |
resnet50x64_clip.openai |
448 |
- |
- |
1024 |
mit |
timm |
resnet50x64_clip_gap.openai |
448 |
- |
- |
none |
mit |
timm |
resnet101_clip.openai |
224 |
- |
- |
512 |
mit |
timm |
resnet101_clip_gap.openai |
224 |
- |
- |
none |
mit |
timm |
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
eca_resnet33ts.ra2_in1k |
256 (test 288) |
80.716 |
288 |
1000 |
apache-2.0 |
timm |
gcresnet33ts.ra2_in1k |
256 (test 288) |
80.588 |
288 |
1000 |
apache-2.0 |
timm |
gcresnet50t.ra2_in1k |
256 (test 288) |
81.458 |
288 |
1000 |
apache-2.0 |
timm |
resnet32ts.ra2_in1k |
256 (test 288) |
79.388 |
288 |
1000 |
apache-2.0 |
timm |
resnet33ts.ra2_in1k |
256 (test 288) |
79.710 |
288 |
1000 |
apache-2.0 |
timm |
resnet51q.ra2_in1k |
256 (test 288) |
82.356 |
288 |
1000 |
apache-2.0 |
timm |
resnet61q.ra2_in1k |
256 (test 288) |
82.532 |
288 |
1000 |
apache-2.0 |
timm |
resnext26ts.ra2_in1k |
256 (test 288) |
77.186 |
288 |
1000 |
apache-2.0 |
timm |
seresnet33ts.ra2_in1k |
256 (test 288) |
80.814 |
288 |
1000 |
apache-2.0 |
timm |
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
bat_resnext26ts.ch_in1k |
256 |
78.280 |
256 |
1000 |
apache-2.0 |
timm |
eca_resnext26ts.ch_in1k |
256 (test 288) |
78.020 |
288 |
1000 |
apache-2.0 |
timm |
gcresnext26ts.ch_in1k |
256 (test 288) |
78.436 |
288 |
1000 |
apache-2.0 |
timm |
gcresnext50ts.ch_in1k |
256 (test 288) |
81.242 |
288 |
1000 |
apache-2.0 |
timm |
regnetz_c16_evos.ch_in1k |
256 (test 320) |
82.660 |
320 |
1000 |
apache-2.0 |
timm |
regnetz_d8_evos.ch_in1k |
256 (test 320) |
84.138 |
320 |
1000 |
apache-2.0 |
timm |
seresnext26ts.ch_in1k |
256 (test 288) |
78.292 |
288 |
1000 |
apache-2.0 |
timm |
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
mobileone_s0.apple_in1k |
224 |
71.398 |
224 |
1000 |
mobileone-license |
timm |
mobileone_s1.apple_in1k |
224 |
75.760 |
224 |
1000 |
mobileone-license |
timm |
mobileone_s2.apple_in1k |
224 |
77.504 |
224 |
1000 |
mobileone-license |
timm |
mobileone_s3.apple_in1k |
224 |
78.002 |
224 |
1000 |
mobileone-license |
timm |
mobileone_s4.apple_in1k |
224 |
79.446 |
224 |
1000 |
mobileone-license |
timm |
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
regnetz_b16.ra3_in1k |
224 (test 288) |
80.740 |
288 |
1000 |
apache-2.0 |
timm |
regnetz_c16.ra3_in1k |
256 (test 320) |
82.662 |
320 |
1000 |
apache-2.0 |
timm |
regnetz_d8.ra3_in1k |
256 (test 320) |
84.044 |
320 |
1000 |
apache-2.0 |
timm |
regnetz_d32.ra3_in1k |
256 (test 320) |
84.028 |
320 |
1000 |
apache-2.0 |
timm |
regnetz_e8.ra3_in1k |
256 (test 320) |
85.016 |
320 |
1000 |
apache-2.0 |
timm |
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
resnet50_clip.yfcc15m |
224 |
- |
- |
1024 |
mit |
timm |
resnet50_clip_gap.yfcc15m |
224 |
- |
- |
none |
mit |
timm |
resnet101_clip.yfcc15m |
224 |
- |
- |
512 |
mit |
timm |
resnet101_clip_gap.yfcc15m |
224 |
- |
- |
none |
mit |
timm |
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
gernet_l.idstcv_in1k |
256 |
81.354 |
256 |
1000 |
apache-2.0 |
timm |
gernet_m.idstcv_in1k |
224 |
80.702 |
224 |
1000 |
apache-2.0 |
timm |
gernet_s.idstcv_in1k |
224 |
76.874 |
224 |
1000 |
apache-2.0 |
timm |
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
resnet50_clip.cc12m |
224 |
- |
- |
1024 |
mit |
timm |
resnet50_clip_gap.cc12m |
224 |
- |
- |
none |
mit |
timm |
Other
| Weight |
Input size |
Top-1 (%) |
Eval size |
Classes |
License |
Hub |
test_byobnet.r160_in1k |
160 |
45.858 |
160 |
1000 |
apache-2.0 |
timm |
Source and license
Source: timm documentation, adapted for this site. Licensing and attribution follow the terms of the upstream project.