Classifying the CIFAR 10 data set.

Abstract

PilarPinto
4 min readOct 1, 2020

--

This document briefly shows the procedure carried out for the development of the architecture that could classify images based on the CFAR10 dataset, which contains 10 classes of images

Introduction

Today the power of machine learning is well known. It is usually associated with systems capable of classifying objects, people, places. But this process itself is a bit grey. There are algorithms based on supervised learning, which, like a 1-year-old child, is taught to identify and classify animals, either by names and sounds.

But what about computer systems? The answer is that although the processing capacity has grown over time, these can still take up large resources, such as time and processing capacity. In this case, then certain techniques are used, in order to accelerate the training. One of them is transfer learning.

You can think of transfer learning as a relay race. Your team is like a partner and you, your partner has a better start and speed, due to previous training in their muscles. You may be thin, but still, you take advantage of your partner’s muscular capacity and together they manage to finish the circuit in less time compared to the case in which you would have trained yourself to reach the same level. In this case, you take advantage of pre-trained weights models given by Keras that you can use to skip a few steps and obtain good results.

The CFAR10 data set has the following information inside and the mission is to classify these images with an accuracy of at least 87%

Materials and Methods

In this case, I use colab, since it allows you to train models quickly without the need for your computer to have good processing capacity, everything is in the cloud. Internet guides and resources such as A Comprehensive Hands-on Guide to Transfer Learning with Real-World Applications in Deep Learning, and other resources, and a lot of patience.

When I understood what the transfer learning technique was all about, the next step was to look for pieces of example code with which the model could be implemented. I came across many that did not match the libraries to be used, such as Keras or that were already using outdated methods.

The great advance was made when I met with colleagues and they showed their ways and from that, I was based to change the outdated methods that did not work at all for methods that achieved better results.

Results

The expected result for the exercise is an accuracy of 87%, with the architecture used and the SGD optimizer the following results were achieved with the validation accuracy.

And the result of training accuracy was

Discussion

There are different models that have the weights already pre-trained, the question is always to look for the most balanced, in this case, the vgg16 was used which has a depth of 23 layers and with it and freezing techniques and among others it was possible to exceed the threshold imposed by the exercise. In this case, the processing time was not so long due to the collab GPU, but if this is not available, models with less depth could be chosen at the cost of waiting in time or in other types of resources or in the opposite case, go for models with great depth but at the cost of requiring more processing resources.

Acknowledgments (optional)

To my colleagues Brian Florez and David Ovalle for the help and to Jason Brownlee for his article, which gave me an idea of ​​the matter

References

[1] Brownlee J How to Develop a CNN From Scratch for CIFAR-10 Photo Classification, Deep Learning for Computer Vision May 13, 2019

[2] Jesús Cómo Entrenar una Red Neuronal Convolucional (CNN) en CIFAR-10 con Keras

[3] Sarkar D A Comprehensive Hands-on Guide to Transfer Learning with Real-World Applications in Deep Learning

[4]A Yan-Tak Ng C4W2L09 Transfer Learning Deeplearning.ai

--

--