Skip to main content

Image classification models for Gluon

Project description

Image classification models on MXNet/Gluon

PyPI Downloads

This is a collection of image classification models. Many of them are pretrained on ImageNet-1K and CIFAR-10 datasets and loaded automatically during use. All pretrained models require the same ordinary normalization. Scripts for training/evaluating/converting models are in the imgclsmob repo.

List of implemented models

Installation

To use the models in your project, simply install the gluoncv2 package with mxnet:

pip install gluoncv2 mxnet>=1.2.1

To enable different hardware supports such as GPUs, check out MXNet variants. For example, you can install with CUDA-9.2 supported MXNet:

pip install gluoncv2 mxnet-cu92>=1.2.1

Usage

Example of using the pretrained ResNet-18 model:

from gluoncv2.model_provider import get_model as glcv2_get_model
import mxnet as mx

net = glcv2_get_model("resnet18", pretrained=True)
x = mx.nd.zeros((1, 3, 224, 224), ctx=mx.cpu())
y = net(x)

Pretrained models

Imagenet-1K

Some remarks:

  • Top1/Top5 are the standard 1-crop Top-1/Top-5 errors (in percents) on the validation subset of the ImageNet-1K dataset.
  • FLOPs/2 is the number of FLOPs divided by two to be similar to the number of MACs.
  • ResNet/PreResNet with b-suffix is a version of the networks with the stride in the second convolution of the bottleneck block. Respectively a network without b-suffix has the stride in the first convolution.
  • ResNet/PreResNet models do not use biases in convolutions at all.
  • CondenseNet models are only so-called converted versions.
  • ShuffleNetV2/ShuffleNetV2b/ShuffleNetV2c are different implementations of the same architecture.
Model Top1 Top5 Params FLOPs/2 Remarks
AlexNet 44.12 21.26 61,100,840 714.83M From dmlc/gluon-cv (log)
VGG-11 31.91 11.76 132,863,336 7,615.87M From dmlc/gluon-cv (log)
VGG-13 31.06 11.12 133,047,848 11,317.65M From dmlc/gluon-cv (log)
VGG-16 26.78 8.69 138,357,544 15,480.10M From dmlc/gluon-cv (log)
VGG-19 25.88 8.23 143,667,240 19,642.55M From dmlc/gluon-cv (log)
BN-VGG-11b 30.34 10.57 132,868,840 7,630.72M From dmlc/gluon-cv (log)
BN-VGG-13b 29.48 10.16 133,053,736 11,342.14M From dmlc/gluon-cv (log)
BN-VGG-16b 26.89 8.65 138,365,992 15,507.20M From dmlc/gluon-cv (log)
BN-VGG-19b 25.66 8.15 143,678,248 19,672.26M From dmlc/gluon-cv (log)
BN-Inception 25.09 7.76 11,295,240 2,048.06M From Cadene/pretrained...pytorch (log)
ResNet-10 37.09 15.55 5,418,792 894.04M Training (log)
ResNet-12 35.86 14.46 5,492,776 1,126.25M Training (log)
ResNet-14 32.85 12.41 5,788,200 1,357.94M Training (log)
ResNet-16 30.68 11.10 6,968,872 1,589.34M Training (log)
ResNet-18 x0.25 49.16 24.45 831,096 137.32M Training (log)
ResNet-18 x0.5 36.54 14.96 3,055,880 486.49M Training (log)
ResNet-18 x0.75 33.25 12.54 6,675,352 1,047.53M Training (log)
ResNet-18 28.09 9.51 11,689,512 1,820.41M Training (log)
ResNet-34 25.34 7.92 21,797,672 3,672.68M From dmlc/gluon-cv (log)
ResNet-50 22.65 6.41 25,557,032 3,877.95M From dmlc/gluon-cv (log)
ResNet-50b 22.32 6.18 25,557,032 4,110.48M From dmlc/gluon-cv (log)
ResNet-101 21.66 5.99 44,549,160 7,597.95M From dmlc/gluon-cv (log)
ResNet-101b 20.79 5.39 44,549,160 7,830.48M From dmlc/gluon-cv (log)
ResNet-152 20.76 5.35 60,192,808 11,321.85M From dmlc/gluon-cv (log)
ResNet-152b 20.31 5.25 60,192,808 11,554.38M From dmlc/gluon-cv (log)
PreResNet-18 28.16 9.51 11,687,848 1,820.56M Training (log)
PreResNet-34 25.88 8.11 21,796,008 3,672.83M From dmlc/gluon-cv (log)
PreResNet-50 23.39 6.68 25,549,480 3,875.44M From dmlc/gluon-cv (log)
PreResNet-50b 23.16 6.64 25,549,480 4,107.97M From dmlc/gluon-cv (log)
PreResNet-101 21.45 5.75 44,541,608 7,595.44M From dmlc/gluon-cv (log)
PreResNet-101b 21.73 5.88 44,541,608 7,827.97M From dmlc/gluon-cv (log)
PreResNet-152 20.70 5.32 60,185,256 11,319.34M From dmlc/gluon-cv (log)
PreResNet-152b 21.00 5.75 60,185,256 11,551.87M From dmlc/gluon-cv (log)
PreResNet-200b 21.10 5.64 64,666,280 15,068.63M From tornadomeet/ResNet (log)
ResNeXt-101 (32x4d) 21.32 5.79 44,177,704 8,003.45M From Cadene/pretrained...pytorch (log)
ResNeXt-101 (64x4d) 20.60 5.41 83,455,272 15,500.27M From Cadene/pretrained...pytorch (log)
SE-ResNet-50 22.51 6.44 28,088,024 3,880.49M From Cadene/pretrained...pytorch (log)
SE-ResNet-101 21.92 5.89 49,326,872 7,602.76M From Cadene/pretrained...pytorch (log)
SE-ResNet-152 21.48 5.77 66,821,848 11,328.52M From Cadene/pretrained...pytorch (log)
SE-ResNeXt-50 (32x4d) 21.06 5.58 27,559,896 4,258.40M From Cadene/pretrained...pytorch (log)
SE-ResNeXt-101 (32x4d) 19.99 5.00 48,955,416 8,008.26M From Cadene/pretrained...pytorch (log)
SENet-154 18.84 4.65 115,088,984 20,745.78M From Cadene/pretrained...pytorch (log)
IBN-ResNet-50 23.56 6.68 25,557,032 4,110.48M From XingangPan/IBN-Net (log)
IBN-ResNet-101 21.89 5.87 44,549,160 7,830.48M From XingangPan/IBN-Net (log)
IBN(b)-ResNet-50 23.91 6.97 25,558,568 4,112.89M From XingangPan/IBN-Net (log)
IBN-ResNeXt-101 (32x4d) 21.43 5.62 44,177,704 8,003.45M From XingangPan/IBN-Net (log)
IBN-DenseNet-121 24.98 7.47 7,978,856 2,872.13M From XingangPan/IBN-Net (log)
IBN-DenseNet-169 23.78 6.82 14,149,480 3,403.89M From XingangPan/IBN-Net (log)
AirNet50-1x64d (r=2) 22.48 6.21 27,425,864 4,772.11M From soeaver/AirNet-PyTorch (log)
AirNet50-1x64d (r=16) 22.91 6.46 25,714,952 4,399.97M From soeaver/AirNet-PyTorch (log)
AirNeXt50-32x4d (r=2) 21.51 5.75 27,604,296 5,339.58M From soeaver/AirNet-PyTorch (log)
BAM-ResNet-50 23.68 6.96 25,915,099 4,196.09M From Jongchan/attention-module (log)
CBAM-ResNet-50 23.02 6.38 28,089,624 4,116.97M From Jongchan/attention-module (log)
PyramidNet-101 (a=360) 22.72 6.52 42,455,070 8,743.54M From dyhan0920/Pyramid...PyTorch (log)
DiracNetV2-18 30.61 11.17 11,511,784 1,796.62M From szagoruyko/diracnets (log)
DiracNetV2-34 27.93 9.46 21,616,232 3,646.93M From szagoruyko/diracnets (log)
DenseNet-121 25.11 7.80 7,978,856 2,872.13M From dmlc/gluon-cv (log)
DenseNet-161 22.40 6.18 28,681,000 7,793.16M From dmlc/gluon-cv (log)
DenseNet-169 23.89 6.89 14,149,480 3,403.89M From dmlc/gluon-cv (log)
DenseNet-201 22.71 6.36 20,013,928 4,347.15M From dmlc/gluon-cv (log)
CondenseNet-74 (C=G=4) 26.82 8.64 4,773,944 546.06M From ShichenLiu/CondenseNet (log)
CondenseNet-74 (C=G=8) 29.76 10.49 2,935,416 291.52M From ShichenLiu/CondenseNet (log)
PeleeNet 31.71 11.25 2,802,248 514.87M Training (log)
WRN-50-2 22.15 6.12 68,849,128 11,405.42M From szagoruyko/functional-zoo (log)
DRN-C-26 25.68 7.89 21,126,584 16,993.90M From fyu/drn (log)
DRN-C-42 23.80 6.92 31,234,744 25,093.75M From fyu/drn (log)
DRN-C-58 22.35 6.27 40,542,008 32,489.94M From fyu/drn (log)
DRN-D-22 26.67 8.52 16,393,752 13,051.33M From fyu/drn (log)
DRN-D-38 24.51 7.36 26,501,912 21,151.19M From fyu/drn (log)
DRN-D-54 22.05 6.27 35,809,176 28,547.38M From fyu/drn (log)
DRN-D-105 21.31 5.81 54,801,304 43,442.43M From fyu/drn (log)
DPN-68 23.57 7.00 12,611,602 2,351.84M From Cadene/pretrained...pytorch (log)
DPN-98 20.23 5.28 61,570,728 11,716.51M From Cadene/pretrained...pytorch (log)
DPN-131 20.03 5.22 79,254,504 16,076.15M From Cadene/pretrained...pytorch (log)
DarkNet Tiny 40.31 17.46 1,042,104 500.85M Training (log)
DarkNet Ref 38.00 16.68 7,319,416 367.59M Training (log)
DarkNet-53 21.44 5.56 41,609,928 7,133.86M From dmlc/gluon-cv (log)
FishNet-150 22.85 6.38 24,959,400 6,435.02M From kevin-ssy/FishNet (log)
SqueezeNet v1.0 38.73 17.34 1,248,424 823.67M Training (log)
SqueezeNet v1.1 39.09 17.39 1,235,496 352.02M Training (log)
SqueezeResNet v1.1 39.83 17.84 1,235,496 352.02M Training (log)
1.0-SqNxt-23 42.25 18.66 724,056 287.28M Training (log)
1.0-SqNxt-23v5 40.43 17.43 921,816 285.82M Training (log)
ShuffleNet x0.25 (g=1) 62.00 36.77 209,746 12.35M Training (log)
ShuffleNet x0.25 (g=3) 61.34 36.17 305,902 13.09M Training (log)
ShuffleNet x0.5 (g=3) 43.83 20.60 718,324 41.70M Training (log)
ShuffleNetV2 x0.5 40.61 18.30 1,366,792 43.31M Training (log)
ShuffleNetV2 x1.0 30.94 11.23 2,278,604 149.72M Training (log)
ShuffleNetV2 x1.5 32.38 12.37 4,406,098 320.77M Training (log)
ShuffleNetV2 x2.0 32.04 12.10 7,601,686 595.84M Training (log)
ShuffleNetV2b x0.5 39.81 17.82 1,366,792 43.31M Training (log)
ShuffleNetV2b x1.0 30.39 11.01 2,279,760 150.62M Training (log)
ShuffleNetV2c x0.5 39.87 18.11 1,366,792 43.31M From tensorpack/tensorpack (log)
ShuffleNetV2c x1.0 30.74 11.38 2,279,760 150.62M From tensorpack/tensorpack (log)
108-MENet-8x1 (g=3) 43.62 20.30 654,516 42.68M Training (log)
128-MENet-8x1 (g=4) 42.10 19.13 750,796 45.98M Training (log)
128-MENet-8x1 (g=4) 42.10 19.13 750,796 45.98M Training (log)
160-MENet-8x1 (g=8) 43.47 20.28 850,120 45.63M Training (log)
256-MENet-12x1 (g=4) 32.23 12.16 1,888,240 150.65M Training (log)
348-MENet-12x1 (g=3) 31.17 11.41 3,368,128 312.00M From clavichord93/MENet (log)
352-MENet-12x1 (g=8) 34.70 13.75 2,272,872 157.35M From clavichord93/MENet (log)
456-MENet-24x1 (g=3) 29.57 10.43 5,304,784 567.90M From clavichord93/MENet (log)
MobileNet x0.25 45.78 22.18 470,072 44.09M Training (log)
MobileNet x0.5 33.94 13.30 1,331,592 155.42M Training (log)
MobileNet x0.75 29.85 10.51 2,585,560 333.99M Training (log)
MobileNet x1.0 26.43 8.65 4,231,976 579.80M Training (log)
FD-MobileNet x0.25 56.19 31.38 383,160 12.95M Training (log)
FD-MobileNet x0.5 42.62 19.69 993,928 41.84M Training (log)
FD-MobileNet x0.75 37.91 16.01 1,833,304 86.68M Training (log)
FD-MobileNet x1.0 33.80 13.12 2,901,288 147.46M Training (log)
MobileNetV2 x0.25 48.08 24.12 1,516,392 34.24M Training (log)
MobileNetV2 x0.5 35.63 14.42 1,964,736 100.13M Training (log)
MobileNetV2 x0.75 30.82 11.26 2,627,592 198.50M From dmlc/gluon-cv (log)
MobileNetV2 x1.0 28.51 9.90 3,504,960 329.36M From dmlc/gluon-cv (log)
IGCV3 x0.25 53.43 28.30 1,534,020 41.29M Training (log)
IGCV3 x0.5 39.41 17.03 1,985,528 111.12M Training (log)
IGCV3 x1.0 28.22 9.54 3,491,688 340.79M From homles11/IGCV3 (log)
MnasNet 31.32 11.44 4,308,816 317.67M From zeusees/Mnasnet...Model (log)
DARTS 27.23 8.97 4,718,752 539.86M From quark0/darts (log)
Xception 20.99 5.56 22,855,952 8,403.63M From Cadene/pretrained...pytorch (log)
InceptionV3 21.22 5.59 23,834,568 5,743.06M From dmlc/gluon-cv (log)
InceptionV4 20.60 5.25 42,679,816 12,304.93M From Cadene/pretrained...pytorch (log)
InceptionResNetV2 19.96 4.94 55,843,464 13,188.64M From Cadene/pretrained...pytorch (log)
PolyNet 19.09 4.53 95,366,600 34,821.34M From Cadene/pretrained...pytorch (log)
NASNet-A 4@1056 25.37 7.95 5,289,978 584.90M From Cadene/pretrained...pytorch (log)
NASNet-A 6@4032 18.17 4.24 88,753,150 23,976.44M From Cadene/pretrained...pytorch (log)
PNASNet-5-Large 17.90 4.28 86,057,668 25,140.77M From Cadene/pretrained...pytorch (log)

CIFAR-10

Some remarks:

  • Testing subset is used for validation purpose.
Model Error, % Params FLOPs/2 Remarks
ResNet-20 5.97 272,474 41.29M Converted from GL model (log)
ResNet-56 4.52 855,770 127.06M Converted from GL model (log)
ResNet-110 3.69 1,730,714 255.70M Converted from GL model (log)
PreResNet-20 6.51 272,282 41.27M Converted from GL model (log)
PreResNet-56 4.49 855,578 127.03M Converted from GL model (log)
PreResNet-110 3.86 1,730,522 255.68M Converted from GL model (log)
ResNeXt-29 (32x4d) 3.15 4,775,754 780.55M Converted from GL model (log)
ResNeXt-29 (16x64d) 2.75 68,155,210 10,709.34M From dmlc/gluon-cv (log)
WRN-16-10 2.93 17,116,634 2,414.04M Converted from GL model (log)
WRN-28-10 2.39 36,479,194 5,246.98M Converted from GL model (log)
WRN-40-8 2.37 35,748,314 5,176.90M Converted from GL model (log)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gluoncv2-0.0.32.tar.gz (117.0 kB view hashes)

Uploaded Source

Built Distribution

gluoncv2-0.0.32-py2.py3-none-any.whl (203.5 kB view hashes)

Uploaded Python 2 Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page