All Projects → MG2033 → Mobilenet

MG2033 / Mobilenet

Licence: apache-2.0
A Clearer and Simpler MobileNet Implementation in TensorFlow

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mobilenet

Paddlex
PaddlePaddle End-to-End Development Toolkit(『飞桨』深度学习全流程开发工具)
Stars: ✭ 3,399 (+2756.3%)
Mutual labels:  classification, mobilenet
Shufflenet
ShuffleNet Implementation in TensorFlow
Stars: ✭ 378 (+217.65%)
Mutual labels:  classification, realtime
Efficientnet
Implementation of EfficientNet model. Keras and TensorFlow Keras.
Stars: ✭ 1,920 (+1513.45%)
Mutual labels:  classification, mobilenet
Tf Pose Estimation
Deep Pose Estimation implemented using Tensorflow with Custom Architectures for fast inference.
Stars: ✭ 3,856 (+3140.34%)
Mutual labels:  mobilenet, realtime
Mobilenet V2
A Complete and Simple Implementation of MobileNet-V2 in PyTorch
Stars: ✭ 206 (+73.11%)
Mutual labels:  classification, realtime
Pytorch Mobilenet V3
MobileNetV3 in pytorch and ImageNet pretrained models
Stars: ✭ 616 (+417.65%)
Mutual labels:  classification, mobilenet
Next
Directus is a real-time API and App dashboard for managing SQL database content. 🐰
Stars: ✭ 111 (-6.72%)
Mutual labels:  realtime
Mobilefacenet
Stars: ✭ 114 (-4.2%)
Mutual labels:  mobilenet
Pointnet Keras
Keras implementation for Pointnet
Stars: ✭ 110 (-7.56%)
Mutual labels:  classification
Entangled
Rails in real time
Stars: ✭ 108 (-9.24%)
Mutual labels:  realtime
Model Quantization
Collections of model quantization algorithms
Stars: ✭ 118 (-0.84%)
Mutual labels:  classification
Laravel Parse
A Parse SDK bridge for Laravel 5
Stars: ✭ 116 (-2.52%)
Mutual labels:  realtime
Cinc Challenge2017
ECG classification from short single lead segments (Computing in Cardiology Challenge 2017 entry)
Stars: ✭ 112 (-5.88%)
Mutual labels:  classification
Sytora
A sophisticated smart symptom search engine
Stars: ✭ 111 (-6.72%)
Mutual labels:  classification
Traffic Signs
Building a CNN based traffic signs classifier.
Stars: ✭ 115 (-3.36%)
Mutual labels:  classification
Natural Synaptic
Javascript Natural Language Classifier
Stars: ✭ 110 (-7.56%)
Mutual labels:  classification
Faster Mobile Retinaface
[CVPR 2020] Reimplementation of RetinaFace, faster and stronger.
Stars: ✭ 117 (-1.68%)
Mutual labels:  mobilenet
Thorium
Platform for starship simulator controls
Stars: ✭ 109 (-8.4%)
Mutual labels:  realtime
Autoannotationtool
A label tool aim to reduce semantic segmentation label time, rectangle and polygon annotation is supported
Stars: ✭ 113 (-5.04%)
Mutual labels:  classification
Sightseq
Computer vision tools for fairseq, containing PyTorch implementation of text recognition and object detection
Stars: ✭ 116 (-2.52%)
Mutual labels:  mobilenet

MobileNet

An implementation of Google MobileNet introduced in TensorFlow. According to the authors, MobileNet is a computationally efficient CNN architecture designed specifically for mobile devices with very limited computing power. It can be used for different applications including: Object-Detection, Finegrain Classification, Face Attributes and Large Scale Geo-Localization.

Link to the original paper: MobileNets: Efficient Convolutional Neural Networks for Mobile Vision Applications

This implementation was made to be clearer than TensorFlow original implementation. It was also made to be an example of a common DL software architecture. The weights/biases/parameters from the pretrained ImageNet model that was implemented by TensorFlow are dumped to a dictionary in pickle format file (pretrained_weights/mobilenet_v1.pkl) to allow a less restrictive way of loading them.

Depthwise Separable Convolution



ReLU6

The paper uses ReLU6 as an activation function. ReLU6 was first introduced in Convolutional Deep Belief Networks on CIFAR-10 as a ReLU with clipping its output at 6.0.

Usage

Main Dependencies

Python 3 and above
tensorflow 1.3.0
numpy 1.13.1
tqdm 4.15.0
easydict 1.7
matplotlib 2.0.2
pillow 5.0.0

Train and Test

  1. Prepare your data, and modify the data_loader.py/DataLoader/load_data() method.
  2. Modify the config/test.json to meet your needs.

Note: If you want to test that the model is pretrained and working properly, I've added some test images from different classes in directory 'data/test_images'. All of them are classified correctly.

Run

python3 main.py --config config/test.json

The file 'test.json' is just an example of a file. If you run it as is, it will test the model against the images in directory 'data/test_images'. You can create your own configuration file for training/testing.

Benchmarking

The paper has achieved 569 Mult-Adds. In my implementation, I have achieved approximately 1140 MFLOPS. The paper counts multiplication+addition as one unit. My result verifies the paper as roughly dividing 1140 by 2 is equal to 569 unit.

To calculate the FLOPs in TensorFlow, make sure to set the batch size equal to 1, and execute the following line when the model is loaded into memory.

tf.profiler.profile(
        tf.get_default_graph(),
        options=tf.profiler.ProfileOptionBuilder.float_operation(), cmd='scope')

I've already implemented this function. It's called calculate_flops() in utils.py. Use it directly if you want.

Updates

  • Inference and training are working properly.

License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

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