pytorch-image-models  by huggingface

PyTorch image model collection with training, eval, and inference scripts

created 6 years ago
34,917 stars

Top 1.0% on sourcepulse

GitHubView on GitHub
Project Summary

PyTorch Image Models (timm) is a comprehensive PyTorch library providing a vast collection of state-of-the-art image classification models, layers, utilities, and training scripts. It aims to facilitate research and development in computer vision by offering easy access to diverse architectures and pretrained weights, catering to researchers and practitioners.

How It Works

timm aggregates numerous vision model architectures, including popular ones like ResNet, EfficientNet, Vision Transformer (ViT), and ConvNeXt, along with many less common ones. It provides pretrained weights for most models, often trained on ImageNet, and includes utilities for feature extraction, multi-scale processing, and various regularization techniques. The library also offers a wide range of optimizers and learning rate schedulers, promoting reproducible research.

Quick Start & Requirements

Highlighted Details

  • Supports over 1000 model architectures with pretrained weights.
  • Includes advanced features like features_only extraction and forward_intermediates API.
  • Offers a wide array of optimizers (e.g., AdamW, LAMB, Lion, Adan) and augmentation techniques (e.g., Mixup, CutMix, AutoAugment).
  • Provides reference training, validation, and inference scripts with support for distributed training and mixed-precision.

Maintenance & Community

  • Actively maintained by Ross Wightman.
  • Extensive list of contributors and references to original papers.
  • Links to Hugging Face Hub for models and documentation.

Licensing & Compatibility

  • Code licensed under Apache 2.0.
  • Pretrained weights are subject to the licenses of the datasets they were trained on (primarily ImageNet, with potential non-commercial restrictions for some models). Commercial use of weights requires careful consideration of dataset licenses and potentially seeking legal advice.

Limitations & Caveats

The use of pretrained weights for commercial products may be restricted due to ImageNet's non-commercial license and specific licenses of proprietary datasets used for some models (e.g., Facebook's WSL/SSL models). Users should verify licensing compliance for their specific use case.

Health Check
Last commit

19 hours ago

Responsiveness

1 day

Pull Requests (30d)
17
Issues (30d)
13
Star History
1,056 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.