0% found this document useful (0 votes)
8 views8 pages

Deep Learning

deep learning
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
0% found this document useful (0 votes)
8 views8 pages

Deep Learning

deep learning
Copyright
© © All Rights Reserved
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1/ 8

DEPARTMENT OF COMPUTER SCIENCE

“Classification of Fashion dataset


Using CNN-ANN”

Programme: MCA
Semester: III
Course Title: Deep Learning ( 22CSA644)

Submitted by,

Shashank R - MY. AC. P2MCA23050

Department of Computer Science

Amrita Vishwa Vidyapeetham Mysuru Campus

Submitted to,
Dr.Pallavi Joshi

Assistant Professor
Department of Computer Science

Amrita Vishwa Vidyapeetham Mysuru Campus


1. INTRODUCTION
The Fashion-MNIST dataset is a popular benchmark dataset for image classification
tasks. It is designed to serve as a more challenging alternative to the traditional MNIST
dataset of handwritten digits. Fashion-MNIST consists of grayscale images of fashion
items, such as clothing and footwear, with the goal of classifying them into predefined
categories. This dataset is widely used to test the performance of deep learning models,
particularly Convolutional Neural Networks (CNNs) and Artificial Neural Networks
(ANNs). By combining CNN for feature extraction and ANN for classification, we can
create a highly efficient and effective model for classifying fashion items in the Fashion-
MNIST dataset. CNN's ability to learn hierarchical patterns in images and ANN’s
classification strength lead to robust performance on this benchmark task.
2. METHODOLOGY

A. Data Collection :
The Fashion MNIST dataset was created by Zalando Research, an e-commerce
company that specializes in fashion retail, to serve as a benchmark dataset for
image classification tasks, specifically aimed at replacing the widely used
MNIST handwritten digits dataset. Unlike MNIST, which is relatively simple,
Fashion MNIST provides a more challenging and realistic problem set for
machine learning models.

Fig 2 Image Collection


B. Model Creation:

Input Layer: The images are reshaped to a 28x28x1 tensor, where 1 is the grayscale channel.

Convolutional Layers:

The first convolutional layer uses 32 filters of size 3x3 and applies ReLU activation. Max-pooling
(2x2) reduces the spatial dimensions.

The second and third convolutional layers use 64 filters with ReLU activation and another max-
pooling operation.

Flattening: Converts the 3D feature maps into a 1D vector.

Fully Connected Layers: The first dense layer has 128 neurons with ReLU activation. The output
layer has 10 neurons (one for each class), with softmax activation for multi-class classification.

Optimizer: The adam optimizer is used for efficient gradient-based learning.

Loss Function: Sparse categorical cross-entropy is used as the loss function since it’s a multi-class
classification problem.

C .Model Compilation:

Optimizer:

 This controls how the model updates its weights during training based on the
loss function. Some popular optimizers include:

o Adam ('adam'): An adaptive learning rate optimizer that is efficient for


most problems.

o SGD ('sgd'): Stochastic Gradient Descent with or without momentum.


o RMSprop: Root Mean Square Propagation, often useful for RNNs.

Loss Function:

 The loss function measures the difference between the predicted output and the
true output. The goal of training is to minimize this value.

o sparse_categorical_crossentropy: Used for multi-class classification


when your labels are integers (e.g., [0,1,2,...,9]).

o categorical_crossentropy: Used for multi-class classification when your


labels are one-hot encoded.

o binary_crossentropy: Used for binary classification tasks.

D.Model Fitting:
3. RESULTS

After successfully building, compiling, and training the CNN-ANN model on the
Fashion-MNIST dataset, the next step is to evaluate the model’s performance and
interpret the final results. Here’s what you should consider:

1. Training Accuracy vs. Validation Accuracy

During the training process, you’ll monitor the model’s accuracy on both the training
and validation datasets. These metrics give insight into how well the model is
learning and generalizing.

 Training Accuracy: This measures how well the model fits the training data.
A high training accuracy indicates that the model is effectively learning the
features of the training dataset.

 Validation Accuracy: This measures how well the model performs on unseen
validation data (the test set). It reflects the model’s generalization ability.
  The model achieved 89-91% accuracy on the Fashion-MNIST dataset, which is a strong
result for this type of problem.
  The model's final test accuracy is a good measure of how well it will perform on real-
world unseen data.
  The combination of CNN for feature extraction and ANN for
classification proves to be effective in distinguishing between different
fashion items.
4. TESTING ON NEW IMAGE:
Testing the model on a new image involves loading the image, preprocessing it to match the model's
input format, and then using the model to predict the label. The result will be a probability
distribution across the 10 classes, from which you can derive the predicted fashion item. This
process demonstrates how the trained CNN-ANN model can be used in real-world applications to
classify unseen images of fashion items.

You might also like