Image Classification refers to the process where a computer “learns” to identify the class of images from a set of pre-classified examples. It is a typical example of supervised learning which “learns” using pre-labelled observations as the training data. This is in contrast to unsupervised learning which can “learn” to group similar items by detecting patterns within the dataset without relying on any labeled outcomes. One classical example is the task of classifying images of handwritten single digits between 0 and 9 (Figure 1).
Before diving into the definition of Deep Learning, it is important to understand one of its basic elements – neurons. Simplistically speaking, a neuron is a unit that receives inputs, performs a computation on the inputs, and then sends the output to other neurons (Figure 2).
A neural network is made up of an interconnected group of neurons, split into different layers. Figure 3 depicts a simple neural network. The first layer is called the input layer while the last layer is called the output layer. Any layer that is not an input or output layer is a hidden layer. Deep Learning is a neural network with multiple levels of hidden layers.
When a picture is fed into a deep learning model, it is first decomposed into image pixels. The hidden layers in the algorithm will then look for certain patterns in the image with deeper layers detecting more sophisticated patterns.
In particular, using visualization techniques, we can see what a typical deep learning model detects at different hidden layers. Figure 4a shows 9 random patterns detected in the first hidden layer. These are very simple patterns such as simple diagonal lines or color gradients. By the fifth layer, however, we can start to see more complex patterns such as the eyeballs (Figure 4b) or faces of particular breeds of dogs (Figure 4c).
Since deep learning doesn’t have any restrictions on the type of images it can analyze, image classification using deep learning can be applied in a huge number of fields. One of the most well-known examples is medicine where it helps to determine if a skin lesion is cancerous and provides early detection of diabetic retinopathy. At NextGeM, we understand the potential of these techniques and are constantly working with healthcare professionals to investigate their medical applications. In one of our current projects, we have successfully utilized a deep learning algorithm to detect and classify bacterial infections from gram-stained images with an accuracy rate of 96%, surpassing the accuracy achieved by a general laboratory technician. Using this algorithm as the backend, we aim to develop a mobile application which allows doctors and physicians worldwide to quickly and easily diagnose bacterial infections, thus helping solve the growing challenge of antimicrobial resistance.