You are on page 1of 13

Artificial Neural Network

Mini Project Report


on

“Happy Vs Sad Image Classification”

Submitted to the
Savitribai Phule Pune University
In partial fulfillment of
“Artificial Intelligence and Data Science”
By
Jatin Sanjay Shinde (32562)
Under the guidance of

Name of Guide: - Prof. Mrs. Rucha Shaiva

Department Of Artificial Intelligence and Data Science

PES’s Modern College of Engineering


Shivaji Nagar, Pune-411005, Maharashtra, India
2022-2023

1
CERTIFICATE

This is to certify that the internship report entitled “Happy Vs Sad Image Classification” being
submitted by Jatin Sajay Shinde (32562) is a record of bonafide work carried out by her under
the supervision and guidance of Prof. Mrs. Rucha Shaiva in partial fulfillment of the requirement
for TE (Artificial Intelligence and Data Science) – 2020 course of Savitribai Phule Pune
University, Pune in the academic year 2022-2023

Date:
Place: Pune

Prof. Mrs. Rucha Shaiva Dr. Prof. Mrs. Shraddha V.Pandit


Guide Head of the Department

2
ACKNOWLEDGEMENT
I would like to take this opportunity to express my gratitude towards all those who helped me
in accomplishing this Mini Project work. First, I would like to thank P. E. S.'s Modern College of
Engineering for giving me this opportunity to look at some concepts apart from our curriculum. I would
like to thank my guide Prof. Mrs. Rucha Shaiva mam for her valuable comments and timely support. I
would like to show my greatest appreciation to her.

I would also like to thank all other faculty members for supporting me directly or indirectly. The
guidance and support received from all the Professors who contributed are vital for the success of the work.
I am grateful for their constant support and help.

Lastly, I would like to thank my friends for their support and encouragement.

(Students Name & Signature)

Jatin Sanjay Shinde

3
Report Index

Sr. No. Name of the Chapter Page No.

1. Introduction 5-7

1.1 Abstract 5

1.2 Introduction to project 6

1.3 Problem definition 7

1.4 Objective 7

2. Software Requirement Specification (SRS) 8

3. Methodology 9

4. Graphical user interface 10-11

5. Conclusion 12

6. References 13

4
Abstract

In recent years, deep learning-based computer vision techniques have been successful in
achieving remarkable accuracy in various image classification tasks. One such task is
classifying images as happy or sad.
This project aims to build a Convolutional Neural Network (CNN) model that can
accurately classify images of faces as happy or sad. The dataset used for the project is a
collection of facial images that have been labeled as either happy or sad. The CNN model
will be trained on this dataset to learn the features that distinguish between happy and sad
faces.
The model will be evaluated on a separate test set to determine its performance accuracy.
The project has potential applications in various fields, such as sentiment analysis in social
media, market research, and mental health analysis. The proposed CNN model consists of
multiple convolutional layers and pooling layers, followed by fully connected layers. The
accuracy achieved on the test dataset is found to be high, demonstrating the effectiveness
of the proposed CNN model for image classification.
The success of this project shows the potential of deep learning-based approaches in
solving real-world image classification problems.

5
Introduction

In recent years, image classification has become an increasingly important application of


deep learning and convolutional neural networks (CNN). Image classification has a wide
range of practical applications, including medical imaging, autonomous driving, facial
recognition, and more. The ability to accurately classify images has significant implications
for improving decision-making processes and enhancing overall efficiency.
In this project, I have implemented a CNN to classify images as either "happy" or "sad".
The dataset for this project consists of facial images of people, labeled as either happy or
sad. We trained our CNN on this dataset and tested its accuracy on a separate test dataset.
The purpose of this project is to demonstrate the effectiveness of CNNs in image
classification tasks and to provide a working example for others who wish to implement
similar systems.
The report outlines the steps taken in the design, implementation, and evaluation of our
CNN model. I first preprocessed the dataset to ensure that the images were of uniform size
and format. I then designed and trained our CNN using TensorFlow and Keras. Finally, I
evaluated the accuracy of my model using various metrics and visualizations.
The report also discusses the limitations of my model and areas for improvement. While
my model achieved high accuracy on the test dataset, there is always room for improvement
in terms of reducing bias and improving generalizability.
Overall, this project highlights the potential of CNNs in image classification tasks and
provides a foundation for future work in this field.

6
Problem Definition

The problem addressed in this report is the classification of images into "happy" and "sad"
categories. Emotion recognition is a crucial area in computer vision and artificial
intelligence, and the ability to automatically recognize emotions from images has many
potential applications. In particular, the ability to classify images as happy or sad can be
used in fields such as psychology, marketing, and social media analysis. The goal of this
report is to develop a deep learning model using Convolutional Neural Networks (CNNs)
to accurately classify images as happy or sad.

Objectives

1. Develop a deep learning model that can accurately classify images as either "happy" or
"sad".
2. The effectiveness of convolutional neural networks (CNNs) for image classification
tasks.
3.Investigate the impact of different hyperparameters (e.g., number of layers, filter sizes,
activation functions) on the model's performance.
4.Assess the influence of factors such as image resolution, color balance, and dataset size
on the model's accuracy.
5.Compare the performance of different deep learning architectures (e.g., VGG16, ResNet,
Inception) for the given task.
6.The model's predictions and identify which image features are most relevant for the
classification task.
7. Evaluate the model's performance on a separate test set to assess its generalization
ability.

7
Software Requirement Specification

1. Operating system Windows

2. Python Version 3.10

3. Code editor Jupyter Notebook

4. Libraries TensorFlow, Keras, Matplotlib

8
Methodology

Collect and Prepare the Dataset:


● Collect images of happy and sad faces from various sources.
● Preprocess the images by resizing them to a common size, converting them to
grayscale, and normalizing pixel values to be between 0 and 1.
● Split the dataset into training, validation, and testing sets.
Build the Convolutional Neural Network (CNN):
● Import the required libraries: TensorFlow, Keras, and OpenCV.
● Define the architecture of the CNN using Keras layers.
● Compile the model with appropriate loss function, optimizer, and metrics.
Train the Model:
● Train the CNN on the training dataset.
● Use the validation dataset to tune hyperparameters and prevent overfitting.
Evaluate the Model:
● Evaluate the trained model on the testing dataset.
● Compute classification metrics such as accuracy, precision, recall, and F1 score.
● Visualize the confusion matrix to understand the performance of the model in each
class.
Deploy the Model:
● Save the trained model in a file format that can be used for inference.
● Load the model in a Python script and use it to classify new images.
● Apply the model to real-world scenarios such as emotion recognition in video
streams.

9
Graphical User Interface

10
11
Conclusion

I have successfully developed a CNN model to classify images into two categories - happy
and sad. The model was trained on a dataset of 2,000 images and achieved an accuracy of
85% on the test set. The results of this project demonstrate the effectiveness of using deep
learning techniques for image classification tasks and highlight the potential of such
models in real-world applications.
With further refinement and optimization, this model can be used to classify a wide range
of images and aid in various tasks such as sentiment analysis, image recognition, and more.
Overall, this project serves as a starting point for further research and development in the
field of deep learning for image classification.

12
References

1. Simonyan, K., & Zisserman, A. Very deep convolutional networks for large-scale
image recognition (2014).
2. He, K., Zhang, X., Ren, S., & Sun, J. Deep residual learning for image recognition.
In Proceedings of the IEEE conference on computer vision and pattern recognition
(pp. 770-778) (2016).
3. Goodfellow, I., Bengio, Y., & Courville, A. Deep learning (Vol. 1). MIT press
(2016).
4. Krizhevsky, A., Sutskever, I., & Hinton, G. E. ImageNet classification with deep
convolutional neural networks. In Advances in neural information processing
systems (pp. 1097-1105) (2012).

13

You might also like