All Projects → titu1994 → Mobilenetworks

titu1994 / Mobilenetworks

Licence: apache-2.0
Keras implementation of Mobile Networks

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mobilenetworks

Caffe Model
Caffe models (including classification, detection and segmentation) and deploy files for famouse networks
Stars: ✭ 1,258 (+853.03%)
Mutual labels:  imagenet
Imagenetv2
A new test set for ImageNet
Stars: ✭ 109 (-17.42%)
Mutual labels:  imagenet
Imagenet
This implements training of popular model architectures, such as AlexNet, ResNet and VGG on the ImageNet dataset(Now we supported alexnet, vgg, resnet, squeezenet, densenet)
Stars: ✭ 126 (-4.55%)
Mutual labels:  imagenet
Pytorch Classification
Classification with PyTorch.
Stars: ✭ 1,268 (+860.61%)
Mutual labels:  imagenet
Ghostnet
CV backbones including GhostNet, TinyNet and TNT, developed by Huawei Noah's Ark Lab.
Stars: ✭ 1,744 (+1221.21%)
Mutual labels:  imagenet
Petridishnn
Code for the neural architecture search methods contained in the paper Efficient Forward Neural Architecture Search
Stars: ✭ 112 (-15.15%)
Mutual labels:  imagenet
Chainer Pspnet
PSPNet in Chainer
Stars: ✭ 76 (-42.42%)
Mutual labels:  imagenet
Vision4j Collection
Collection of computer vision models, ready to be included in a JVM project
Stars: ✭ 132 (+0%)
Mutual labels:  imagenet
Resnet Imagenet Caffe
train resnet on imagenet from scratch with caffe
Stars: ✭ 105 (-20.45%)
Mutual labels:  imagenet
Pyramidnet
Torch implementation of the paper "Deep Pyramidal Residual Networks" (https://arxiv.org/abs/1610.02915).
Stars: ✭ 121 (-8.33%)
Mutual labels:  imagenet
Hbonet
[ICCV 2019] Harmonious Bottleneck on Two Orthogonal Dimensions
Stars: ✭ 94 (-28.79%)
Mutual labels:  imagenet
Pnasnet.tf
TensorFlow implementation of PNASNet-5 on ImageNet
Stars: ✭ 102 (-22.73%)
Mutual labels:  imagenet
Ir Net
This project is the PyTorch implementation of our accepted CVPR 2020 paper : forward and backward information retention for accurate binary neural networks.
Stars: ✭ 119 (-9.85%)
Mutual labels:  imagenet
Tf Mobilenet V2
Mobilenet V2(Inverted Residual) Implementation & Trained Weights Using Tensorflow
Stars: ✭ 85 (-35.61%)
Mutual labels:  imagenet
Regnet
Pytorch implementation of network design paradigm described in the paper "Designing Network Design Spaces"
Stars: ✭ 129 (-2.27%)
Mutual labels:  imagenet
Mobilenet Caffe
Caffe Implementation of Google's MobileNets (v1 and v2)
Stars: ✭ 1,217 (+821.97%)
Mutual labels:  imagenet
Moco
Unofficial implementation with pytorch DistributedDataParallel for "MoCo: Momentum Contrast for Unsupervised Visual Representation Learning"
Stars: ✭ 112 (-15.15%)
Mutual labels:  imagenet
Aognet
Code for CVPR 2019 paper: " Learning Deep Compositional Grammatical Architectures for Visual Recognition"
Stars: ✭ 132 (+0%)
Mutual labels:  imagenet
Pytorch Imagenet Cifar Coco Voc Training
Training examples and results for ImageNet(ILSVRC2012)/CIFAR100/COCO2017/VOC2007+VOC2012 datasets.Image Classification/Object Detection.Include ResNet/EfficientNet/VovNet/DarkNet/RegNet/RetinaNet/FCOS/CenterNet/YOLOv3.
Stars: ✭ 130 (-1.52%)
Mutual labels:  imagenet
Labelbox
Labelbox is the fastest way to annotate data to build and ship computer vision applications.
Stars: ✭ 1,588 (+1103.03%)
Mutual labels:  imagenet

Mobile Networks (V1 and V2) in Keras

Keras implementation of the paper MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications + ported weights.

Contains the Keras implementation of the paper MobileNetV2: Inverted Residuals and Linear Bottlenecks + ported weights.

mobilenets

Benefits of Mobile Nets

As explained in the paper, large neural networks can be exorbitant, both in the amount of memory they require to perform predictions, to the actual size of the model weights.

Therefore, by using Depthwise Convolutions, we can reduce a significant portion of the model size while still retaining very good performance.

Creating MobileNets

The default MobileNet corresponds to the model pre-trained on ImageNet. It has an input shape of (224, 224, 3).

You can now create either the original version of MobileNet or the MobileNetV2 recently released using the appropriate method.

from mobilenets import MobileNet, MobileNetV2 

# for V1
model = MobileNet()

# for V2
model = MobileNetV2()

MobileNet V1

There are two hyperparameters that you can change - alpha (the widening factor), and depth_multiplier. The ImageNet model uses the default values of 1 for both of the above.

from mobilenets import MobileNet

model = MobileNet(alpha=1, depth_multiplier=1)

MobileNet V2

There are three hyperparameters that you can change - alpha (the widening factor), expansion_factor (multiplier by which the inverted residual block is multiplied) and depth_multiplier. The ImageNet model uses the default values of 1 for alpha and depth_multiplied and a default of 6 for expansion_factor.

from mobilenets import MobileNetV2

model = MobileNetV2(alpha=1, expansion_factor=6, depth_multiplier=1)

Testing

The model can be tested by running the predict_imagenet.py script, using the given elephant image. It will return a top 5 prediction score, where "African Elephant" score will be around 97.9%.

Image Predictions
('African_elephant', 0.814673136),
('tusker', 0.15983042),
('Indian_elephant', 0.025479317),
('Weimaraner', 6.0817301e-06),
('bison', 3.7597524e-06)
('cheetah', 0.99743026),
('leopard', 0.0010753422),
('lion', 0.00069186132),
('snow_leopard', 0.00059767498),
('lynx', 0.00012871811)

Conversion of Tensorflow Weights

The weights were originally from https://github.com/tensorflow/models/blob/master/slim/nets/mobilenet_v1.md, which used Tensorflow checkpoints. There are scripts and some documentation for how the weights were converted in the _weight_extraction folder.

The weights for V2 model were originally from https://github.com/tensorflow/models/tree/master/research/slim/nets/mobilenet, which used Tensorflow checkpoints. There are scripts and some documentation for how the weights were converted in the _weight_extraction_v2 folder.

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].