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

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
  • The ground is covered in grass and concrete
  • There is a child
  • The child is sitting on a bouncy horse
  • The bouncy horse is on top of the grass

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?

  • First, here are some of the birds that our network correctly identified as birds. Let’s call these True Positives:
Wow! Our network can recognize lots of different kinds of birds successfully!
  • Second, here are images that our network correctly identified as “not a bird”. These are called True Negatives:
Horses and trucks don’t fool us!
  • Third, here are some images that we thought were birds but were not really birds at all. These are our False Positives:
Lots of planes were mistaken for birds! That makes sense.
  • And finally, here are some images of birds that we didn’t correctly recognize as birds. These are our False Negatives:
These birds fooled us! Stupid ostriches! Do they even count as birds?

Where to go from here

--

--

--

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

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Training Keras model with Multiple GPUs with an example

Machine Learning Design Interview book

Machine Learning: Key Terminology

Classification in Machine Learning — A Starter Kit For Absolute Beginners

DDIntel March 5, 2021

Rule-bases Matching with spaCy

Language modeling using Recurrent Neural Networks Part - 1

Face Recognition Using Face Verification

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
Adam Geitgey

Adam Geitgey

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

More from Medium

Neural Networks and Neural Autoencoders as Dimensional Reduction Tools: Knime and Python

Machine Learning Techniques

Speech Emotion Recognition using Convolution Neural Networks