1 of 20

FASHION MNIST CLASSIFICATION

BY: TWISHA KAUL

2 of 20

ABSTRACT

  • In this project, we have built a fashion apparel recognition using the Convolutional Neural Network (CNN) model. To train the CNN model, we have used the Fashion MNIST dataset. After successful training, the CNN model can predict the name of the class given apparel item belongs to. This is a multiclass classification problem in which there are 10 apparel classes the items will be classified.
  • The fashion training set consists of 70,000 images divided into 60,000 training and 10,000 testing samples. The dataset sample consists of 28x28 grayscale images, associated with a label from 10 classes.
  • So the end goal is to train and test the model using a Convolution neural network(CNN).

3 of 20

OBJECTIVE

The objective is to identify(predict) different fashion products from given images using CNN.

The ‘target’ dataset has 10 class labels, (0 – T-shirt/top, 1 – Trouser,....9 – Ankle Boot).

From the given images, we need to classify them into one of these classes, hence, it is essentially a ‘Multi-class Classification’ problem.

4 of 20

INTRODUCTION

What is CNN?

• Convolutional neural networks, like neural networks, consisting of neurons with learnable weights and biases. Each neuron receives multiple inputs, takes a weighted sum over them, passes them through an activation function, and responds with an output.

• The entire network has an activation function loss and all the tips and tricks that we developed for Neural Networks also apply to Convolutional Neural Networks.

5 of 20

• Neural Networks, as the name suggests, is a machine learning technique that is modeled after the Brain. Structure. It consists of a network of learning units called neurons.

• These neurons learn to convert input signals (e.g. an image of a cat) into corresponding output signals (e.g. an image of a cat). cat"), which form the basis for automatic detection.

Example:

• Let’s take the example of automatic image recognition. The process of determining whether an image contains a cat, which involves an activation function. If the image resembles images of previous cats that the neurons have seen before, the tag "cat" would be shown.

6 of 20

• So, the more labeled images the neurons are exposed to, the better it learns to recognize other unlabeled images. We call this the process of neuron formation.

How does CNN work?

There are four layered concepts in Convolutional Neural Networks(CNN):

  1. Convolution,
  2. Relu,
  3. Pooling, and
  4. Full Connectedness (Fully Connected Layer).

7 of 20

  1. Convolution

Each convolution filter represents a feature of interest (e.g. pixels in letters) and the convolutional neural network algorithm learns which features comprise the resulting reference (ie the alphabet).

2. Relu

Relu removes all negative values from the convolution. All positive values remain the same, but all negative values are changed to zero.

3. Pooling

In this layer, we shrink the image stack to a smaller size. The grouping takes place after passing through the activation layer. For this we implement the following 4 steps:

8 of 20

• Choose a window size (usually 2 or 3)

• Choose one step (usually 2)

• Step through your window through your filtered images

• Take in each window the maximum value

9 of 20

METHODOLOGY

  • Phases:
  • 1. Data pre-processing
  • 2. Build CNN
  • 3. Test and Evaluate
  • 4. Saving

10 of 20

DATA PRE-PROCESSING

  • Importing libraries
  • Loading data
  • Showing images from numbers
  • Changing dimensions (3D-4D)

11 of 20

BUILDING FIRST CNN

  • Input/Image
  • First Convolutional Layer
  • Max pulling layer
  • Flatten
  • First input layer
  • Last output layer

12 of 20

TEST AND EVALUATE

13 of 20

SAVING

14 of 20

BUILD 2 COMPLEX CNN

  • Input/Image
  • First convolutional layer
  • First max pooling layer
  • Second convolutional layer
  • Second max pooling layer
  • Flatten
  • First input layer
  • First hidden layer
  • Second hidden layer
  • Last output layer

1st complex model

15 of 20

2nd complex model

16 of 20

CODE

17 of 20

CONCLUSION

  • In this project, I was able to build fashion apparel recognition using a Convolutional Neural Network (CNN).
  • I was able to train and test the model for making its predictions.
  • I also created 2 complex CNN for comparison of their accuracies.
  • The project consists of:
  • A Fashion MNIST Classification model made using Convolutional neural networks(CNN).
  • 2 complex CNN models.

18 of 20

FIRST CNN MODEL

19 of 20

2 COMPLEX CNN

ACCURACY: 91%

ACCURACY: 96%(midst) & 92%(final)

20 of 20

THE END

THANK YOU!