All Projects → shicai → Mobilenet Caffe

shicai / Mobilenet Caffe

Licence: bsd-3-clause
Caffe Implementation of Google's MobileNets (v1 and v2)

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to Mobilenet Caffe

Mobilenetv2 Ssdlite
Caffe implementation of SSD and SSDLite detection on MobileNetv2, converted from tensorflow.
Stars: ✭ 435 (-64.26%)
Mutual labels:  caffe, mobilenet, mobilenetv2
Pytorch Mobilenet V3
MobileNetV3 in pytorch and ImageNet pretrained models
Stars: ✭ 616 (-49.38%)
Mutual labels:  imagenet, mobilenet, mobilenetv2
MobileNet-SSD-windows
No description or website provided.
Stars: ✭ 91 (-92.52%)
Mutual labels:  caffe, mobilenet, mobilenetv2
Php Opencv Examples
Tutorial for computer vision and machine learning in PHP 7/8 by opencv (installation + examples + documentation)
Stars: ✭ 333 (-72.64%)
Mutual labels:  caffe, imagenet, mobilenet
caffe-mobilenet v2
caffe based mobilenet v2 deploy
Stars: ✭ 29 (-97.62%)
Mutual labels:  caffe, mobilenet, mobilenetv2
Densenet Caffe
DenseNet Caffe Models, converted from https://github.com/liuzhuang13/DenseNet
Stars: ✭ 350 (-71.24%)
Mutual labels:  caffe, imagenet
Cnn Models
ImageNet pre-trained models with batch normalization for the Caffe framework
Stars: ✭ 355 (-70.83%)
Mutual labels:  caffe, imagenet
Mobilenet V2
Repository for "Inverted Residuals and Linear Bottlenecks: Mobile Networks for Classification, Detection and Segmentation".
Stars: ✭ 73 (-94%)
Mutual labels:  mobilenet, mobilenetv2
ModelZoo.pytorch
Hands on Imagenet training. Unofficial ModelZoo project on Pytorch. MobileNetV3 Top1 75.64🌟 GhostNet1.3x 75.78🌟
Stars: ✭ 42 (-96.55%)
Mutual labels:  imagenet, mobilenet
Mmclassification
OpenMMLab Image Classification Toolbox and Benchmark
Stars: ✭ 532 (-56.29%)
Mutual labels:  imagenet, mobilenet
Lightnet
LightNet: Light-weight Networks for Semantic Image Segmentation (Cityscapes and Mapillary Vistas Dataset)
Stars: ✭ 698 (-42.65%)
Mutual labels:  mobilenet, mobilenetv2
Mobilenet Yolo
A caffe implementation of MobileNet-YOLO detection network
Stars: ✭ 825 (-32.21%)
Mutual labels:  caffe, mobilenet
yolo3 tensorflow
yolo3 implement by tensorflow, including mobilenet_v1, mobilenet_v2
Stars: ✭ 48 (-96.06%)
Mutual labels:  mobilenet, mobilenetv2
Mobilenetv2.pytorch
72.8% MobileNetV2 1.0 model on ImageNet and a spectrum of pre-trained MobileNetV2 models
Stars: ✭ 369 (-69.68%)
Mutual labels:  imagenet, mobilenetv2
LightNet
LightNet: Light-weight Networks for Semantic Image Segmentation (Cityscapes and Mapillary Vistas Dataset)
Stars: ✭ 710 (-41.66%)
Mutual labels:  mobilenet, mobilenetv2
Face Mask Detection
Face Mask Detection system based on computer vision and deep learning using OpenCV and Tensorflow/Keras
Stars: ✭ 774 (-36.4%)
Mutual labels:  caffe, mobilenetv2
Ssds pytorch
Multiple basenet MobileNet v1,v2, ResNet combined with SSD detection method and it's variants such as RFB, FSSD etc.
Stars: ✭ 71 (-94.17%)
Mutual labels:  mobilenet, mobilenetv2
Tensornets
High level network definitions with pre-trained weights in TensorFlow
Stars: ✭ 982 (-19.31%)
Mutual labels:  mobilenet, mobilenetv2
mobilenet-v2-tensorflow
No description or website provided.
Stars: ✭ 66 (-94.58%)
Mutual labels:  mobilenet, mobilenetv2
Caffenet Benchmark
Evaluation of the CNN design choices performance on ImageNet-2012.
Stars: ✭ 700 (-42.48%)
Mutual labels:  caffe, imagenet

MobileNet-Caffe

Introduction

This is a Caffe implementation of Google's MobileNets (v1 and v2). For details, please read the following papers:

Pretrained Models on ImageNet

We provide pretrained MobileNet models on ImageNet, which achieve slightly better accuracy rates than the original ones reported in the paper.

The top-1/5 accuracy rates by using single center crop (crop size: 224x224, image size: 256xN):

Network Top-1 Top-5 sha256sum Architecture
MobileNet v1 70.81 89.85 8d6edcd3 (16.2 MB) netscope, netron
MobileNet v2 71.90 90.49 a3124ce7 (13.5 MB) netscope, netron

Evaluate Models with a single image

Evaluate MobileNet v1:

python eval_image.py --proto mobilenet_deploy.prototxt --model mobilenet.caffemodel --image ./cat.jpg

Expected Outputs:

0.42 - 'n02123159 tiger cat'
0.08 - 'n02119022 red fox, Vulpes vulpes'
0.07 - 'n02119789 kit fox, Vulpes macrotis'
0.06 - 'n02113023 Pembroke, Pembroke Welsh corgi'
0.06 - 'n02123045 tabby, tabby cat'

Evaluate MobileNet v2:

python eval_image.py --proto mobilenet_v2_deploy.prototxt --model mobilenet_v2.caffemodel --image ./cat.jpg

Expected Outputs:

0.26 - 'n02123159 tiger cat'
0.22 - 'n02124075 Egyptian cat'
0.15 - 'n02123045 tabby, tabby cat'
0.04 - 'n02119022 red fox, Vulpes vulpes'
0.02 - 'n02326432 hare'

Finetuning on your own data

Modify deploy.prototxt and save it as your train.prototxt as follows: Remove the first 5 input/input_dim lines, and add Image Data layer in the beginning like this:

layer {
  name: "data"
  type: "ImageData"
  top: "data"
  top: "label"
  include {
    phase: TRAIN
  }
  transform_param {
    scale: 0.017
    mirror: true
    crop_size: 224
    mean_value: [103.94, 116.78, 123.68]
  }
  image_data_param {
    source: "your_list_train_txt"
    batch_size: 32 # your batch size
    new_height: 256
    new_width: 256
    root_folder: "your_path_to_training_data_folder"
  }
}

Remove the last prob layer, and add Loss and Accuracy layers in the end like this:

layer {
  name: "loss"
  type: "SoftmaxWithLoss"
  bottom: "fc7"
  bottom: "label"
  top: "loss"
}
layer {
  name: "top1/acc"
  type: "Accuracy"
  bottom: "fc7"
  bottom: "label"
  top: "top1/acc"
  include {
    phase: TEST
  }
}
layer {
  name: "top5/acc"
  type: "Accuracy"
  bottom: "fc7"
  bottom: "label"
  top: "top5/acc"
  include {
    phase: TEST
  }
  accuracy_param {
    top_k: 5
  }
}

Related Projects

MobileNet in this repo has been used in the following projects, we recommend you to take a look:

Updates (Feb. 5, 2018)

  • Add pretrained MobileNet v2 models (including deploy.prototxt and weights)
  • Hold pretrained weights in this repo
  • Add sha256sum code for pretrained weights
  • Add some code snippets for single image evaluation
  • Uncomment engine: CAFFE used in mobilenet_deploy.prototxt
  • Add params (lr_mult and decay_mult) for Scale layers of mobilenet_deploy.prototxt
  • Add prob layer for mobilenet_deploy.prototxt
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].