Machine Learning is Fun! Part 3: Deep Learning and Convolutional Neural Networks

Adam Geitgey
Jun 13, 2016 · 16 min read
Google now lets you search your own photos by description — even if they aren’t tagged! How does this work??

Recognizing Objects with Deep Learning

xkcd #1425 (View original here)

Starting Simple

Some 8s from the MNIST data set

If you think about it, everything is just numbers

Mmm… sweet, sweet training data

Tunnel Vision

Brute Force Idea #1: Searching with a Sliding Window

Brute Force Idea #2: More data and a Deep Neural Net

We created Synthetic Training Data by creating different versions of the training images we already had. This is a very useful technique!

The Solution is Convolution

Gratuitous picture of my son

How Convolution Works

Step 1: Break the image into overlapping image tiles

Step 2: Feed each image tile into a small neural network

Repeat this 77 times, once for each tile.

Step 3: Save the results from each tile into a new array

Step 4: Downsampling

Final step: Make a prediction

Adding Even More Steps

Constructing the Right Network

Building our Bird Classifier

Testing our Network

How accurate is 95% accurate?

Wow! Our network can recognize lots of different kinds of birds successfully!
Horses and trucks don’t fool us!
Lots of planes were mistaken for birds! That makes sense.
These birds fooled us! Stupid ostriches! Do they even count as birds?

Where to go from here

Adam Geitgey

Written by

Interested in computers and machine learning. Likes to write about it.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade