Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

kerascv

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

kerascv

Image classification models for Keras

  • 0.0.40
  • PyPI
  • Socket score

Maintainers
1

Large-scale image classification models on Keras

PyPI Downloads

This is a collection of large-scale image classification models. Many of them are pretrained on ImageNet-1K dataset 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 kerascv package with desired backend. For example for MXNet backend:

pip install mxnet>=1.2.1 keras-mxnet kerascv

Or if you prefer TensorFlow backend:

pip install tensorflow kerascv

To enable/disable different hardware supports, check out installation instruction for the corresponding backend.

After installation check that the backend field is set to the correct value in the file ~/.keras/keras.json. It is also preferable to set the value of the image_data_format field to channels_first in the case of using the MXNet backend.

Usage

Example of using a pretrained ResNet-18 model (for channels_first data format):

from kerascv.model_provider import get_model as kecv_get_model
import numpy as np

net = kecv_get_model("resnet18", pretrained=True)
x = np.zeros((1, 3, 224, 224), np.float32)
y = net.predict(x)

Pretrained models (ImageNet-1K)

Some remarks:

  • All quality values are estimated with MXNet backend.
  • 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.
  • Remark Converted from GL model means that the model was trained on MXNet/Gluon and then converted to Keras.
ModelTop1Top5ParamsFLOPs/2Remarks
AlexNet40.4717.8862,378,3441,132.33MConverted from GL model (log)
AlexNet-b41.0818.5361,100,840714.83MConverted from GL model (log)
ZFNet39.5617.1562,357,6081,170.33MConverted from GL model (log)
ZFNet-b36.3014.83107,627,6242,479.13MConverted from GL model (log)
VGG-1129.5910.16132,863,3367,615.87MConverted from GL model (log)
VGG-1328.379.50133,047,84811,317.65MConverted from GL model (log)
VGG-1626.618.32138,357,54415,480.10MConverted from GL model (log)
VGG-1925.587.67143,667,24019,642.55MConverted from GL model (log)
BN-VGG-1128.559.34132,866,0887,630.21MConverted from GL model (log)
BN-VGG-1327.688.87133,050,79211,341.62MConverted from GL model (log)
BN-VGG-1625.507.57138,361,76815,506.38MConverted from GL model (log)
BN-VGG-1923.916.89143,672,74419,671.15MConverted from GL model (log)
BN-VGG-11b29.249.75132,868,8407,630.72MConverted from GL model (log)
BN-VGG-13b29.4810.16133,053,73611,342.14MFrom dmlc/gluon-cv (log)
BN-VGG-16b26.888.65138,365,99215,507.20MFrom dmlc/gluon-cv (log)
BN-VGG-19b25.658.14143,678,24819,672.26MFrom dmlc/gluon-cv (log)
ResNet-1034.5913.855,418,792894.04MConverted from GL model (log)
ResNet-1233.4313.035,492,7761,126.25MConverted from GL model (log)
ResNet-1432.1812.205,788,2001,357.94MConverted from GL model (log)
ResNet-BC-14b30.2511.1610,064,9361,479.12MConverted from GL model (log)
ResNet-1630.2310.886,968,8721,589.34MConverted from GL model (log)
ResNet-18 x0.2539.3017.413,937,400270.94MConverted from GL model (log)
ResNet-18 x0.533.4012.835,804,296608.70MConverted from GL model (log)
ResNet-18 x0.7529.9810.668,476,0561,129.45MConverted from GL model (log)
ResNet-1828.089.5211,689,5121,820.41MConverted from GL model (log)
ResNet-2626.128.3717,960,2322,746.79MConverted from GL model (log)
ResNet-BC-26b24.857.5915,995,1762,356.67MConverted from GL model (log)
ResNet-3424.537.4421,797,6723,672.68MConverted from GL model (log)
ResNet-BC-38b23.486.7221,925,4163,234.21MConverted from GL model (log)
ResNet-5022.146.0425,557,0323,877.95MConverted from GL model (log)
ResNet-50b22.066.1025,557,0324,110.48MConverted from GL model (log)
ResNet-10121.645.9944,549,1607,597.95MFrom dmlc/gluon-cv (log)
ResNet-101b20.255.1144,549,1607,830.48MConverted from GL model (log)
ResNet-15220.745.3560,192,80811,321.85MFrom dmlc/gluon-cv (log)
ResNet-152b19.634.7960,192,80811,554.38MConverted from GL model (log)
PreResNet-1034.6514.015,417,128894.19MConverted from GL model (log)
PreResNet-1233.5613.225,491,1121,126.40MConverted from GL model (log)
PreResNet-1432.2912.195,786,5361,358.09MConverted from GL model (log)
PreResNet-BC-14b30.6611.5110,057,3841,476.62MConverted from GL model (log)
PreResNet-1630.2110.816,967,2081,589.49MConverted from GL model (log)
PreResNet-18 x0.2539.6317.783,935,960270.93MConverted from GL model (log)
PreResNet-18 x0.533.6713.195,802,440608.73MConverted from GL model (log)
PreResNet-18 x0.7529.9510.688,473,7841,129.51MConverted from GL model (log)
PreResNet-1828.169.5211,687,8481,820.56MConverted from GL model (log)
PreResNet-2626.028.3417,958,5682,746.94MConverted from GL model (log)
PreResNet-BC-26b25.207.8615,987,6242,354.16MConverted from GL model (log)
PreResNet-3424.557.5121,796,0083,672.83MConverted from GL model (log)
PreResNet-BC-38b22.656.3321,917,8643,231.70MConverted from GL model (log)
PreResNet-5022.266.2025,549,4803,875.44MConverted from GL model (log)
PreResNet-50b22.356.3225,549,4804,107.97MConverted from GL model (log)
PreResNet-10121.435.7544,541,6087,595.44MFrom dmlc/gluon-cv (log)
PreResNet-101b20.845.4044,541,6087,827.97MConverted from GL model (log)
PreResNet-15220.695.3160,185,25611,319.34MFrom dmlc/gluon-cv (log)
PreResNet-152b19.895.0060,185,25611,551.87MConverted from GL model (log)
PreResNet-200b21.095.6464,666,28015,068.63MFrom tornadomeet/ResNet (log)
PreResNet-269b20.715.56102,065,83220,101.11MFrom soeaver/mxnet-model (log)
ResNeXt-14 (16x4d)31.6512.247,127,3361,045.77MConverted from GL model (log)
ResNeXt-14 (32x2d)32.1512.467,029,4161,031.32MConverted from GL model (log)
ResNeXt-14 (32x4d)29.9511.109,411,8801,603.46MConverted from GL model (log)
ResNeXt-26 (32x2d)26.348.509,924,1361,461.06MConverted from GL model (log)
ResNeXt-26 (32x4d)23.917.2015,389,4802,488.07MConverted from GL model (log)
ResNeXt-50 (32x4d)20.645.4625,028,9044,255.86MFrom dmlc/gluon-cv (log)
ResNeXt-101 (32x4d)19.624.9244,177,7048,003.45MFrom dmlc/gluon-cv (log)
ResNeXt-101 (64x4d)19.284.8383,455,27215,500.27MFrom dmlc/gluon-cv (log)
SE-ResNet-1033.5513.295,463,332894.27MConverted from GL model (log)
SE-ResNet-1827.959.2011,778,5921,820.88MConverted from GL model (log)
SE-ResNet-2625.428.0318,093,8522,747.49MConverted from GL model (log)
SE-ResNet-BC-26b23.446.8217,395,9762,359.58MConverted from GL model (log)
SE-ResNet-BC-38b21.445.7524,026,6163,238.58MConverted from GL model (log)
SE-ResNet-5022.506.4328,088,0243,880.49MFrom Cadene/pretrained...pytorch (log)
SE-ResNet-50b20.585.3328,088,0244,115.78MConverted from GL model (log)
SE-ResNet-10121.925.8849,326,8727,602.76MFrom Cadene/pretrained...pytorch (log)
SE-ResNet-15221.465.7766,821,84811,328.52MFrom Cadene/pretrained...pytorch (log)
SE-PreResNet-1033.6013.065,461,668894.42MConverted from GL model (log)
SE-PreResNet-1827.679.3811,776,9281,821.03MConverted from GL model (log)
SE-PreResNet-BC-26b22.956.3617,388,4242,357.07MConverted from GL model (log)
SE-PreResNet-BC-38b21.425.6324,019,0643,236.07MConverted from GL model (log)
SE-ResNeXt-50 (32x4d)20.035.0527,559,8964,261.16MFrom dmlc/gluon-cv (log)
SE-ResNeXt-101 (32x4d)19.074.6048,955,4168,012.73MFrom dmlc/gluon-cv (log)
SE-ResNeXt-101 (64x4d)18.984.6688,232,98415,509.54MFrom dmlc/gluon-cv (log)
SENet-1625.348.0631,366,1685,081.30MConverted from GL model (log)
SENet-2821.685.9136,453,7685,732.71MConverted from GL model (log)
SENet-15418.834.65115,088,98420,745.78MFrom Cadene/pretrained...pytorch (log)
DenseNet-12123.236.847,978,8562,872.13MConverted from GL model (log)
DenseNet-16122.396.1828,681,0007,793.16MFrom dmlc/gluon-cv (log)
DenseNet-16922.096.0514,149,4803,403.89MConverted from GL model (log)
DenseNet-20122.696.3520,013,9284,347.15MFrom dmlc/gluon-cv (log)
DarkNet Tiny40.3117.461,042,104500.85MConverted from GL model (log)
DarkNet Ref37.9916.687,319,416367.59MConverted from GL model (log)
DarkNet-5321.435.5641,609,9287,133.86MFrom dmlc/gluon-cv (log)
SqueezeNet v1.039.1717.561,248,424823.67MConverted from GL model (log)
SqueezeNet v1.139.0817.391,235,496352.02MConverted from GL model (log)
SqueezeResNet v1.039.4017.801,248,424823.67MConverted from GL model (log)
SqueezeResNet v1.139.8217.841,235,496352.02MConverted from GL model (log)
1.0-SqNxt-2342.2818.62724,056287.28MConverted from GL model (log)
1.0-SqNxt-23v540.3817.57921,816285.82MConverted from GL model (log)
1.5-SqNxt-2334.5913.301,511,824552.39MConverted from GL model (log)
1.5-SqNxt-23v533.5612.841,953,616550.97MConverted from GL model (log)
2.0-SqNxt-2330.1510.662,583,752898.48MConverted from GL model (log)
2.0-SqNxt-23v529.4010.283,366,344897.60MConverted from GL model (log)
ShuffleNet x0.25 (g=1)62.0036.76209,74612.35MConverted from GL model (log)
ShuffleNet x0.25 (g=3)61.3236.15305,90213.09MConverted from GL model (log)
ShuffleNet x0.5 (g=1)46.2122.38534,48441.16MConverted from GL model (log)
ShuffleNet x0.5 (g=3)43.8220.60718,32441.70MConverted from GL model (log)
ShuffleNet x0.75 (g=1)39.2416.75975,21486.42MConverted from GL model (log)
ShuffleNet x0.75 (g=3)37.8116.091,238,26685.82MConverted from GL model (log)
ShuffleNet x1.0 (g=1)34.4113.501,531,936148.13MConverted from GL model (log)
ShuffleNet x1.0 (g=2)33.9713.321,733,848147.60MConverted from GL model (log)
ShuffleNet x1.0 (g=3)33.9613.291,865,728145.46MConverted from GL model (log)
ShuffleNet x1.0 (g=4)33.8313.101,968,344143.33MConverted from GL model (log)
ShuffleNet x1.0 (g=8)33.6413.202,434,768150.76MConverted from GL model (log)
ShuffleNetV2 x0.540.7618.401,366,79243.31MConverted from GL model (log)
ShuffleNetV2 x1.031.0211.332,278,604149.72MConverted from GL model (log)
ShuffleNetV2 x1.527.329.274,406,098320.77MConverted from GL model (log)
ShuffleNetV2 x2.025.778.227,601,686595.84MConverted from GL model (log)
ShuffleNetV2b x0.539.8117.831,366,79243.31MConverted from GL model (log)
ShuffleNetV2b x1.030.3811.012,279,760150.62MConverted from GL model (log)
ShuffleNetV2b x1.526.898.804,410,194323.98MConverted from GL model (log)
ShuffleNetV2b x2.025.188.107,611,290603.37MConverted from GL model (log)
108-MENet-8x1 (g=3)43.6120.31654,51642.68MConverted from GL model (log)
128-MENet-8x1 (g=4)42.0819.14750,79645.98MConverted from GL model (log)
160-MENet-8x1 (g=8)43.4720.28850,12045.63MConverted from GL model (log)
228-MENet-12x1 (g=3)33.8512.881,806,568152.93MConverted from GL model (log)
256-MENet-12x1 (g=4)32.2212.171,888,240150.65MConverted from GL model (log)
348-MENet-12x1 (g=3)27.859.363,368,128312.00MConverted from GL model (log)
352-MENet-12x1 (g=8)31.2911.672,272,872157.35MConverted from GL model (log)
456-MENet-24x1 (g=3)25.007.805,304,784567.90MConverted from GL model (log)
MobileNet x0.2545.8022.17470,07244.09MConverted from GL model (log)
MobileNet x0.533.9413.301,331,592155.42MConverted from GL model (log)
MobileNet x0.7529.8510.512,585,560333.99MConverted from GL model (log)
MobileNet x1.026.438.664,231,976579.80MConverted from GL model (log)
FD-MobileNet x0.2555.4230.52383,16012.95MConverted from GL model (log)
FD-MobileNet x0.542.6119.69993,92841.84MConverted from GL model (log)
FD-MobileNet x0.7537.9016.011,833,30486.68MConverted from GL model (log)
FD-MobileNet x1.033.8013.122,901,288147.46MConverted from GL model (log)
MobileNetV2 x0.2548.0624.121,516,39234.24MConverted from GL model (log)
MobileNetV2 x0.535.6314.431,964,736100.13MConverted from GL model (log)
MobileNetV2 x0.7529.7610.442,627,592198.50MConverted from GL model (log)
MobileNetV2 x1.026.768.643,504,960329.36MConverted from GL model (log)
MobileNetV3 L/224/1.024.637.695,481,752227.09MFrom dmlc/gluon-cv (log)
IGCV3 x0.2553.4128.291,534,02041.29MConverted from GL model (log)
IGCV3 x0.539.3917.041,985,528111.12MConverted from GL model (log)
IGCV3 x0.7530.7110.972,638,084210.95MConverted from GL model (log)
IGCV3 x1.027.728.993,491,688340.79MConverted from GL model (log)
MnasNet-B125.768.004,383,312326.30MFrom rwightman/pyt...models (log)
MnasNet-A125.027.553,887,038326.07MFrom rwightman/pyt...models (log)
EfficientNet-B024.507.225,288,548414.31MConverted from GL model (log)
EfficientNet-B122.896.267,794,184732.54MConverted from GL model (log)
EfficientNet-B0b22.956.695,288,548414.31MFrom rwightman/pyt...models (log)
EfficientNet-B1b20.975.647,794,184732.54MFrom rwightman/pyt...models (log)
EfficientNet-B2b19.935.169,109,9941,051.98MFrom rwightman/pyt...models (log)
EfficientNet-B3b18.594.3112,233,2321,928.55MFrom rwightman/pyt...models (log)
EfficientNet-B4b17.243.7619,341,6164,607.46MFrom rwightman/pyt...models (log)
EfficientNet-B5b16.393.3430,389,78410,695.20MFrom rwightman/pyt...models (log)
EfficientNet-B6b15.963.1243,040,70419,796.24MFrom rwightman/pyt...models (log)
EfficientNet-B7b15.703.1166,347,96039,010.98MFrom rwightman/pyt...models (log)

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc