PyTorch Image Models (timm) bundles hundreds of vision architectures, pretrained weights, and training tooling. Import models and scripts for train, eval, inference, and export.
Overview
PyTorch Image Models, commonly called timm, is a Python library that centralizes image classification and vision backbones implemented in PyTorch. The collection spans numerous architecture families, including ResNet, EfficientNet, Vision Transformers, MobileNet variants, ConvNeXt, Swin, and many others, often with pretrained weights.
Beyond model definitions, timm packages layers, optimizers, learning-rate schedulers, data loaders, augmentations, and scripts for training, validation, inference, and ONNX or Hub export. Flexible factory APIs discover, load, and adapt models, including classifier resets, intermediate feature extraction, and resizing inputs for windowed architectures.
Recent releases highlight multi-label training, NaFlex variable-resolution ViT pipelines, hyperparameter sweeps, optimizer improvements, and broad maintenance across model families. Weights and implementations are designed for both research experimentation and production-oriented inference workflows.
Timm is a broad, maintained catalog of state-of-the-art vision components rather than a single end-user application, meant to be imported into your own PyTorch code or driven through the provided command-line training scripts.
Key features
- Large catalog of vision architectures
- Pretrained weights and hub integration
- Training validation and inference scripts
- Data loaders and augmentation pipelines
- Optimizers and LR schedulers
- Feature extraction and model surgery APIs
- Multi-label and distillation training options
- ONNX and Hugging Face export helpers
Use cases
- Image classification research
- Fine-tuning pretrained backbones
- Benchmarking vision architectures
- Production inference with PyTorch
- Exporting encoders to other runtimes