Image Recognition 1 of 4 – Introduction

Training an image recognition system is a common task in machine learning these days. However comparatively few tutorial exist which complete the entire pipeline. To address that I will provide an example. We shall cover the following steps:

  1. Acquiring a suitable dataset
  2. Cleaning and preparing the dataset
  3. Training a machine learning model and testing it

The first step is often the one with the greatest range of variability of difficulty. Sometimes a suitable data set is available for the task that you wish to complete. For example the MNIST digit training set (and its extension to alphanumeric characters EMNIST) or the ImageNet image database. However for some other tasks these sets may be overly general.

For instance lets suppose that we want to be able to identify pictures of different LEGO sets and divide them by type (Bionicle, Technic etc). None of the existing data sets will be sufficient. In this case we can either generate a custom data set by going and taking a large number of photos of LEGO sets or we could acquire a suitable data set from existing resources.

Technic lego – or is it?

One of the most time efficient ways to create data sets today (assuming an off the peg data set is not available) is to acquire them from the web. Part 2 will deal with this web scraping procedure using a Python library called Beautiful Soup.

Once we have a suitable dataset, we will need to clean and organise it so that we can run  a machine learning algorithm on the data.  Part 3 will cover arranging image data ready for machine learning and look briefly at the Pillow image processing library.

Finally we will need to write train and test the model. Part 4 will look at this procedure using TensorFlow, Keras and using transfer learning on a pretrained model named VGG16.

Lets get started!

 

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.