All Projects → mnikitin → Efficientnet

mnikitin / Efficientnet

Gluon implementation of EfficientNet and EfficientNet-lite

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Efficientnet

gluon2pytorch
Gluon to PyTorch deep neural network model converter
Stars: ✭ 72 (+140%)
Mutual labels:  mxnet, gluon
baidu-salers-logo-prediction
baidu contest, url: http://dianshi.baidu.com/gemstone/competitions/detail?raceId=17
Stars: ✭ 16 (-46.67%)
Mutual labels:  mxnet, gluon
OpSummary.MXNet
A tool to count operators and parameters of your MXNet-Gluon model.
Stars: ✭ 19 (-36.67%)
Mutual labels:  mxnet, gluon
lipnet
LipNet with gluon
Stars: ✭ 16 (-46.67%)
Mutual labels:  mxnet, gluon
Aws Machine Learning University Accelerated Tab
Machine Learning University: Accelerated Tabular Data Class
Stars: ✭ 718 (+2293.33%)
Mutual labels:  mxnet, gluon
python cv AI ML
用python做计算机视觉,人工智能,机器学习,深度学习等
Stars: ✭ 73 (+143.33%)
Mutual labels:  mxnet, gluon
NER BiLSTM CRF Chinese
BiLSTM_CRF中文实体命名识别
Stars: ✭ 46 (+53.33%)
Mutual labels:  mxnet, gluon
gluon-faster-rcnn
Faster R-CNN implementation with MXNet Gluon API
Stars: ✭ 31 (+3.33%)
Mutual labels:  mxnet, gluon
gpu accelerated forecasting modeltime gluonts
GPU-Accelerated Deep Learning for Time Series using Modeltime GluonTS (Learning Lab 53). Event sponsors: Saturn Cloud, NVIDIA, & Business Science.
Stars: ✭ 20 (-33.33%)
Mutual labels:  mxnet, gluon
MXNet-EfficientNet
A Gluon Implement of EfficientNet
Stars: ✭ 12 (-60%)
Mutual labels:  mxnet, gluon
Dog-Breed-Identification-Gluon
Kaggle 120种狗分类,Gluon实现
Stars: ✭ 45 (+50%)
Mutual labels:  mxnet, gluon
Autogluon
AutoGluon: AutoML for Text, Image, and Tabular Data
Stars: ✭ 3,920 (+12966.67%)
Mutual labels:  mxnet, gluon
CycleGAN-gluon-mxnet
this repo attemps to reproduce Unpaired Image-to-Image Translation using Cycle-Consistent Adversarial Networks(CycleGAN) use gluon reimplementation
Stars: ✭ 31 (+3.33%)
Mutual labels:  mxnet, gluon
Gluon Cv
Gluon CV Toolkit
Stars: ✭ 5,001 (+16570%)
Mutual labels:  mxnet, gluon
ResidualAttentionNetwork
A Gluon implement of Residual Attention Network. Best acc on cifar10-97.78%.
Stars: ✭ 104 (+246.67%)
Mutual labels:  mxnet, gluon
AAAI 2019 EXAM
Official implementation of "Explicit Interaction Model towards Text Classification"
Stars: ✭ 68 (+126.67%)
Mutual labels:  mxnet, gluon
Imgclsmob
Sandbox for training deep learning networks
Stars: ✭ 2,405 (+7916.67%)
Mutual labels:  mxnet, gluon
Gluon Nlp
NLP made easy
Stars: ✭ 2,344 (+7713.33%)
Mutual labels:  mxnet, gluon
model-zoo-old
The ONNX Model Zoo is a collection of pre-trained models for state of the art models in deep learning, available in the ONNX format
Stars: ✭ 38 (+26.67%)
Mutual labels:  mxnet, gluon
Gluon Face
An unofficial Gluon FR Toolkit for face recognition. https://gluon-face.readthedocs.io
Stars: ✭ 264 (+780%)
Mutual labels:  mxnet, gluon

EfficientNet-Gluon

EfficientNet Gluon implementation

ImageNet experiments

Requirements

Python 3.7 or later with packages:

  • mxnet >= 1.5.0
  • gluoncv >= 0.6.0
  • nvidia-dali >= 0.19.0

Usage

Prepare ImageNet dataset

  1. Download and extract dataset following this tutorial:
    https://gluon-cv.mxnet.io/build/examples_datasets/imagenet.html
  2. Create mxnet-record files following this turorial:
    https://gluon-cv.mxnet.io/build/examples_datasets/recordio.html#imagerecord-file-for-imagenet

Clone this repo

git clone https://github.com/mnikitin/EfficientNet.git
cd EfficientNet/train_imagenet

Train your model

Example of training efficientnet-b0 with nvidia-dali data loader using 4 gpus:

IMAGENET_RECORD_ROOT='path/to/imagenet/record/files'
MODEL='efficientnet-b0'
python3 train_dali.py --rec-train $IMAGENET_RECORD_ROOT/train --rec-val $IMAGENET_RECORD_ROOT/val --input-size 224 --batch-size 64 --num-gpus 4 --num-epochs 80 --lr 0.1 --lr-decay-epoch 40,60 --save-dir params-$MODEL --logging-file params-$MODEL/log.txt --save-frequency 5 --mode hybrid --model $MODEL

Results

Code in this repo was used to train efficientnet-b0 and efficientnet-lite0 models. Pretrained params are avaliable (18.8 mb in total = 13.7 mb for extractor + 5.1 mb for classifier).

err-top1 err-top5 pretrained params
efficientnet-b0 0.335842 0.128043 dropbox link
efficientnet-lite0 0.305316 0.106322 dropbox link

Note that due to limited computational resources obtained results are worse than in the original paper. Moreover, efficientnet-lite0 was trained using more gpus and bigger batch size, so in spite of simpler architecture (relu6 instead of swish) its results are better than for efficientnet-b0 model. Anyway, I believe provided pretrained params can serve as a good initialization for your task.

That's how efficientnet-b0 and efficientnet-lite0 were trained exactly:

MODEL='efficientnet-b0'
python3 train_dali.py --rec-train $IMAGENET_RECORD_ROOT/train --rec-val $IMAGENET_RECORD_ROOT/val --input-size 224 --batch-size 56 --num-gpus 4 --num-epochs 50 --lr 0.1 --lr-decay-epoch 20,30,40 --save-dir params-$MODEL --logging-file params-$MODEL/log.txt --save-frequency 5 --mode hybrid --model $MODEL
MODEL='efficientnet-lite0'
python3 train_dali.py --rec-train $IMAGENET_RECORD_ROOT/train --rec-val $IMAGENET_RECORD_ROOT/val --input-size 224 --batch-size 72 --num-gpus 6 --num-epochs 60 --lr 0.1 --lr-decay-epoch 20,35,50 --save-dir params-$MODEL --logging-file params-$MODEL/log.txt --save-frequency 5 --mode hybrid --model $MODEL
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].