Convolution: the revolutionary innovation that took the AI world by storm
By: Mark Farragher
Tags: Machine Learning, Deep Learning, Computer Vision, Artificial Intelligence

There’s an old saying in AI that computers find things easy that humans find hard (like doing complex math) and computers find things hard that humans find easy (like catching a ball or recognizing objects in an image).

Let’s take recognizing images as an example.

Check out the following collection of images:

This is a sample from the ImageNet Large Scale Visual Recognition Challenge. The challenge involves a collection of 1.2 million images that need to be classified into 1000 categories.

Looks like an easy task, right? There’s images with birds, dogs, people, cars, geometric shapes, and so on. Piece of cake!

Don’t get too comfortable though. The categories include distinct breeds of animals. Would you be able to spot a Border Collie in the images?

I know I wouldn’t. I’m terrible telling dog breeds apart

Humans on average make about 5 mistakes for every 100 images, which corresponds to a Classification Error of 5%.

Computers used to do much worse. The best a computer could do in 2011 was a horrible 25%. That’s one error in every four images!

But then something interesting happened.

In 2012, a team used a neural network and won the challenge with a classification error of only 15%, way better than any competing team. This proved that neural networks could outperform more traditional machine learning algorithms.

People took notice, and in the following year everybody was using neural networks.

Then in 2014, something amazing happened. A team from the Oxford Visual Geometry Group won the competition with an astounding score of 7.4%.

This was mind-blowing. The algorithm, called VGG16, performed only 2% worse than a human.

Computers actually got _this_ close to beating humans at image recognition.

How did Oxford pull this off?

They used a revolutionary new concept called Convolution.

Convolution is well-known in mathematics, but nobody had used it in machine learning before. When applied to a neural network, a convolution layer makes the network ‘translation-equivalent’.

Here’s what that means…

Older neural networks were notorious for only detecting objects in the exact same location where they had been trained. Take the following images for example:

A neural network trained on the middle image would be unable to recognize the statue in the two other images, because it’s not exactly in the center of the image.

To be able to recognize 1000 image categories, these older networks needed massive amounts of network nodes to learn each image individually. And because computing time rises exponentially with each additional network layer, there simply wasn’t enough CPU power to run a network large enough.

Convolution solves all that.

A convolution layer allows the network to learn features of the statue independently of its location in the image. The network now needs a much smaller amount of network nodes to learn to recognize the statue.

The Oxford team went all out with this concept.

Here is their network architecture:

Each slab in the diagram is a single convolution layer in the VGG16 network. Oxford stacked 13 of them on top of each other!

Oxford’s victory proved that Convolution was the way forward. Everybody started using it, and one year later the winning ImageNet algorithm scored 4.8% and beat humans for the first time.

It’s no understatement to say that Convolution has revolutionized the field of Machine Learning.

But you know what the good news is?

The VGG16 algorithm is open source and available for public use. It’s very popular and built into many machine learning libraries. The network weighs in at around 500MB and can easily run on a modern computer.

A very popular trick to get an image recognizer up and running quickly is to take the pre-trained VGG16 network, chop off the classifier at the end (the blue and brown layers in the diagram), and replace it with your own.

This trick is called Feature Extraction, and you can use it to build a reliable image detector for any object.

For example, you could train your network on images of car parking spaces, and then build an automatic parking space finder:

Did I inspire you to build an image detector of your own?

Leave a comment and let me know!