gitmyhub

pretrained-models.pytorch

Python ★ 9.1k updated 4y ago

Pretrained ConvNets for pytorch: NASNet, ResNeXt, ResNet, InceptionV4, InceptionResnetV2, Xception, DPN, etc.

A PyTorch library bundling over 40 image-recognition models pre-trained on ImageNet under one consistent interface, making it easy to load, swap, and fine-tune architectures for transfer learning.

PythonPyTorchsetup: easycomplexity 2/5

This repository collects a large set of image-recognition models that have already been trained on a standard large image dataset called ImageNet, packaged so they can be used directly in PyTorch. PyTorch is a popular framework for building and running machine learning systems. A pretrained model is one that has already done the computationally expensive work of learning from millions of images, so you can use its learned knowledge as a starting point rather than training from scratch.

The practical value is for a technique called transfer learning, where you take a model trained on a large general dataset and adapt it to a more specific task. For example, you might start with one of these pretrained models and fine-tune it to recognize a narrow category of images relevant to your own project. That approach typically works better and requires less data than training a model from zero.

The library bundles more than 40 different model architectures under one consistent interface. The list includes well-known designs like ResNet, Inception, Xception, NASNet, DualPathNetworks, and several variants of each. Each model in the collection exposes the same set of attributes and methods regardless of which architecture it is, which makes it straightforward to swap one model for another without rewriting surrounding code.

Installation is one pip command. Once installed, you load a model by name, pass it an image preprocessed to the right format, and get back predictions. Each model object carries metadata about what input size and pixel format it expects, so the library can handle the preprocessing differences between architectures automatically.

The README includes accuracy figures measured on the ImageNet validation set for each model, along with notes on reproducing those results. The project is marked as a work in progress and was actively updated between 2017 and 2018, with contributions from several external developers who ported additional architectures.

Where it fits