Project 1 - Implement and deploy CNN model in real-time using python on Fashion MNIST dataset
Humans are a brilliant natural system which is having the great capability of viewing and observing multiple images in a short period, then consuming and deducing from them without even realizing how the actual process is completed. But this case is not at all similar to machines or systems.
Data Description
- Each image is 28 pixels in height and 28 pixels in width, for a total of 784 pixels.
- Each pixel has a single pixel value associated with it, indicating the lightness or darkness of that pixel, with higher numbers meaning darker. This pixel value is an integer between 0 and 255.
- The training and test data sets have 785 columns.
- The first column consists of the class labels (see above), representing the clothing article.
- The rest of the columns contain the pixel values of the associated image.
To locate a pixel on the image, suppose that we have decomposed x as x = i * 28 + j, where i and j are integers between 0 and 27. The pixel is located on row i and column j of a 28 x 28 matrix. For example, pixel31 indicates the pixel that is in the fourth column from the left, and the second row from the top, as in an ascii-diagram.
Goals ( 2 to 3 points)
So you are supposed to plan and strategize a solution where firstly you have to get an idea of image processing for a better understanding of the underlying concepts and then get a vision of how to feed an image in such a manner that the machine or system can consume it to help us give a fruitful output.
Key Highlights of the Project: (4 to 5 points)
We know that any image is a cumulative arrangement of dots called pixels. The pixels are arranged in a special order to represent an image. If we modify the order structure or color of a pixel in whatsoever way, the representation of the image would be altered as well. So you have to elaborately work on the implementation of the CNN model in this project.
About the dataset: Here the dataset provided is based on certain fashion components, it is a dataset of images—consisting of a training set of 60,000 examples and a test set of 10,000 examples. Each example is a 28x28 grayscale image, associated with a label from 10 classes.
Expected Outcomes: (4 to 5 points)
The fashion dataset has various images of T-shirts/tops, Trouser, Pullover, Dress, Coat, Sandal, Shirt, Sneaker, Bag, Ankle boots, etc... so the need of the hour is to associate images
with their specific labels and recognize the same.
HINT:
- Pass an input image to the first convolutional layer. The convoluted output is obtained as an activation map. The filters applied in the convolution layer extract relevant features from the input image to pass further.
- Each filter shall give a different feature to aid the correct class prediction. In case we need to retain the size of the image, we use the same padding (zero padding), otherwise valid padding is used since it helps to reduce the number of features.
- Pooling layers are then added to further reduce the number of parameters.
- Several convolution and pooling layers are added before the prediction is made. The convolutional layer helps in extracting features. As we go deeper in the network more specific features are extracted as compared to a shallow network where the features extracted are more generic.
- The output layer in a CNN as mentioned previously is a fully connected layer, where the input from the other layers is flattened and sent so as the transform the output into the number of classes as desired by the network.
- The output is then generated through the output layer and is compared to the output layer for error generation. A loss function is defined in the fully connected output layer to compute the mean square loss. The gradient of error is then calculated.
- The error is then backpropagated to update the filter(weights) and bias values.
- One training cycle is completed in a single forward and backward pass.














