deepinx / shufflenet-v2-tensorflow

a lightweight convolutional neural network

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ShuffleNet v2

This is an implementation of ShuffleNet V2: Practical Guidelines for Efficient CNN Architecture Design .

model accuracy top 5 accuracy
0.5x 0.608 0.822
1.0x 0.689 0.885

You can download trained checkpoints from here.

How to use the pretrained models

You only need two things:

  1. File architecture.py. It contains a definition of the graph.
  2. Checkpoint. You can load it into the graph using tf.train.Saver or tf.train.init_from_checkpoint.

For an example of using the pretrained model see: inference_with_trained_model.ipynb.

Requirements

  1. for using the pretrained models: tensorflow 1.10
  2. for dataset preparation: pandas, Pillow, tqdm, opencv, ...

How to train

  1. Prepare ImageNet. See data/README.md.
  2. Set the right parameters in the beginning of train.py file.
  3. Run python train.py.

Credit

The training code is heavily inspired by:

  1. https://github.com/tensorflow/models/tree/master/official/resnet
  2. https://cloud.google.com/tpu/docs/inception-v3-advanced

Other implementations

  1. miaow1988/ShuffleNet_V2_pytorch_caffe
  2. tensorpack/examples/ImageNetModels

About

a lightweight convolutional neural network

License:MIT License


Languages

Language:Python 53.7%Language:Jupyter Notebook 46.3%