releases.shpreview
Hugging Face/timm (pytorch-image-models)

timm (pytorch-image-models)

$npx -y @buildinternet/releases show timm-pytorch-image-models
Mon
Wed
Fri
AprMayJunJulAugSepOctNovDecJanFebMarApr
Less
More
Releases3Avg0/wkVersionsv1.0.23 → v1.0.25
Oct 3, 2022
v0.6.11 Release

Changes Since 0.6.7

Sept 23, 2022

  • CLIP LAION-2B pretrained B/32, L/14, H/14, and g/14 image tower weights as vit models (for fine-tune)

Sept 7, 2022

  • Hugging Face timm docs home now exists, look for more here in the future
  • Add BEiT-v2 weights for base and large 224x224 models from https://github.com/microsoft/unilm/tree/master/beit2
  • Add more weights in maxxvit series incl a pico (7.5M params, 1.9 GMACs), two tiny variants:
    • maxvit_rmlp_pico_rw_256 - 80.5 @ 256, 81.3 @ 320 (T)
    • maxvit_tiny_rw_224 - 83.5 @ 224 (G)
    • maxvit_rmlp_tiny_rw_256 - 84.2 @ 256, 84.8 @ 320 (T)

Aug 29, 2022

  • MaxVit window size scales with img_size by default. Add new RelPosMlp MaxViT weight that leverages this:
    • maxvit_rmlp_nano_rw_256 - 83.0 @ 256, 83.6 @ 320 (T)

Aug 26, 2022

Aug 15, 2022

  • ConvNeXt atto weights added
    • convnext_atto - 75.7 @ 224, 77.0 @ 288
    • convnext_atto_ols - 75.9 @ 224, 77.2 @ 288

Aug 5, 2022

  • More custom ConvNeXt smaller model defs with weights
    • convnext_femto - 77.5 @ 224, 78.7 @ 288
    • convnext_femto_ols - 77.9 @ 224, 78.9 @ 288
    • convnext_pico - 79.5 @ 224, 80.4 @ 288
    • convnext_pico_ols - 79.5 @ 224, 80.5 @ 288
    • convnext_nano_ols - 80.9 @ 224, 81.6 @ 288
  • Updated EdgeNeXt to improve ONNX export, add new base variant and weights from original (https://github.com/mmaaz60/EdgeNeXt)

July 28, 2022

  • Add freshly minted DeiT-III Medium (width=512, depth=12, num_heads=8) model weights. Thanks Hugo Touvron!
Aug 24, 2022
MaxxVit (CoAtNet, MaxVit, and related experimental weights)

CoAtNet (https://arxiv.org/abs/2106.04803) and MaxVit (https://arxiv.org/abs/2204.01697) timm trained weights

Weights were created reproducing the paper architectures and exploring timm sepcific additions such as ConvNeXt blocks, parallel partitioning, and other experiments.

Weights were trained on a mix of TPU and GPU systems. Bulk of weights were trained on TPU via the TRC program (https://sites.research.google/trc/about/).

CoAtNet variants run particularly well on TPU, it's a great combination. MaxVit is better suited to GPU due to the window partitioning, although there are some optimizations that can be made to improve TPU padding/utilization incl using 256x256 image size (8, 8) windo/grid size, and keeping format in NCHW for partition attention when using PyTorch XLA.

Glossary:

  • coatnet - CoAtNet (MBConv + transformer blocks)
  • coatnext - CoAtNet w/ ConvNeXt conv blocks
  • maxvit - MaxViT (MBConv + block (ala swin) and grid partioning transformer blocks)
  • maxxvit - MaxViT w/ ConvNeXt conv blocks
  • rmlp - relative position embedding w/ MLP (can be resized) -- if this isn't in model name, it's using relative position bias (ala swin)
  • rw - my variations on the model, slight differences in sizing / pooling / etc from Google paper spec

Results:

  • maxvit_rmlp_pico_rw_256 - 80.5 @ 256, 81.3 @ 320 (T)
  • coatnet_nano_rw_224 - 81.7 @ 224 (T)
  • coatnext_nano_rw_224 - 82.0 @ 224 (G) -- (uses convnext block, no BatchNorm)
  • coatnet_rmlp_nano_rw_224 - 82.0 @ 224, 82.8 @ 320 (T)
  • coatnet_0_rw_224 - 82.4 (T) -- NOTE timm '0' coatnets have 2 more 3rd stage blocks
  • coatnet_bn_0_rw_224 - 82.4 (T) -- all BatchNorm, no LayerNorm
  • maxvit_nano_rw_256 - 82.9 @ 256 (T)
  • maxvit_rmlp_nano_rw_256 - 83.0 @ 256, 83.6 @ 320 (T)
  • maxxvit_rmlp_nano_rw_256 - 83.0 @ 256, 83.7 @ 320 (G) (uses convnext conv block, no BatchNorm)
  • coatnet_rmlp_1_rw_224 - 83.4 @ 224, 84 @ 320 (T)
  • maxvit_tiny_rw_224 - 83.5 @ 224 (G)
  • coatnet_1_rw_224 - 83.6 @ 224 (G)
  • maxvit_rmlp_tiny_rw_256 - 84.2 @ 256, 84.8 @ 320 (T)
  • maxvit_rmlp_small_rw_224 - 84.5 @ 224, 85.1 @ 320 (G)
  • maxxvit_rmlp_small_rw_256 - 84.6 @ 256, 84.9 @ 288 (G) -- could be trained better, hparms need tuning (uses convnext conv block, no BN)
  • coatnet_rmlp_2_rw_224 - 84.6 @ 224, 85 @ 320 (T)

(T) = TPU trained with bits_and_tpu branch training code, (G) = GPU trained

Aug 17, 2022
More 3rd party ViT / ViT-hybrid weights

More weights for 3rd party ViT / ViT-CNN hybrids that needed remapping / re-hosting

EfficientFormer

Rehosted and remaped checkpoints from https://github.com/snap-research/EfficientFormer (originals in Google Drive)

GCViT

Heavily remaped from originals at https://github.com/NVlabs/GCVit due to from-scratch re-write of model code

NOTE: these checkpoints have a non-commercial CC-BY-NC-SA-4.0 license.

Jul 27, 2022
v0.6.7 Release

Minor bug fixes and a few more weights since 0.6.5

  • A few more weights & model defs added:
    • darknetaa53 - 79.8 @ 256, 80.5 @ 288
    • convnext_nano - 80.8 @ 224, 81.5 @ 288
    • cs3sedarknet_l - 81.2 @ 256, 81.8 @ 288
    • cs3darknet_x - 81.8 @ 256, 82.2 @ 288
    • cs3sedarknet_x - 82.2 @ 256, 82.7 @ 288
    • cs3edgenet_x - 82.2 @ 256, 82.7 @ 288
    • cs3se_edgenet_x - 82.8 @ 256, 83.5 @ 320
  • cs3* weights above all trained on TPU w/ bits_and_tpu branch. Thanks to TRC program!
  • Add output_stride=8 and 16 support to ConvNeXt (dilation)
  • deit3 models not being able to resize pos_emb fixed
Jul 10, 2022
v0.6.5 Release

First official release in a long while (since 0.5.4). All change log since 0.5.4 below,

July 8, 2022

More models, more fixes

  • Official research models (w/ weights) added:
  • My own models:
    • Small ResNet defs added by request with 1 block repeats for both basic and bottleneck (resnet10 and resnet14)
    • CspNet refactored with dataclass config, simplified CrossStage3 (cs3) option. These are closer to YOLO-v5+ backbone defs.
    • More relative position vit fiddling. Two srelpos (shared relative position) models trained, and a medium w/ class token.
    • Add an alternate downsample mode to EdgeNeXt and train a small model. Better than original small, but not their new USI trained weights.
  • My own model weight results (all ImageNet-1k training)
    • resnet10t - 66.5 @ 176, 68.3 @ 224
    • resnet14t - 71.3 @ 176, 72.3 @ 224
    • resnetaa50 - 80.6 @ 224 , 81.6 @ 288
    • darknet53 - 80.0 @ 256, 80.5 @ 288
    • cs3darknet_m - 77.0 @ 256, 77.6 @ 288
    • cs3darknet_focus_m - 76.7 @ 256, 77.3 @ 288
    • cs3darknet_l - 80.4 @ 256, 80.9 @ 288
    • cs3darknet_focus_l - 80.3 @ 256, 80.9 @ 288
    • vit_srelpos_small_patch16_224 - 81.1 @ 224, 82.1 @ 320
    • vit_srelpos_medium_patch16_224 - 82.3 @ 224, 83.1 @ 320
    • vit_relpos_small_patch16_cls_224 - 82.6 @ 224, 83.6 @ 320
    • edgnext_small_rw - 79.6 @ 224, 80.4 @ 320
  • cs3, darknet, and vit_*relpos weights above all trained on TPU thanks to TRC program! Rest trained on overheating GPUs.
  • Hugging Face Hub support fixes verified, demo notebook TBA
  • Pretrained weights / configs can be loaded externally (ie from local disk) w/ support for head adaptation.
  • Add support to change image extensions scanned by timm datasets/parsers. See (https://github.com/rwightman/pytorch-image-models/pull/1274#issuecomment-1178303103)
  • Default ConvNeXt LayerNorm impl to use F.layer_norm(x.permute(0, 2, 3, 1), ...).permute(0, 3, 1, 2) via LayerNorm2d in all cases.
    • a bit slower than previous custom impl on some hardware (ie Ampere w/ CL), but overall fewer regressions across wider HW / PyTorch version ranges.
    • previous impl exists as LayerNormExp2d in models/layers/norm.py
  • Numerous bug fixes
  • Currently testing for imminent PyPi 0.6.x release
  • LeViT pretraining of larger models still a WIP, they don't train well / easily without distillation. Time to add distill support (finally)?
  • ImageNet-22k weight training + finetune ongoing, work on multi-weight support (slowly) chugging along (there are a LOT of weights, sigh) ...

May 13, 2022

  • Official Swin-V2 models and weights added from (https://github.com/microsoft/Swin-Transformer). Cleaned up to support torchscript.
  • Some refactoring for existing timm Swin-V2-CR impl, will likely do a bit more to bring parts closer to official and decide whether to merge some aspects.
  • More Vision Transformer relative position / residual post-norm experiments (all trained on TPU thanks to TRC program)
    • vit_relpos_small_patch16_224 - 81.5 @ 224, 82.5 @ 320 -- rel pos, layer scale, no class token, avg pool
    • vit_relpos_medium_patch16_rpn_224 - 82.3 @ 224, 83.1 @ 320 -- rel pos + res-post-norm, no class token, avg pool
    • vit_relpos_medium_patch16_224 - 82.5 @ 224, 83.3 @ 320 -- rel pos, layer scale, no class token, avg pool
    • vit_relpos_base_patch16_gapcls_224 - 82.8 @ 224, 83.9 @ 320 -- rel pos, layer scale, class token, avg pool (by mistake)
  • Bring 512 dim, 8-head 'medium' ViT model variant back to life (after using in a pre DeiT 'small' model for first ViT impl back in 2020)
  • Add ViT relative position support for switching btw existing impl and some additions in official Swin-V2 impl for future trials
  • Sequencer2D impl (https://arxiv.org/abs/2205.01972), added via PR from author (https://github.com/okojoalg)

May 2, 2022

  • Vision Transformer experiments adding Relative Position (Swin-V2 log-coord) (vision_transformer_relpos.py) and Residual Post-Norm branches (from Swin-V2) (vision_transformer*.py)
    • vit_relpos_base_patch32_plus_rpn_256 - 79.5 @ 256, 80.6 @ 320 -- rel pos + extended width + res-post-norm, no class token, avg pool
    • vit_relpos_base_patch16_224 - 82.5 @ 224, 83.6 @ 320 -- rel pos, layer scale, no class token, avg pool
    • vit_base_patch16_rpn_224 - 82.3 @ 224 -- rel pos + res-post-norm, no class token, avg pool
  • Vision Transformer refactor to remove representation layer that was only used in initial vit and rarely used since with newer pretrain (ie How to Train Your ViT)
  • vit_* models support removal of class token, use of global average pool, use of fc_norm (ala beit, mae).

April 22, 2022

  • timm models are now officially supported in fast.ai! Just in time for the new Practical Deep Learning course. timmdocs documentation link updated to timm.fast.ai.
  • Two more model weights added in the TPU trained series. Some In22k pretrain still in progress.
    • seresnext101d_32x8d - 83.69 @ 224, 84.35 @ 288
    • seresnextaa101d_32x8d (anti-aliased w/ AvgPool2d) - 83.85 @ 224, 84.57 @ 288

March 23, 2022

  • Add ParallelBlock and LayerScale option to base vit models to support model configs in Three things everyone should know about ViT
  • convnext_tiny_hnf (head norm first) weights trained with (close to) A2 recipe, 82.2% top-1, could do better with more epochs.

March 21, 2022

  • Merge norm_norm_norm. IMPORTANT this update for a coming 0.6.x release will likely de-stabilize the master branch for a while. Branch 0.5.x or a previous 0.5.x release can be used if stability is required.
  • Significant weights update (all TPU trained) as described in this release
    • regnety_040 - 82.3 @ 224, 82.96 @ 288
    • regnety_064 - 83.0 @ 224, 83.65 @ 288
    • regnety_080 - 83.17 @ 224, 83.86 @ 288
    • regnetv_040 - 82.44 @ 224, 83.18 @ 288 (timm pre-act)
    • regnetv_064 - 83.1 @ 224, 83.71 @ 288 (timm pre-act)
    • regnetz_040 - 83.67 @ 256, 84.25 @ 320
    • regnetz_040h - 83.77 @ 256, 84.5 @ 320 (w/ extra fc in head)
    • resnetv2_50d_gn - 80.8 @ 224, 81.96 @ 288 (pre-act GroupNorm)
    • resnetv2_50d_evos 80.77 @ 224, 82.04 @ 288 (pre-act EvoNormS)
    • regnetz_c16_evos - 81.9 @ 256, 82.64 @ 320 (EvoNormS)
    • regnetz_d8_evos - 83.42 @ 256, 84.04 @ 320 (EvoNormS)
    • xception41p - 82 @ 299 (timm pre-act)
    • xception65 - 83.17 @ 299
    • xception65p - 83.14 @ 299 (timm pre-act)
    • resnext101_64x4d - 82.46 @ 224, 83.16 @ 288
    • seresnext101_32x8d - 83.57 @ 224, 84.270 @ 288
    • resnetrs200 - 83.85 @ 256, 84.44 @ 320
  • HuggingFace hub support fixed w/ initial groundwork for allowing alternative 'config sources' for pretrained model definitions and weights (generic local file / remote url support soon)
  • SwinTransformer-V2 implementation added. Submitted by Christoph Reich. Training experiments and model changes by myself are ongoing so expect compat breaks.
  • Swin-S3 (AutoFormerV2) models / weights added from https://github.com/microsoft/Cream/tree/main/AutoFormerV2
  • MobileViT models w/ weights adapted from https://github.com/apple/ml-cvnets
  • PoolFormer models w/ weights adapted from https://github.com/sail-sg/poolformer
  • VOLO models w/ weights adapted from https://github.com/sail-sg/volo
  • Significant work experimenting with non-BatchNorm norm layers such as EvoNorm, FilterResponseNorm, GroupNorm, etc
  • Enhance support for alternate norm + act ('NormAct') layers added to a number of models, esp EfficientNet/MobileNetV3, RegNet, and aligned Xception
  • Grouped conv support added to EfficientNet family
  • Add 'group matching' API to all models to allow grouping model parameters for application of 'layer-wise' LR decay, lr scale added to LR scheduler
  • Gradient checkpointing support added to many models
  • forward_head(x, pre_logits=False) fn added to all models to allow separate calls of forward_features + forward_head
  • All vision transformer and vision MLP models update to return non-pooled / non-token selected features from foward_features, for consistency with CNN models, token selection or pooling now applied in forward_head

Feb 2, 2022

  • Chris Hughes posted an exhaustive run through of timm on his blog yesterday. Well worth a read. Getting Started with PyTorch Image Models (timm): A Practitioner’s Guide
  • I'm currently prepping to merge the norm_norm_norm branch back to master (ver 0.6.x) in next week or so.
    • The changes are more extensive than usual and may destabilize and break some model API use (aiming for full backwards compat). So, beware pip install git+https://github.com/rwightman/pytorch-image-models installs!
    • 0.5.x releases and a 0.5.x branch will remain stable with a cherry pick or two until dust clears. Recommend sticking to pypi install for a bit if you want stable.
Apr 3, 2022
Swin Transformer V2 (CR) weights and experiments

This release holds weights for timm's variant of Swin V2 (from @ChristophReich1996 impl, https://github.com/ChristophReich1996/Swin-Transformer-V2)

NOTE: ns variants of the models have extra norms on the main branch at the end of each stage, this seems to help training. The current small model is not using this, but currently training one. Will have a non-ns tiny soon as well as a comparsion. in21k and 1k base models are also in the works...

small checkpoints trained on TPU-VM instances via the TPU-Research Cloud (https://sites.research.google/trc/about/)

  • swin_v2_tiny_ns_224 - 81.80 top-1
  • swin_v2_small_224 - 83.13 top-1
  • swin_v2_small_ns_224 - 83.5 top-1
Mar 18, 2022
TPU VM trained weight release w/ PyTorch XLA

A wide range of mid-large sized models trained in PyTorch XLA on TPU VM instances. Demonstrating viability of the TPU + PyTorch combo for excellent image model results. All models trained w/ the bits_and_tpu branch of this codebase.

A big thanks to the TPU Research Cloud (https://sites.research.google/trc/about/) for the compute used in these experiments.

This set includes several novel weights, including EvoNorm-S RegNetZ (C/D timm variants) and ResNet-V2 model experiments, as well as custom pre-activation model variants of RegNet-Y (called RegNet-V) and Xception (Xception-P) models.

Many if not all of the included RegNet weights surpass original paper results by a wide margin and remain above other known results (e.g. recent torchvision updates) in ImageNet-1k validation and especially OOD test set / robustness performance and scaling to higher resolutions.

RegNets

  • regnety_040 - 82.3 @ 224, 82.96 @ 288
  • regnety_064 - 83.0 @ 224, 83.65 @ 288
  • regnety_080 - 83.17 @ 224, 83.86 @ 288
  • regnetv_040 - 82.44 @ 224, 83.18 @ 288 (timm pre-act)
  • regnetv_064 - 83.1 @ 224, 83.71 @ 288 (timm pre-act)
  • regnetz_040 - 83.67 @ 256, 84.25 @ 320
  • regnetz_040h - 83.77 @ 256, 84.5 @ 320 (w/ extra fc in head)

Alternative norm layers (no BN!)

  • resnetv2_50d_gn - 80.8 @ 224, 81.96 @ 288 (pre-act GroupNorm)
  • resnetv2_50d_evos 80.77 @ 224, 82.04 @ 288 (pre-act EvoNormS)
  • regnetz_c16_evos - 81.9 @ 256, 82.64 @ 320 (EvoNormS)
  • regnetz_d8_evos - 83.42 @ 256, 84.04 @ 320 (EvoNormS)

Xception redux

  • xception41p - 82 @ 299 (timm pre-act)
  • xception65 - 83.17 @ 299
  • xception65p - 83.14 @ 299 (timm pre-act)

ResNets (w/ SE and/or NeXT)

  • resnext101_64x4d - 82.46 @ 224, 83.16 @ 288
  • seresnext101_32x8d - 83.57 @ 224, 84.27 @ 288
  • seresnext101d_32x8d - 83.69 @ 224, 84.35 @ 288
  • seresnextaa101d_32x8d - 83.85 @ 224, 84.57 @ 288
  • resnetrs200 - 83.85 @ 256, 84.44 @ 320

Vision transformer experiments -- relpos, residual-post-norm, layer-scale, fc-norm, and GAP

  • vit_relpos_base_patch32_plus_rpn_256 - 79.5 @ 256, 80.6 @ 320 -- rel pos + extended width + res-post-norm, no class token, avg pool
  • vit_relpos_small_patch16_224 - 81.5 @ 224, 82.5 @ 320 -- rel pos, layer scale, no class token, avg pool
  • vit_relpos_medium_patch16_rpn_224 - 82.3 @ 224, 83.1 @ 320 -- rel pos + res-post-norm, no class token, avg pool
  • vit_base_patch16_rpn_224 - 82.3 @ 224 -- rel pos + res-post-norm, no class token, avg pool
  • vit_relpos_medium_patch16_224 - 82.5 @ 224, 83.3 @ 320 -- rel pos, layer scale, no class token, avg pool
  • vit_relpos_base_patch16_224 - 82.5 @ 224, 83.6 @ 320 -- rel pos, layer scale, no class token, avg pool
  • vit_relpos_base_patch16_gapcls_224 - 82.8 @ 224, 83.9 @ 320 -- rel pos, layer scale, class token, avg pool (by mistake)
Jan 31, 2022
MobileViT weights

Pretrained weights for MobileViT and MobileViT-V2 adapted from Apple impl at https://github.com/apple/ml-cvnets

Checkpoints remapped to timm impl of the model with BGR corrected to RGB (for V1).

Jan 17, 2022
v0.5.4 - More weights, models. ResNet strikes back, self-attn - convnet hybrids, optimizers and more
Oct 4, 2021

Weights for ResNet Strikes Back

Paper: https://arxiv.org/abs/2110.00476

More details on weights and hparams to come...

Sep 4, 2021

A collection of weights I've trained comparing various types of SE-like (SE, ECA, GC, etc), self-attention (bottleneck, halo, lambda) blocks, and related non-attn baselines.

ResNet-26-T series

  • [2, 2, 2, 2] repeat Bottlneck block ResNet architecture
  • ReLU activations
  • 3 layer stem with 24, 32, 64 chs, max-pool
  • avg pool in shortcut downsample
  • self-attn blocks replace 3x3 in both blocks for last stage, and second block of penultimate stage
modeltop1top1_errtop5top5_errparam_countimg_sizecropt_pctinterpolation
botnet26t_25679.24620.75494.535.4712.492560.95bicubic
halonet26t79.1320.8794.3145.68612.482560.95bicubic
lambda_resnet26t79.11220.88894.595.4110.962560.94bicubic
lambda_resnet26rpt_25678.96421.03694.4285.57210.992560.94bicubic
resnet26t77.87222.12893.8346.16616.012560.94bicubic

Details:

  • HaloNet - 8 pixel block size, 2 pixel halo (overlap), relative position embedding
  • BotNet - relative position embedding
  • Lambda-ResNet-26-T - 3d lambda conv, kernel = 9
  • Lambda-ResNet-26-RPT - relative position embedding

Benchmark - RTX 3090 - AMP - NCHW - NGC 21.09

modelinfer_samples_per_secinfer_step_timeinfer_batch_sizeinfer_img_sizetrain_samples_per_sectrain_step_timetrain_batch_sizetrain_img_sizeparam_count
resnet26t2967.5586.252256256857.62297.98425625616.01
botnet26t_2562642.0896.879256256809.41315.70625625612.49
halonet26t2601.9198.375256256783.92325.97625625612.48
lambda_resnet26t2354.1108.732256256697.28366.52125625610.96
lambda_resnet26rpt_2561847.34138.563256256644.84197.89212825610.99

Benchmark - RTX 3090 - AMP - NHWC - NGC 21.09

modelinfer_samples_per_secinfer_step_timeinfer_batch_sizeinfer_img_sizetrain_samples_per_sectrain_step_timetrain_batch_sizetrain_img_sizeparam_count
resnet26t3691.9469.3272562561188.17214.9625625616.01
botnet26t_2563291.6377.762562561126.68226.65325625612.49
halonet26t3230.579.2322562561077.82236.93425625612.48
lambda_resnet26rpt_2562324.15110.133256256864.42147.48512825610.99
lambda_resnet26tNot Supported

ResNeXT-26-T series

  • [2, 2, 2, 2] repeat Bottlneck block ResNeXt architectures
  • SiLU activations
  • grouped 3x3 convolutions in bottleneck, 32 channels per group
  • 3 layer stem with 24, 32, 64 chs, max-pool
  • avg pool in shortcut downsample
  • channel attn (active in non self-attn blocks) between 3x3 and last 1x1 conv
  • when active, self-attn blocks replace 3x3 conv in both blocks for last stage, and second block of penultimate stage
modeltop1top1_errtop5top5_errparam_countimg_sizecropt_pctinterpolation
eca_halonext26ts79.48420.51694.6005.40010.762560.94bicubic
eca_botnext26ts_25679.27020.73094.5945.40610.592560.95bicubic
bat_resnext26ts78.26821.73294.15.910.732560.9bicubic
seresnext26ts77.85222.14893.7846.21610.392560.9bicubic
gcresnext26ts77.80422.19693.8246.17610.482560.9bicubic
eca_resnext26ts77.44622.55493.576.4310.32560.9bicubic
resnext26ts76.76423.23693.1366.86410.32560.9bicubic

Benchmark - RTX 3090 - AMP - NCHW - NGC 21.09

modelinfer_samples_per_secinfer_step_timeinfer_batch_sizeinfer_img_sizetrain_samples_per_sectrain_step_timetrain_batch_sizetrain_img_sizeparam_count
resnext26ts3006.5785.134256256864.4295.64625625610.3
seresnext26ts2931.2787.321256256836.92305.19325625610.39
eca_resnext26ts2925.4787.495256256837.78305.00325625610.3
gcresnext26ts2870.0189.186256256818.35311.9725625610.48
eca_botnext26ts_2562652.0396.513256256790.43323.25725625610.59
eca_halonext26ts2593.0398.705256256766.07333.54125625610.76
bat_resnext26ts2469.78103.64256256697.21365.96425625610.73

Benchmark - RTX 3090 - AMP - NHWC - NGC 21.09

NOTE: there are performance issues with certain grouped conv configs with channels last layout, backwards pass in particular is really slow. Also causing issues for RegNet and NFNet networks.

modelinfer_samples_per_secinfer_step_timeinfer_batch_sizeinfer_img_sizetrain_samples_per_sectrain_step_timetrain_batch_sizetrain_img_sizeparam_count
resnext26ts3952.3764.755256256608.67420.04925625610.3
eca_resnext26ts3815.7767.074256256594.35430.14625625610.3
seresnext26ts3802.7567.304256256592.82431.1425625610.39
gcresnext26ts3626.9770.57256256581.83439.11925625610.48
eca_botnext26ts_2563515.8472.8256256611.71417.86225625610.59
eca_halonext26ts3410.1275.057256256597.52427.78925625610.76
bat_resnext26ts3053.8383.811256256533.23478.83925625610.73

ResNet-33-T series.

  • [2, 3, 3, 2] repeat Bottlneck block ResNet architecture
  • SiLU activations
  • 3 layer stem with 24, 32, 64 chs, no max-pool, 1st and 3rd conv stride 2
  • avg pool in shortcut downsample
  • channel attn (active in non self-attn blocks) between 3x3 and last 1x1 conv
  • when active, self-attn blocks replace 3x3 conv last block of stage 2 and 3, and both blocks of final stage
  • FC 1x1 conv between last block and classifier

The 33-layer models have an extra 1x1 FC layer between last conv block and classifier. There is both a non-attenion 33 layer baseline and a 32 layer without the extra FC.

modeltop1top1_errtop5top5_errparam_countimg_sizecropt_pctinterpolation
sehalonet33ts80.98619.01495.2724.72813.692560.94bicubic
seresnet33ts80.38819.61295.1084.89219.782560.94bicubic
eca_resnet33ts80.13219.86895.0544.94619.682560.94bicubic
gcresnet33ts79.9920.0194.9885.01219.882560.94bicubic
resnet33ts79.35220.64894.5965.40419.682560.94bicubic
resnet32ts79.02820.97294.4445.55617.962560.94bicubic

Benchmark - RTX 3090 - AMP - NCHW - NGC 21.09

modelinfer_samples_per_secinfer_step_timeinfer_batch_sizeinfer_img_sizetrain_samples_per_sectrain_step_timetrain_batch_sizetrain_img_sizeparam_count
resnet32ts2502.96102.266256256733.27348.50725625617.96
resnet33ts2473.92103.466256256725.34352.30925625619.68
seresnet33ts2400.18106.646256256695.19367.41325625619.78
eca_resnet33ts2394.77106.886256256696.93366.63725625619.68
gcresnet33ts2342.81109.257256256678.22376.40425625619.88
sehalonet33ts1857.65137.794256256577.34442.54525625613.69

Benchmark - RTX 3090 - AMP - NHWC - NGC 21.09

modelinfer_samples_per_secinfer_step_timeinfer_batch_sizeinfer_img_sizetrain_samples_per_sectrain_step_timetrain_batch_sizetrain_img_sizeparam_count
resnet32ts3306.2277.4162562561012.82252.15825625617.96
resnet33ts3257.5978.5732562561002.38254.77825625619.68
seresnet33ts3128.0881.826256256950.27268.58125625619.78
eca_resnet33ts3127.1181.852256256948.84269.12325625619.68
gcresnet33ts2984.8785.753256256916.98278.16925625619.88
sehalonet33ts2188.23116.975256256711.63179.0312825613.69

ResNet-50(ish) models

In Progress

RegNet"Z" series

  • RegNetZ inspired architecture, inverted bottleneck, SE attention, pre-classifier FC, essentially an EfficientNet w/ grouped conv instead of depthwise
  • b, c, and d are three different sizes I put together to cover differing flop ranges, not based on the paper (https://arxiv.org/abs/2103.06877) or a search process
  • for comparison to RegNetY and paper RegNetZ models, at 224x224 b,c, and d models are 1.45, 1.92, and 4.58 GMACs respectively, b, and c are trained at 256 here so higher than that (see tables)
  • haloregnetz_c uses halo attention for all of last stage, and interleaved every 3 (for 4) of penultimate stage
  • b, c variants use a stem / 1st stage like the paper, d uses a 3-deep tiered stem with 2-1-2 striding

ImageNet-1k validation at train resolution

modeltop1top1_errtop5top5_errparam_countimg_sizecropt_pctinterpolation
regnetz_d83.42216.57896.6363.36427.582560.95bicubic
regnetz_c82.16417.83696.0583.94213.462560.94bicubic
haloregnetz_b81.05818.94295.24.811.682240.94bicubic
regnetz_b79.86820.13294.9885.0129.722240.94bicubic

ImageNet-1k validation at optimal test res

modeltop1top1_errtop5top5_errparam_countimg_sizecropt_pctinterpolation
regnetz_d84.0415.9696.873.1327.583200.95bicubic
regnetz_c82.51617.48496.3563.64413.463200.94bicubic
haloregnetz_b81.05818.94295.24.811.682240.94bicubic
regnetz_b80.72819.27295.474.539.722880.94bicubic

Benchmark - RTX 3090 - AMP - NCHW - NGC 21.09

modelinfer_samples_per_secinfer_step_timeinfer_batch_sizeinfer_img_sizeinfer_GMACstrain_samples_per_sectrain_step_timetrain_batch_sizetrain_img_sizeparam_count
regnetz_b2703.4294.682562241.45764.85333.3482562249.72
haloregnetz_b2086.22122.6952562241.88620.1411.41525622411.68
regnetz_c1653.19154.8362562562.51459.41277.26812825613.46
regnetz_d1060.91241.2842562565.98296.51430.14312825627.58

Benchmark - RTX 3090 - AMP - NHWC - NGC 21.09

NOTE: channels last layout is painfully slow for backward pass here due to some sort of cuDNN issue

modelinfer_samples_per_secinfer_step_timeinfer_batch_sizeinfer_img_sizeinfer_GMACstrain_samples_per_sectrain_step_timetrain_batch_sizetrain_img_sizeparam_count
regnetz_b4152.5961.6342562241.45399.37639.5722562249.72
haloregnetz_b2770.7892.3782562241.88364.22701.38625622411.68
regnetz_c2512.4101.8782562562.51376.72338.37212825613.46
regnetz_d1456.05175.82562565.98111.321148.27912825627.58
Jun 30, 2021
v0.4.12. Vision Transformer AugReg support and more
  • Vision Transformer AugReg weights and model defs (https://arxiv.org/abs/2106.10270)
  • ResMLP official weights
  • ECA-NFNet-L2 weights
  • gMLP-S weights
  • ResNet51-Q
  • Visformer, LeViT, ConViT, Twins
  • Many fixes, improvements, better test coverage
May 21, 2021
3rd Party Vision Transformer Weights

A catch-all (ish) release for storing vision transformer weights adapted/rehosted from 3rd parties. Too many incoming models for one release per source...

Containing weights from:

May 18, 2021
v0.4.9. EfficientNetV2. MLP-Mixer. ResNet-RS. More vision transformers.
May 14, 2021
EfficientNet-V2 weights ported from Tensorflow impl

Weights from https://github.com/google/automl/tree/master/efficientnetv2

Paper: EfficientNetV2: Smaller Models and Faster Training - https://arxiv.org/abs/2104.00298

May 4, 2021
ResNet-RS weights

Weights for ResNet-RS models as per #554 . Ported from Tensorflow impl (https://github.com/tensorflow/tpu/tree/master/models/official/resnet/resnet_rs) by @amaarora

Apr 28, 2021
Weights for CoaT (vision transformer) models

Weights for CoaT: Co-Scale Conv-Attentional Image Transformers (from https://github.com/mlpc-ucsd/CoaT)

Mar 31, 2021
Weights for PiT (Pooling-based Vision Transformer) models

Weights from https://github.com/naver-ai/pit

Copyright 2021-present NAVER Corp.

Rehosted here for easy pytorch hub downloads.

Mar 8, 2021
v0.4.5. Lots of models. NFNets (& NF-ResNet, NF-RegNet), GPU-Efficient Nets, RepVGG, VGG.
Feb 18, 2021
DeepMind NFNet-F* weights

Weights converted from DeepMind Haiku impl of NFNets (https://github.com/deepmind/deepmind-research/tree/master/nfnets)

Latest
v1.0.26
Tracking Since
May 31, 2019
Last fetched Apr 18, 2026