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.

Part two of a two-part series: It’s like hot dog not hot dog, but for roads

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

“It’s like hot dog not hot dog, but for roads.”

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…

One of the challenges of hyperparameter tuning a deep neural network is the time it takes to train and evaluate each set of parameters. If you’re anything like me, you often have four or five networks in mind that you want to try: different depth, different units per layer, etc.

Training and evaluating these networks in series is fine if the dataset or parameter space are small. But what if you’re evolving a neural network with a genetic algorithm, like we did in our previous post? Or what if one train/eval step takes a day to complete? We need parallelism!

Image for post
Image for post

Building the perfect deep learning network involves a hefty amount of art to accompany sound science. One way to go about finding the right hyperparameters is through brute force trial and error: Try every combination of sensible parameters, send them to your Spark cluster, go about your daily jive, and come back when you have an answer.

But there’s gotta be a better way!

Here, we try to improve upon the brute force method by applying a genetic algorithm to evolve a network with the goal of achieving optimal hyperparameters in a fraction the time of a brute force search.

How much faster?

Exploring the UCF101 video action dataset

Image for post
Image for post
[h/t @joshumaule and @surlyrightclick for the epic artwork.]

Classifying video presents unique challenges for machine learning models. As I’ve covered in my previous posts, video has the added (and interesting) property of temporal features in addition to the spatial features present in 2D images. While this additional information provides us more to work with, it also requires different network architectures and, often, adds larger memory and computational demands.

Today, we’ll take a look at different video action recognition strategies in Keras with the TensorFlow backend. We’ll attempt to learn how to apply five deep learning models to the challenging and well-studied UCF101 dataset.

Want the code? It’s all…

The magical power of deep learning in 2017.

Deep learning in 2017 is magical. We get to apply immensely complex algorithms to equally complex problems without having to spend all our time writing the algorithms ourselves. Instead, thanks to libraries like TensorFlow and Keras, we get to focus on the fun stuff: model architecture, parameter tuning and data augmentation.

Today, we’ll explore one such application of deep learning. We’ll use the Udacity self-driving car nanodegree program simulator to train a generalized steering model in under 100 lines of code. (As a point of reference, WordPress’ get_permalink() method, which retrieves the URL of a WordPress post, is 124 lines!)

Part 2 of a series exploring continuous classification methods.

A video is a sequence of images. In our previous post, we explored a method for continuous online video classification that treated each frame as discrete, as if its context relative to previous frames was unimportant. Today, we’re going to stop treating our video as individual photos and start treating it like the video that it is by looking at our images in a sequence. We’ll process these sequences by harnessing the magic of recurrent neural networks (RNNs).

To restate the problem we outlined in our previous post: We’re attempting to continually classify video as it’s streamed, in an online…

Or, using convolutional neural networks to identify what’s on TV

Image for post
Image for post

Much has been written about using deep learning to classify prerecorded video clips. These papers and projects impressive tag, classify and even caption each clip, with each comprising a single action or subject.

Today, we’re going to explore a way to continuously classify video as it’s captured, in an online system. Continuous classification allows us to solve all sorts of interesting problems in real-time, like understanding what’s in front of a car for autonomous driving applications to understanding what’s streaming on a TV. We’ll attempt to do the latter using only open source software and uber-cheap hardware. …

If you’re like me, you often find yourself wanting to send a notification that some running task has completed, or that some process needs attention.

The way I’ve done this for years is to send myself an e-mail. But because I’m a terrible sys admin I find it a pain to get e-mail to reliably send from Python+Ubuntu+some SMTP server. I will never admit how long I’ve spent fighting this battle…

Enter: Slack teams, Python and push notifications.

Here’s how to do it:

Step 1: Set yourself up with a personal Slack team by registering a team of one at…

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