{"full_name":"huggingface/pytorch-image-models","owner":"huggingface","name":"pytorch-image-models","url":"https://github.com/huggingface/pytorch-image-models","description":"The largest collection of PyTorch image encoders / backbones. Including train, eval, inference, export scripts, and pretrained weights -- ResNet, ResNeXT, EfficientNet, NFNet, Vision Transformer (ViT), MobileNetV4, MobileNet-V3 & V2, RegNet, DPN, CSPNet, Swin Transformer, MaxViT, CoAtNet, ConvNeXt, and more","homepage":"https://huggingface.co/docs/timm","topics":[],"language":"Python","license":"Apache-2.0","avatar":"https://avatars.githubusercontent.com/u/25720743?v=4","created_at":"2019-02-02T05:51:12Z","pushed_at":"2026-11-07T23:22:52Z","metrics":{"stars":37272,"forks":5227,"watchers":316,"issues":1050,"prs":901,"releases":81,"issues_open":null,"issues_closed":null,"prs_open":null,"prs_closed":null,"prs_merged":null,"discussions":698},"growth":{"day":{"stars":4,"forks":1,"base_day":"2026-11-09"},"week":{"stars":9,"forks":4,"base_day":"2026-11-03"},"month":{"stars":64,"forks":12,"base_day":"2026-10-11"}},"history":{"dates":["2026-09-06","2026-09-07","2026-09-08","2026-09-09","2026-09-10","2026-09-11","2026-09-12","2026-09-13","2026-09-14","2026-09-15","2026-09-16","2026-09-17","2026-09-18","2026-09-19","2026-09-20","2026-09-21","2026-09-22","2026-09-23","2026-09-24","2026-09-25","2026-09-26","2026-09-27","2026-09-28","2026-09-29","2026-09-30","2026-10-01","2026-10-02","2026-10-03","2026-10-04","2026-10-05","2026-10-06","2026-10-07","2026-10-08","2026-10-09","2026-10-10","2026-10-11","2026-10-12","2026-10-13","2026-10-14","2026-10-15","2026-10-16","2026-10-17","2026-10-18","2026-10-19","2026-10-20","2026-10-21","2026-10-22","2026-10-23","2026-10-24","2026-10-25","2026-10-26","2026-10-27","2026-10-28","2026-10-29","2026-10-30","2026-10-31","2026-11-01","2026-11-02","2026-11-03","2026-11-04","2026-11-09","2026-11-10"],"stars":[37127,37129,37132,37134,37134,37136,37138,37138,37139,37142,37144,37148,37151,37156,37158,37162,37162,37168,37173,37172,37172,37171,37174,37174,37177,37182,37186,37186,37189,37191,37193,37196,37198,37202,37204,37208,37208,37209,37213,37214,37218,37222,37225,37226,37226,37230,37231,37233,37236,37238,37244,37249,37252,37256,37260,37261,37261,37262,37263,37262,37268,37272],"forks":[5195,5194,5193,5193,5192,5192,5193,5193,5193,5194,5195,5195,5196,5196,5195,5196,5197,5201,5203,5202,5203,5204,5204,5207,5208,5213,5214,5214,5215,5215,5215,5215,5216,5214,5213,5215,5215,5215,5217,5216,5216,5216,5216,5215,5216,5217,5217,5217,5217,5216,5218,5220,5221,5221,5224,5223,5223,5224,5223,5223,5226,5227],"watchers":[324,325,325,324,324,324,324,324,324,324,324,324,324,324,324,324,324,323,322,322,322,322,322,322,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,321,320,320,321,321,316,316,315,315,315,315,315,315,315,315,315,316,316],"issues_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null],"prs_open":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null]},"boards":{},"same_owner":[{"full_name":"huggingface/transformers","name":"transformers","boards":{"total":54}},{"full_name":"huggingface/OpenEnv","name":"OpenEnv","boards":{}},{"full_name":"huggingface/accelerate","name":"accelerate","boards":{}},{"full_name":"huggingface/agents-course","name":"agents-course","boards":{}},{"full_name":"huggingface/alignment-handbook","name":"alignment-handbook","boards":{}},{"full_name":"huggingface/diffusers","name":"diffusers","boards":{}},{"full_name":"huggingface/ml-intern","name":"ml-intern","boards":{}},{"full_name":"huggingface/parler-tts","name":"parler-tts","boards":{}},{"full_name":"huggingface/sentence-transformers","name":"sentence-transformers","boards":{}},{"full_name":"huggingface/skills","name":"skills","boards":{}},{"full_name":"huggingface/smolagents","name":"smolagents","boards":{}},{"full_name":"huggingface/speech-to-speech","name":"speech-to-speech","boards":{}},{"full_name":"huggingface/transformers.js","name":"transformers.js","boards":{}},{"full_name":"huggingface/trl","name":"trl","boards":{}}],"issues":[{"number":1353,"title":"[FEATURE] Detection models with loss functions and trainers","comments":8,"created_at":"2022-07-17T08:47:10Z"},{"number":2628,"title":"[FEATURE] 3D model support for volumetric / medical imaging in timm","comments":7,"created_at":"2025-12-10T08:06:56Z"},{"number":1529,"title":"[FEATURE] convert model for 1D inputs","comments":7,"created_at":"2022-11-02T11:21:10Z"},{"number":2540,"title":"[FEATURE] Unified `embed` Interfaces for Vision Transformer Models for MIM Pretrain Research","comments":5,"created_at":"2025-07-09T05:19:05Z"},{"number":650,"title":"Video dataset support","comments":4,"created_at":"2021-05-20T03:23:33Z"},{"number":2607,"title":"[FEATURE] [RFC] Support for interchangable attention backends","comments":1,"created_at":"2025-11-08T08:28:11Z"},{"number":2056,"title":"VAE or VQ-VAE  is needed","comments":1,"created_at":"2023-12-15T03:03:58Z"},{"number":1475,"title":"[FEATURE] Support variable input size of maxvit and coatnet","comments":1,"created_at":"2022-09-25T12:37:05Z"}],"discussions":[{"number":2830,"title":"Would optional whole-block scaling be a useful addition to NaFlexViT?","comments":1,"category":"Contributing","created_at":"2026-10-03T21:20:53Z"},{"number":2731,"title":"Is NaFlex IterableDataset support available to contribute?","comments":1,"category":"Contributing","created_at":"2026-08-02T14:50:59Z"},{"number":2724,"title":"Seeking Advice on Hysteroscopy Lesion Classification with Transfer Learning","comments":1,"category":"Q&A","created_at":"2026-07-20T14:12:04Z"},{"number":2667,"title":"Schedule Free Optimizer","comments":1,"category":"General","created_at":"2026-02-13T19:34:52Z"},{"number":2660,"title":"Importing VISSL models","comments":1,"category":"General","created_at":"2026-02-03T08:57:31Z"},{"number":2651,"title":"Why does mobilenetv4_conv_small model training fail to converge?","comments":1,"category":"Q&A","created_at":"2026-01-20T05:55:43Z"},{"number":2646,"title":"Activation Visualization","comments":1,"category":"Q&A","created_at":"2026-01-06T13:47:15Z"},{"number":2619,"title":"Training code for resnet34.a1_in1k","comments":1,"category":"Q&A","created_at":"2025-12-01T13:17:10Z"}],"latest_release":{"name":"Release v1.0.31","tag":"v1.0.31","published_at":"2026-11-03T19:22:10Z","body":"## November 3, 2026\r\n\r\n* `reset_classifier()` and checkpoint reconstruction: fixes across ViT, EVA, BEiT, NaFlexViT, RepViT and iFormer\r\n  preserve normalization placement and distillation settings when exporting / reloading models after changing the\r\n  classifier or pooling. Also fix unpooled PiT export and EfficientFormerV2 with distillation disabled.\r\n* NaFlex: fix ViT / EVA norm placement during conversion, support SwiGLU alignment for DINOv3 / Lingbot checkpoints,\r\n  and preserve grayscale / non-RGB input channels in data loaders.\r\n* Fix layer-wise LR decay grouping for RepViT, HGNet, MViTv2 and pre-norm ViTs, and InceptionNeXt feature sizes with\r\n  `output_stride=8/16`.\r\n* Release 1.0.31.\r\n\r\n## October 24, 2026\r\n\r\n* `forward_intermediates()` and `prune_intermediate_layers()` are now supported by every model. Newly added for CSPNet, NFNet, DLA, DenseNet (#2870, thanks [ghaith-mq](https://github.com/ghaith-mq)), CoaT, ConViT, ConvMixer, CrossViT, HRNet, Inception-v3, Inception-ResNet-v2, NASNet, PNASNet, SelecSLS, SENet, Sequencer2d, VGG, Visformer, Xception and Aligned Xception, with `prune_intermediate_layers()` for NaFlexViT and MobileNetV5 encoders. CoaT, ConViT, ConvMixer, CrossViT and Visformer gain `features_only` support.\r\n* `prune_intermediate_layers()` fixes\r\n  * `prune_head=True` removes the whole head (head norm, pre-logits layers, attention pooling) so the pruned model leaves no unused params (DDP w/o `find_unused_parameters`), except CoaT, CrossViT and HRNet when only some of their parallel scales / branches are taken. Pass `prune_head=False` to keep it.\r\n  * Pruning a hierarchical model to an earlier stage removes the final norm and head sized for the last stage, `forward_features()` ends at the last kept feature and `num_features` / `head_hidden_size` match it. Pruning to the stem feature removes the stem pooling after it.\r\n  * Fixes for grad checkpointing, `stop_early`, class token / post network removal, and TorchScript of pruned / `feature_cls='getter'` models across many families.\r\n* `head_hidden_size` is the actual pre-logits (pooled) width in all models, including concat pooling (`catavgmax`) and after `reset_classifier()`. Pool types a model can't apply now raise at creation / reset instead of being silently ignored or failing in forward.\r\n* Other fixes: VOLO `num_classes=0` output is the class token embedding (matching `forward_head(pre_logits=True)`), `vit_pe_core` `reset_classifier()` w/ a non `map` pool removes the attention pool, pool type export via `save_for_hf` reads the head's current pooling, and headless (`num_classes=0`) Swin, SwinV2, DaViT and NextViT checkpoints reload correctly.\r\n\r\n## October 13, 2026\r\n\r\n* Hyperparameter sweeps via a new `sweep.py`: grid / random search over any `train.py` argument, one effective `--config` per job, run on a pool of local GPUs and resumable. WSD sweeps train one stable trunk per hyperparameter combination and branch independent cooldowns from its milestone checkpoints, comparing annealing at several budgets for a fraction of the cost of full runs. See the [training docs](https://huggingface.co/docs/timm/training_script#hyperparameter-sweeps).\r\n* `train.py`: `--resume auto` resumes in place from the experiment's own `last.pth.tar` (checkpoint history, `model_best` and `summary.csv` stay consistent), `--stop-epoch N` stops without changing the schedule, `--save-epochs N [N ...]` keeps `milestone-N.pth.tar` snapshots, and YAML `--config` values are validated against the script's arguments.\r\n* Deprecate `PlateauLRScheduler` (`--sched plateau`). `timm` schedulers are stateless functions of the epoch or update count, the metric-driven plateau schedule never fit that and its state is not checkpointed, so resume was never exact. Use `cosine` or `wsd`.\r\n* Docs: new [Model API](https://huggingface.co/docs/timm/model_api) page, generated model family pages for every model module replacing the old per-model pages, and expanded data / loss / models reference pages."},"readme":true,"readme_zh":false,"news":[],"stale":false,"snapshot_at":"2026-11-10T09:35:25Z","history_start":"2026-09-06"}