AI Image Classification With Neural Network 221002564 222002074
AI Image Classification With Neural Network 221002564 222002074
[For teachers use only: Don’t write anything inside this box]
Marks: Signature:
Comments: Date:
Contents
1 Introduction 3
1.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.2 Motivation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3 Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . 3
1.3.2 Complex Engineering Problem . . . . . . . . . . . . . . . . . . 4
1.4 Design Goals/Objectives . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Application . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
3 Performance Evaluation 10
3.1 Simulation Environment and Procedure . . . . . . . . . . . . . . . . . 10
3.1.1 Training Configuration . . . . . . . . . . . . . . . . . . . . . . 10
3.1.2 Testing Configuration . . . . . . . . . . . . . . . . . . . . . . . 10
3.2 Results Analysis and Testing . . . . . . . . . . . . . . . . . . . . . . . 11
1
3.2.1 Training and Validation Accuracy . . . . . . . . . . . . . . . . 11
3.2.2 Loss Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 11
3.2.3 Final Evaluation Metrics . . . . . . . . . . . . . . . . . . . . . 11
3.3 Overall Discussion of Results . . . . . . . . . . . . . . . . . . . . . . . 12
4 Conclusion 14
4.1 Summary and Discussion . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.2 Limitations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
4.3 Scope for Future Work . . . . . . . . . . . . . . . . . . . . . . . . . . 14
2
Chapter 1
Introduction
1.1 Overview
Image classification has become a cornerstone application in computer vision, powered
by the growth of deep learning. This project focuses on building a Convolutional Neural
Network (CNN) to classify images from the CIFAR-10 dataset, which contains 60,000
32x32 color images across 10 categories. In addition to implementing the model.We
designed a user friendly graphical interface using PyQt5, enabling real time training
and prediction capabilities through a GUI.
1.2 Motivation
The explosive growth in visual data ranging from autonomous driving systems to facial
recognition demands scalable and accurate classification systems. Our motivation stems
from the desire to understand and practically implement deep learning techniques us-
ing CNNs and to offer a simplified GUI-based interface so that nontechnical users can
also explore how these models function in practice. The integration of visualization
and control features bridges the gap between theoretical understanding and real-world
applications.
3
1.3.2 Complex Engineering Problem
The following Table 1.1 outlines how our project satisfies multiple attributes of complex
engineering problems.
• Build a CNN model that can classify CIFAR-10 images with high accuracy.
• Develop a PyQt5-based GUI allowing users to preview data, set training parame-
ters and make predictions.
• Ensure modularity and readability of code for educational and extension pur-
poses.
1.5 Application
This project has numerous real-world applications:
4
• Educational Tool: Helps students understand how deep learning pipelines work
through a visual interface.
Figure 1.2: Image Classification Using deep learning Convolutional Neural Network
5
Chapter 2
2.1 Introduction
The goal of this project is to apply Convolutional Neural Networks (CNNs) to solve
the task of image classification using the CIFAR-10 dataset. Image classification plays
a vital role in many computer vision applications. The CIFAR-10 dataset offers a bal-
anced and well studied benchmark with 60,000 labeled images distributed across 10
object categories. This makes it suitable for training, evaluating and understanding the
performance of deep learning models
• Airplane
• Automobile
6
• Bird
• Cat
• Deer
• Dog
• Frog
• Horse
• Ship
• Truck
Figure 2.1: Sample images from the CIFAR-10 dataset, showing various categories
2.3 Implementation
The implementation phase includes four main tasks: dataset preparation, CNN archi-
tecture design, model training, and evaluation. We used Python along with key libraries
such as TensorFlow/Keras, NumPy, Matplotlib and OpenCV for development.
7
• Train the model and monitor its performance.
• Evaluate the model on unseen test data.
• Save the trained model for future use.
• Accept user input to test predictions using new images.
8
2.3.4 User Interaction and Prediction
After training and saving the model, we created a feature that allows users to input an
image, which is then resized to 32x32 and passed to the trained model for prediction.
def g et _ u s e r _ in p u t _ i m a g e () :
image_path = input ( " Enter the image path : " )
img = cv . imread ( image_path )
if img is None :
print ( " Image not found . Please check the path . " )
return None
img = cv . cvtColor ( img , cv . COLOR_BGR2RGB )
img = cv . resize ( img , (32 , 32) )
return img
img = g e t _ u se r _ i n p u t _ i m a g e ()
if img is not None :
prediction = model . predict ( np . array ([ img ]) / 255.0)
predicted_class = np . argmax ( prediction )
print ( " Predicted class : " , class_names [ predicted_class ])
2.5 Summary
This chapter discussed the practical design and development of our image classification
system. We successfully implemented and trained a Convolutional Neural Network us-
ing Python and Keras to classify CIFAR-10 images. The model achieved good accuracy
and was capable of predicting classes for new images provided by users.
9
Chapter 3
Performance Evaluation
• Epochs: 35
• Optimizer: Adam
10
3.2 Results Analysis and Testing
As seen in the figure, the model steadily improved its prediction capability, eventu-
ally stabilizing in both training and validation phases.
11
• Test Accuracy: 69.5%
• Test Loss: 0.89
Figure 3.4: Get the user input image and Make prediction
These results reflect the model ability to generalize to unseen data which is a critical
benchmark in classification tasks.
12
Figure 3.5: Get the user input image and Make prediction
• Tuning hyperparameters like learning rate, batch size and kernel size.
13
Chapter 4
Conclusion
4.2 Limitations
While the project achieved its core objectives, several limitations were observed during
development:
• No Dropout Layers: The absence of dropout layers may have led to overfitting,
especially in later epochs.
• Shallow Architecture: The CNN used had a basic structure.Lacking the depth
and complexity found in state of the art models.
14
• Model Enhancement: Employ deeper and more powerful architectures like ResNet,
VGG or DenseNet to improve accuracy.
• Deployment: Wrap the trained model in a user friendly web or desktop appli-
cation using frameworks like Flask, Streamlit or PyQt5 to allow real time image
classification.
• Transfer Learning: Experiment with pretrained models and fine-tune them for
the CIFAR-10 dataset to achieve better results with less training.
15
Bibliography
[1] A. Krizhevsky and G. Hinton, *Learning multiple layers of features from tiny
images*, Technical Report, University of Toronto, 2009.
[2] Y. LeCun, Y. Bengio, and G. Hinton, *Deep learning*, Nature, vol. 521, no. 7553,
pp. 436–444, 2015.
[3] I. Goodfellow, Y. Bengio, and A. Courville, *Deep Learning*, MIT Press, 2016.
16