Skip to content
[CVPR2020] Surpassing MobileNetV3: "GhostNet: More Features from Cheap Operations"
Python
Branch: master
Clone or download

Latest commit

Fetching latest commit…
Cannot retrieve the latest commit at this time.

Files

Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
fig add figures Nov 27, 2019
models update readme Nov 26, 2019
.gitignore update readme Nov 26, 2019
License.txt add license Feb 26, 2020
THIRD PARTY OPEN SOURCE SOFTWARE NOTICE.txt
ghost_net.py add license Feb 26, 2020
imagenet_utils.py add license Feb 26, 2020
main.py add license Feb 26, 2020
myconv2d.py code clean Feb 27, 2020
readme.md Update readme.md Mar 13, 2020
utils.py first commit Nov 16, 2019

readme.md

GhostNet

GhostNet: More Features from Cheap Operations. CVPR 2020. [arXiv]

By Kai Han, Yunhe Wang, Qi Tian, Jianyuan Guo, Chunjing Xu, Chang Xu.

  • Approach
  • Performance

GhostNet beats other SOTA lightweight CNNs such as MobileNetV3 and FBNet.

Implementation

This repo provides the TensorFlow code and pretrained model of GhostNet on ImageNet. The PyTorch implementation can be found at https://github.com/iamhankai/ghostnet.pytorch.

myconv2d.py implemented GhostModule and ghost_net.py implemented GhostNet.

Requirements

The code was verified on Python3.6, TensorFlow-1.13.1, Tensorpack-0.9.7. Not sure on other version.

Usage

Run python main.py --eval --data_dir=/path/to/imagenet/dir/ --load=./models/ghostnet_checkpoint to evaluate on val set.

You'll get the accuracy: top-1 error=0.26066, top-5 error=0.08614 with only 141M Flops (or say MAdds).

Data Preparation

ImageNet data dir should have the following structure, and val and caffe_ilsvrc12 subdirs are essential:

dir/
  train/
    ...
  val/
    n01440764/
      ILSVRC2012_val_00000293.JPEG
      ...
    ...
  caffe_ilsvrc12/
    ...

caffe_ilsvrc12 data can be downloaded from http://dl.caffe.berkeleyvision.org/caffe_ilsvrc12.tar.gz

Citation

@inproceedings{ghostnet,
  title={GhostNet: More Features from Cheap Operations},
  author={Han, Kai and Wang, Yunhe and Tian, Qi and Guo, Jianyuan and Xu, Chunjing and Xu, Chang},
  booktitle={CVPR},
  year={2020}
}

Other versions

This repo provides the TensorFlow code of GhostNet. Other versions can be found in the following:

  1. Pytorch: code
  2. Darknet: cfg file, and description
  3. Gluon/Keras/Chainer: code
  4. Pytorch for human pose estimation: code
You can’t perform that action at this time.