Head on over to Hacker Noon for an exploration of doing image classification at lightning speed using the relatively new MobileNet architecture. We classify images at 450 images per second!

The post covers the following:

  • What are MobileNets?
  • How to build a custom dataset to train a MobileNet with TensorFlow
  • How to train a MobileNet that’s pretrained on ImageNet with TensorFlow
  • How MobileNets perform against Inception V3
  • How to use your retrained MobileNet to classify images

Read the post at Hacker Noon.

In part 1, Creating Insanely Fast Image Classifiers with MobileNet in TensorFlow, we covered how to retrain a MobileNet on a new dataset. Specifically, we trained a classifier to detect Road or Not Road at more than 400 frames per second on a laptop.

MobileNets are made for — wait for it — mobile devices. So, let’s move our road not road model to an Android app so we can see it in action.

Image for post
Image for post

Goals and Plan

Let’s set some constraints so we have something specific to shoot for. We’ll attempt to:

  • Retrain a MobileNet on a very small amount of purpose-built data
  • Achieve 95% classification accuracy on a hold out test…

MobileNets are a new family of convolutional neural networks that are set to blow your mind, and today we’re going to train one on a custom dataset.

There are a few things that make MobileNets awesome:

  1. They’re insanely small
  2. They’re insanely fast
  3. They’re remarkably accurate
  4. They’re easy to tune for resources vs. accuracy

Why is this important? Many mobile deep learning tasks are actually performed in the cloud. When you want to classify an image, that image is sent to a web service, it’s classified on a remote server, and the result is sent back to your phone.

That’s changing quickly. The computational power on your phone is increasing rapidly, and the network complexity required for computer vision is shrinking (thanks to architectures like SqueezeNet and MobileNet). …


Matt Harvey

Founder of Coastline Automation, using AI to make every car crash-proof.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store