gen-efficientnet-pytorch  by rwightman

PyTorch image models for efficient architectures

Created 6 years ago
1,579 stars

Top 26.5% on SourcePulse

GitHubView on GitHub
Project Summary

This repository provides PyTorch implementations of various efficient convolutional neural network architectures, including EfficientNet variants, MixNet, MobileNetV3/V2, and others. It offers pretrained weights for many models, enabling researchers and practitioners to leverage state-of-the-art computer vision models with ease.

How It Works

The project implements a flexible architecture definition system using string-based configurations to define block layouts. This approach allows for easy customization and experimentation with different network structures derived from the MobileNet V1/V2 block sequence. It also includes memory-efficient autograd functions for Swish/Mish activations and supports exporting models to ONNX and Caffe2 formats.

Quick Start & Requirements

  • Install: pip install geffnet
  • Prerequisites: PyTorch (versions 1.4, 1.5, 1.6 tested), Python 3.6-3.8. CUDA is recommended for GPU acceleration.
  • Usage: Models can be loaded via PyTorch Hub (torch.hub.load('rwightman/gen-efficientnet-pytorch', 'model_name', pretrained=True)) or directly using geffnet.create_model('model_name', pretrained=True).
  • Documentation: PyTorch Hub API, Pip Install

Highlighted Details

  • Implements a wide range of efficient architectures: EfficientNet (NoisyStudent, AdvProp, EdgeTPU, CondConv, Lite), MixNet, MNASNet, MobileNetV3/V2, FBNet, Single-Path NAS.
  • Provides extensive pretrained weights, with many achieving accuracies close to or exceeding original paper implementations.
  • Includes scripts for exporting models to ONNX and Caffe2, with validation and benchmarking utilities.
  • Supports memory-efficient Swish/Mish activations and torch.jit.script compatibility for many models.

Maintenance & Community

  • NOTE: This repository is not being maintained. Users are directed to use timm instead, which includes all these models and more.
  • The primary contributor is rwightman.

Licensing & Compatibility

  • The repository does not explicitly state a license in the README. However, it is common for such projects to be MIT or Apache licensed. Given the recommendation to use timm, which is Apache 2.0 licensed, commercial use is likely permissible.

Limitations & Caveats

  • The project is explicitly marked as not being maintained.
  • ONNX export and optimization compatibility can be fragile across PyTorch and ONNX version updates.
  • TF ported models with 'SAME' padding require specific export flags (config.set_exportable(True)) and may have fixed padding at export time.
Health Check
Last Commit

1 year ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
3 stars in the last 30 days

Explore Similar Projects

Starred by François Chollet François Chollet(Author of Keras; Cofounder of Ndea, ARC Prize), Chaoyu Yang Chaoyu Yang(Founder of Bento), and
13 more.

neon by NervanaSystems

0%
4k
Deep learning framework (discontinued)
Created 11 years ago
Updated 4 years ago
Starred by Chip Huyen Chip Huyen(Author of "AI Engineering", "Designing Machine Learning Systems"), Soumith Chintala Soumith Chintala(Coauthor of PyTorch), and
1 more.

jetson-inference by dusty-nv

0.1%
9k
Vision DNN library for NVIDIA Jetson devices
Created 9 years ago
Updated 11 months ago
Feedback? Help us improve.