bearpaw/pytorch-classification

Classification with PyTorch.

Python

1,738

46 commits

updated Jun 18, 2024

See the code

README

pytorch-classification

Classification on CIFAR-10/100 and ImageNet with PyTorch.

Features

  • Unified interface for different network architectures
  • Multi-GPU support
  • Training progress bar with rich info
  • Training log and training curve visualization code (see ./utils/logger.py)

Install

  • Install PyTorch
  • Clone recursively
    git clone --recursive https://github.com/bearpaw/pytorch-classification.git
    

Training

Please see the Training recipes for how to train the models.

Results

CIFAR

Top1 error rate on the CIFAR-10/100 benchmarks are reported. You may get different results when training your models with different random seed. Note that the number of parameters are computed on the CIFAR-10 dataset.

ModelParams (M)CIFAR-10 (%)CIFAR-100 (%)
alexnet2.4722.7856.13
vgg19_bn20.046.6628.05
ResNet-1101.706.1128.86
PreResNet-1101.704.9423.65
WRN-28-10 (drop 0.3)36.483.7918.14
ResNeXt-29, 8x6434.433.6917.38
ResNeXt-29, 16x6468.163.5317.30
DenseNet-BC (L=100, k=12)0.774.5422.88
DenseNet-BC (L=190, k=40)25.623.3217.17

cifar

ImageNet

Single-crop (224x224) validation error rate is reported.

ModelParams (M)Top-1 Error (%)Top-5 Error (%)
ResNet-1811.6930.0910.78
ResNeXt-50 (32x4d)25.0322.66.29

Validation curve

Pretrained models

Our trained models and training logs are downloadable at OneDrive.

Supported Architectures

CIFAR-10 / CIFAR-100

Since the size of images in CIFAR dataset is 32x32, popular network structures for ImageNet need some modifications to adapt this input size. The modified models is in the package models.cifar:

ImageNet

Contribute

Feel free to create a pull request if you find any bugs or you want to contribute (e.g., more datasets and more network structures).

cifar10
cifar100
classification
densenet
imagenet
preresnet
pytorch
resnet
resnext
wide-residual-networks
wrn

bearpaw/pytorch-classification

Classification with PyTorch.

Python

1,738

46 commits

updated Jun 18, 2024

See the code

README

pytorch-classification

Classification on CIFAR-10/100 and ImageNet with PyTorch.

Features

  • Unified interface for different network architectures
  • Multi-GPU support
  • Training progress bar with rich info
  • Training log and training curve visualization code (see ./utils/logger.py)

Install

  • Install PyTorch
  • Clone recursively
    git clone --recursive https://github.com/bearpaw/pytorch-classification.git
    

Training

Please see the Training recipes for how to train the models.

Results

CIFAR

Top1 error rate on the CIFAR-10/100 benchmarks are reported. You may get different results when training your models with different random seed. Note that the number of parameters are computed on the CIFAR-10 dataset.

ModelParams (M)CIFAR-10 (%)CIFAR-100 (%)
alexnet2.4722.7856.13
vgg19_bn20.046.6628.05
ResNet-1101.706.1128.86
PreResNet-1101.704.9423.65
WRN-28-10 (drop 0.3)36.483.7918.14
ResNeXt-29, 8x6434.433.6917.38
ResNeXt-29, 16x6468.163.5317.30
DenseNet-BC (L=100, k=12)0.774.5422.88
DenseNet-BC (L=190, k=40)25.623.3217.17

cifar

ImageNet

Single-crop (224x224) validation error rate is reported.

ModelParams (M)Top-1 Error (%)Top-5 Error (%)
ResNet-1811.6930.0910.78
ResNeXt-50 (32x4d)25.0322.66.29

Validation curve

Pretrained models

Our trained models and training logs are downloadable at OneDrive.

Supported Architectures

CIFAR-10 / CIFAR-100

Since the size of images in CIFAR dataset is 32x32, popular network structures for ImageNet need some modifications to adapt this input size. The modified models is in the package models.cifar:

ImageNet

Contribute

Feel free to create a pull request if you find any bugs or you want to contribute (e.g., more datasets and more network structures).

cifar10
cifar100
classification
densenet
imagenet
preresnet
pytorch
resnet
resnext
wide-residual-networks
wrn

Significant stargazers

Wang Ran (汪然)

69 followers · starred Dec 2017

Zirui Wang

93 followers · starred Jan 2021

Yin Cui

296 followers · starred Oct 2018

Yanze Wu

234 followers · starred Jan 2019