opensi·si

timm/models/regnet.py ·

RegNet

Category: CNN · Code: timm/models/regnet.py · Architectures: 36 · Pretrained weights: 65 (60 with ImageNet-1k results)

RegNetX and RegNetY networks from the regular network design spaces, RegNetZ from "Fast and Accurate Model Scaling", and timm additions such as the pre-activation RegNetV. Includes weights from pycls, torchvision and VISSL (SEER).

Papers

  • Designing Network Design Spaces
  • Fast and Accurate Model Scaling
  • Self-supervised Pretraining of Visual Features in the Wild
  • Revisiting Weakly Supervised Pre-Training of Visual Perception Models

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('regnetx_064.pycls_in1k', pretrained=True)
>>> data_config = timm.data.resolve_model_data_config(model)

Model API support

Feature RegNet
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 (RegNet with regnetx_002 at 224), other architectures of the same class are expected to behave the same. See the Model API page for details.

Architectures

جدول (37 صفًا)
Architecture Params (M) GMACs Input size Pretrained weights
regnetv_040 20.64 4.00 224 1
regnetv_064 30.58 6.39 224 1
regnetx_002 2.68 0.20 224 1
regnetx_004 5.16 0.40 224 1
regnetx_004_tv 5.50 0.42 224 1
regnetx_006 6.20 0.61 224 1
regnetx_008 7.26 0.81 224 2
regnetx_016 9.19 1.62 224 2
regnetx_032 15.30 3.20 224 2
regnetx_040 22.12 3.99 224 1
regnetx_064 26.21 6.49 224 1
regnetx_080 39.57 8.02 224 2
regnetx_120 46.11 12.13 224 1
regnetx_160 54.28 15.99 224 2
regnetx_320 107.81 31.81 224 2
regnety_002 3.16 0.20 224 1
regnety_004 4.34 0.41 224 2
regnety_006 6.06 0.61 224 1
regnety_008 6.26 0.81 224 1
regnety_008_tv 6.43 0.84 224 1
regnety_016 11.20 1.63 224 2
regnety_032 19.44 3.20 224 3
regnety_040 20.65 4.00 224 2
regnety_040_sgn 20.65 4.03 224 0
regnety_064 30.58 6.39 224 2
regnety_080 39.18 8.00 224 2
regnety_080_tv 39.38 8.51 224 1
regnety_120 51.82 12.14 224 3
regnety_160 83.59 15.96 224 8
regnety_320 145.05 32.34 224 6
regnety_640 281.38 188.47 384 2
regnety_1280 644.81 374.99 384 4
regnety_2560 1282.60 747.83 384 1
regnetz_005 7.12 0.52 224 0
regnetz_040 27.12 4.06 256 1
regnetz_040_h 28.94 4.12 256 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.

facebookresearch/pycls

Origin: github.com/facebookresearch/pycls

جدول (25 صفًا)
Weight Input size Top-1 (%) Eval size Classes License Hub
regnetx_002.pycls_in1k 224 68.758 224 1000 mit timm
regnetx_004.pycls_in1k 224 72.482 224 1000 mit timm
regnetx_006.pycls_in1k 224 73.904 224 1000 mit timm
regnetx_008.pycls_in1k 224 75.054 224 1000 mit timm
regnetx_016.pycls_in1k 224 76.936 224 1000 mit timm
regnetx_032.pycls_in1k 224 78.160 224 1000 mit timm
regnetx_040.pycls_in1k 224 78.486 224 1000 mit timm
regnetx_064.pycls_in1k 224 79.062 224 1000 mit timm
regnetx_080.pycls_in1k 224 79.214 224 1000 mit timm
regnetx_120.pycls_in1k 224 79.608 224 1000 mit timm
regnetx_160.pycls_in1k 224 79.844 224 1000 mit timm
regnetx_320.pycls_in1k 224 80.258 224 1000 mit timm
regnety_002.pycls_in1k 224 70.288 224 1000 mit timm
regnety_004.pycls_in1k 224 74.004 224 1000 mit timm
regnety_006.pycls_in1k 224 75.274 224 1000 mit timm
regnety_008.pycls_in1k 224 76.334 224 1000 mit timm
regnety_016.pycls_in1k 224 77.880 224 1000 mit timm
regnety_032.pycls_in1k 224 78.902 224 1000 mit timm
regnety_040.pycls_in1k 224 79.246 224 1000 mit timm
regnety_064.pycls_in1k 224 79.734 224 1000 mit timm
regnety_080.pycls_in1k 224 79.874 224 1000 mit timm
regnety_120.pycls_in1k 224 80.382 224 1000 mit timm
regnety_160.pycls_in1k 224 80.284 224 1000 mit timm
regnety_320.pycls_in1k 224 80.796 224 1000 mit timm

pytorch/vision

Origin: github.com/pytorch/vision

جدول (21 صفًا)
Weight Input size Top-1 (%) Eval size Classes License Hub
regnetx_004_tv.tv2_in1k 224 74.596 224 1000 bsd-3-clause timm
regnetx_008.tv2_in1k 224 77.294 224 1000 bsd-3-clause timm
regnetx_016.tv2_in1k 224 79.440 224 1000 bsd-3-clause timm
regnetx_032.tv2_in1k 224 80.916 224 1000 bsd-3-clause timm
regnetx_080.tv2_in1k 224 81.552 224 1000 bsd-3-clause timm
regnetx_160.tv2_in1k 224 82.574 224 1000 bsd-3-clause timm
regnetx_320.tv2_in1k 224 82.824 224 1000 bsd-3-clause timm
regnety_004.tv2_in1k 224 75.594 224 1000 bsd-3-clause timm
regnety_008_tv.tv2_in1k 224 78.672 224 1000 bsd-3-clause timm
regnety_016.tv2_in1k 224 80.668 224 1000 bsd-3-clause timm
regnety_032.tv2_in1k 224 81.788 224 1000 bsd-3-clause timm
regnety_080_tv.tv2_in1k 224 82.580 224 1000 bsd-3-clause timm
regnety_160.swag_ft_in1k 384 86.020 384 1000 cc-by-nc-4.0 timm
regnety_160.swag_lc_in1k 224 83.806 224 1000 cc-by-nc-4.0 timm
regnety_160.tv2_in1k 224 82.646 224 1000 bsd-3-clause timm
regnety_320.swag_ft_in1k 384 86.830 384 1000 cc-by-nc-4.0 timm
regnety_320.swag_lc_in1k 224 84.654 224 1000 cc-by-nc-4.0 timm
regnety_320.tv2_in1k 224 83.170 224 1000 bsd-3-clause timm
regnety_1280.swag_ft_in1k 384 88.228 384 1000 cc-by-nc-4.0 timm
regnety_1280.swag_lc_in1k 224 85.964 224 1000 cc-by-nc-4.0 timm

ra3 tags

Weight Input size Top-1 (%) Eval size Classes License Hub
regnetv_040.ra3_in1k 224 (test 288) 83.204 288 1000 apache-2.0 timm
regnetv_064.ra3_in1k 224 (test 288) 83.746 288 1000 apache-2.0 timm
regnety_040.ra3_in1k 224 (test 288) 83.048 288 1000 apache-2.0 timm
regnety_064.ra3_in1k 224 (test 288) 83.716 288 1000 apache-2.0 timm
regnety_080.ra3_in1k 224 (test 288) 83.940 288 1000 apache-2.0 timm
regnetz_040.ra3_in1k 256 (test 320) 84.242 320 1000 apache-2.0 timm
regnetz_040_h.ra3_in1k 256 (test 320) 84.498 320 1000 apache-2.0 timm

facebookresearch/vissl

Origin: github.com/facebookresearch/vissl

Weight Input size Top-1 (%) Eval size Classes License Hub
regnety_320.seer 224 - - none seer-license timm
regnety_320.seer_ft_in1k 384 83.324 384 1000 seer-license timm
regnety_640.seer 224 - - none seer-license timm
regnety_640.seer_ft_in1k 384 83.924 384 1000 seer-license timm
regnety_1280.seer 224 - - none seer-license timm
regnety_1280.seer_ft_in1k 384 84.426 384 1000 seer-license timm
regnety_2560.seer_ft_in1k 384 85.144 384 1000 seer-license timm

sw tags

Weight Input size Top-1 (%) Eval size Classes License Hub
regnety_120.sw_in12k 224 (test 288) - - 11821 apache-2.0 timm
regnety_120.sw_in12k_ft_in1k 224 (test 288) 85.428 288 1000 apache-2.0 timm
regnety_160.sw_in12k 224 (test 288) - - 11821 apache-2.0 timm
regnety_160.sw_in12k_ft_in1k 224 (test 288) 86.028 288 1000 apache-2.0 timm

Other

Weight Input size Top-1 (%) Eval size Classes License Hub
regnety_032.ra_in1k 224 (test 288) 82.724 288 1000 apache-2.0 timm
regnety_160.deit_in1k 224 (test 288) 83.704 288 1000 apache-2.0 timm
regnety_160.lion_in12k_ft_in1k 224 (test 288) 86.004 288 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.