0% found this document useful (0 votes)
10 views19 pages

Kanika Kapoor (H1) 17 2318936 (Camera - Classifier) PDF

The document is a mini project report on the 'Camera Classifier' model, which utilizes machine learning techniques, specifically Support Vector Machines (SVM), to classify images captured from a live camera feed. It outlines the project's objectives, approach, implementation details, results, and future enhancements, aiming to create an accessible application for users to train models with their own images. The report emphasizes user-friendly design and the integration of various technologies for effective image classification.

Uploaded by

nikkikapoor0528
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
10 views19 pages

Kanika Kapoor (H1) 17 2318936 (Camera - Classifier) PDF

The document is a mini project report on the 'Camera Classifier' model, which utilizes machine learning techniques, specifically Support Vector Machines (SVM), to classify images captured from a live camera feed. It outlines the project's objectives, approach, implementation details, results, and future enhancements, aiming to create an accessible application for users to train models with their own images. The report emphasizes user-friendly design and the integration of various technologies for effective image classification.

Uploaded by

nikkikapoor0528
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 19

3rd Sem Mini Project Report on

Camera Classifier Model

Submitted in partial fulfilment of the


requirement for the award of the degree of
( CSE III Semester Mini Project )
2024-2025

Submitted To : Submitted by:


Ms. Aditya Verma Ms. Kanika Kapoor
(CC-CSE-H1-III-Sem) Uni Roll No. : 2318936
Section : H1
Class Roll No. : 17
DEPARTMENT OF COMPUTER SCIENCE AND
INFORMATION TECHNOLOGY
GRAPHIC ERA HILL UNIVERSITY, DEHRADUN

CANDIDATE’S DECLARATION
I hereby Certify that the work which is being presented in the project report
entitled “ Camera Classifier “ in partial fulfilment of the requirements for the
award of the Degree of Bachelor of Technology in Computer Science and
Engineering in the Department of Computer Science and Engineering of
Graphic Era Hill University , Dehradun .

Date: 13/01/2025

Ms Aditya Verma

Class Co-ordinator Head of Department


CSE-H1-III-Sem (CSE Department )
( CSE Department) GEHU Dehradun
GEHU, Dehradun
ACKNOWLEDGEMENT

I would like to express our gratitude to our parents for their


continuing support and encouragement. We also wish to thank
them for providing us with the opportunity to reach this far in our
studies.
I would also like to thank particularly our project Co-ordinator Ms
Aditya Verma for her patience, support and encouragement
throughout the completion of this project and having faith in us.
At last but not the least I greatly indebted to all other persons who
directly or indirectly helped us during this work.

Ms Kanika Kapoor
Roll No. 2318936
CSE -H1-III-Sem
Session – 2024-2025
GEHU , Dehradun
Table of Contents

Chapter No. TITLE Page No.


1. Introduction and 4
Problem Statement
2. Approach 6
3. Project Work Carried 8
4. Results and Conclusion 10
5. Future Work 11

References 13
Chapter-1 :

Introduction and Problem Statement

Introduction
In the previous years , the field of computer vision has achieved
significant traction , enabling machines to interpret and
understand visual information from the world. One of the most
promising applications of computer vision is image classification,
where algorithms are trained to recognize and categorize images
based on their content.

This project, titled "Camera Classifier," aims to leverage the


capabilities of machine learning, specifically Support Vector
Machines (SVM), to create a user-friendly application that
classifies images captured from a live camera feed.
The Camera Classifier application empowers users to capture
images of two distinct classes—such as "Cats" and "Dogs"—and
subsequently train a machine learning model using these images.
Users can then make real-time predictions based on the live
camera input, allowing for immediate feedback on the
classification results.
By integrating a graphical user interface (GUI) with camera
functionality, the application provides an interactive platform for
users to engage with machine learning concepts and explore the
practical applications of image classification in various domains,
such as pet recognition, object detection, and more.
Problem Statement :

Despite the significant progress in image classification


technologies, many existing solutions present challenges that
hinder widespread adoption.
Common issues include the complexity of implementation, the
requirement for extensive technical knowledge, and the reliance
on predefined datasets.
These barriers can discourage users who wish to explore machine
learning applications but lack a strong background in
programming or data science.
Furthermore, many image classification systems do not offer the
flexibility for users to train models with their own images, limiting
their practical utility.
The primary problem addressed by the Camera Classifier project
is the need for an accessible and intuitive application that
enables users to:
o Captures images for specific classes without requiring
extensive technical expertise .
o Train a machine learning model using their own data in a
straightforward manner.
o Make real-time predictions based on live camera input,
facilitating immediate feedback and interaction.
By developing this application, we aim to bridge the gap between
complex machine learning concepts and practical, user-friendly
tools that empower individuals to harness the power of image
classification in their own projects and explorations.
Chapter : 2
Approach
The approach for developing the "Camera Classifier" application involves
several key steps that integrate computer vision techniques with machine
learning algorithms.
The primary goal is to create a system that can classify images captured
from a Camera into two user-defined classes.
The approach can be broken down into the following phases:
• System Design: Outline the architecture of the application, including
the camera module, model module, and GUI.
• Image Capture: Implement functionality to capture images from the
webcam and store them in designated folders for each class.
• Model Training: Utilize the captured images to train a machine
learning model (SVM) that can classify new images.
• Prediction Mechanism: Develop a method to predict the class of
images in real-time using the trained model.
• User Interface Development: Create an intuitive GUI that allows
users to interact with the application easily.
Technical approach :
The technical approach for developing the "Camera Classifier" application
involves leveraging various technologies and methodologies in computer
vision, machine learning, and software development. Below are the key
components of the technical approach:

Techstack Used :
The "Camera Classifier" application is built using a combination of
programming languages, libraries, and tools that facilitate the development
of computer vision and machine learning applications. Below is a detailed
overview of the tech stack used in this project:

1. Programming Language
• Python: The primary programming language used for developing the
application. Python is chosen for its simplicity, readability, and
extensive support for libraries in machine learning and computer
vision.
2. Libraries and Frameworks
• OpenCV (cv2):
• A powerful library for computer vision tasks, used for capturing
video from the webcam, processing images, and performing
image transformations.
• Functions such as cv.VideoCapture(), cv.cvtColor(),
and cv.imwrite() are utilized for camera handling and image
manipulation
• Pillow (PIL):
• A Python Imaging Library that provides image processing
capabilities.
• Used for opening, manipulating, and saving images,
particularly for resizing and converting images to different
formats.
• scikit-learn:
• A machine learning library that provides simple and efficient
tools for data mining and data analysis.
• The LinearSVC class is used for implementing the Support
Vector Machine (SVM) model for classification tasks.
• tkinter:
• A standard GUI toolkit for Python, used to create the graphical
user interface of the application.
• Provides widgets such as buttons, labels, and dialogs for user
interaction.
3. Development Environment
• IDE/Text Editor:
• Any Python-compatible Integrated Development Environment
(IDE) or text editor can be used, such as:
• PyCharm
• Visual Studio Code
• Jupyter Notebook (for prototyping)
4. Operating System
• The application is designed to run on any operating system that
supports Python and the required libraries, including:
• Windows
5. Version Control
• Git:
• A version control system used for tracking changes in the
codebase and collaborating with other developers.
• GitHub or GitLab can be used for hosting the repository.
6. Additional Tools
• Command Line Interface (CLI):
• Used for running the application and executing commands to
install dependencies and manage the environment.
Flowchart:
Chapter 3 :
Project Work Carried
Work flow :

Implementation Details :
1. Camera Module
• Class: Camera
• Initializes the webcam using
OpenCV's cv.VideoCapture(0).
• Provides a method get_frame() to capture frames and
convert them from BGR to RGB format.
• Ensures proper resource management by releasing the
camera when the application is closed.
2. Model Module
• Class: Model
• Utilizes LinearSVC from the scikit-learn library for
classification.
• Methods:
• train_model(counters): Reads images from class
folders, preprocesses them (grayscale and
reshaping), and trains the SVM model.
• predict(frame): Takes a frame, preprocesses it,
and predicts the class using the trained model.
3. User Interface Module
• Class: App
• Built using tkinter for GUI development.
• Components:
• Canvas for displaying the webcam feed.
• Buttons for capturing images, training the model,
making predictions, and resetting the application.
• Labels for displaying the predicted class.
• Methods:
• init_gui(): Initializes the GUI components and
layout.
• save_for_class(class_num): Captures and saves
images for the specified class.
• reset(): Clears captured images and resets the
application state.
• update(): Continuously updates the webcam feed
and handles auto-prediction if enabled.
4. Image Processing
• Captured images are saved in grayscale format to reduce
dimensionality.
• Images are resized to a standard thumbnail size (150x150
pixels) for consistency during training.
5. Data Management
• Images are stored in separate folders for each class (e.g., "1"
and "2").
• The application maintains counters to track the number of
images captured for each class.

Features :
1. User -Friendly Interface
• Intuitive GUI built with tkinter, allowing easy interaction for
users of all skill levels.
2. Image Capture
• Users can capture images for two user-defined classes using
dedicated buttons.
3. Model Training
• Users can train the SVM model with captured images by
clicking the "Train Model" button.
• The application reads images from the respective class folders
and trains the model accordingly.
4. Real-Time Prediction
• Users can make predictions on the current webcam frame by
clicking the "Predict" button.
• The predicted class is displayed on the GUI.
5. Auto Prediction Mode
• An optional feature that allows the application to continuously
predict the class of the current frame from the webcam feed.
6. Reset Functionality
• Users can reset the application to clear captured images and
reset counters, allowing for a fresh start.
7. Dynamic Class Naming
• Users are prompted to enter names for the two classes at the
start of the application, making it flexible for different use
cases.
8. Image Storage Management
• Automatically creates directories for storing images if they do
not exist, ensuring organized data management.
Chapter – 4 :
Results and Conclusion

Results
• Successful Image Capture:
• The application effectively captures images from the webcam
for two user-defined classes, allowing for flexible classification
tasks.
• Model Training:
• The SVM model is trained successfully using the captured
images, demonstrating the ability to learn from user-provided
data.
• Accurate Predictions:
• The application provides real-time predictions with a high
degree of accuracy, depending on the quality and quantity of
training data.
• User Interaction:
• The intuitive GUI facilitates easy interaction, enabling users to
capture images, train the model, and make predictions without
technical expertise.
• Auto Prediction Feature:
• The optional auto-prediction mode allows for continuous
classification, enhancing the application's usability in dynamic
environments.
Conclusion
• Effective Integration of Technologies:
• The project successfully integrates computer vision, machine
learning, and GUI development, showcasing the capabilities of
Python and its libraries.
• Modular Design:
• The modular architecture enhances maintainability and
scalability, allowing for future improvements and feature
additions.
• User -Centric Approach:
• By focusing on user experience, the application caters to a
wide range of users, from beginners to advanced practitioners
in machine learning.
• Potential for Expansion:
• The foundation laid by this project opens avenues for further
enhancements, such as supporting multiple classes,
improving model accuracy, and integrating additional machine
learning algorithms.
• Overall Impact:
• The "Camera Classifier" application serves as a practical tool
for image classification tasks, demonstrating the potential of
real-time machine learning applications in various fields,
including education, research, and industry.
Chapter – 5 :
Future Approach
The "Camera Classifier" project has established a solid foundation for real-
time image classification using a webcam.
To enhance its capabilities and broaden its applicability, the following
future approaches can be considered:
1. Support for Multiple Classes
• Expand Class Functionality:
• Modify the application to allow users to define more than two
classes for classification, enabling more complex
classification tasks.
• Dynamic Class Management:
• Implement functionality to add or remove classes dynamically
during runtime.
2. Improved Model Performance
• Experiment with Advanced Algorithms:
• Explore other machine learning algorithms such as
Convolutional Neural Networks (CNNs) for improved accuracy
in image classification tasks.
• Hyperparameter Tuning:
• Implement techniques for hyperparameter optimization to
enhance the performance of the SVM model.
3. Enhanced Image Preprocessing
• Data Augmentation:
• Introduce data augmentation techniques (e.g., rotation,
flipping, scaling) to increase the diversity of training images and
improve model robustness.
• Image Quality Improvement:
• Implement image enhancement techniques to improve the
quality of captured images before training.
4. Real-Time Performance Optimization
• Reduce Latency:
• Optimize the image capture and processing pipeline to
minimize latency in predictions, ensuring smoother real-time
performance.
• Utilize GPU Acceleration:
• Explore the use of GPU acceleration for model training and
inference to handle larger datasets and improve processing
speed.
5. User Experience Enhancements
• Advanced GUI Features:
• Enhance the GUI with additional features such as live feedback
on model confidence scores, visualizations of predictions, and
error handling.
• User Customization:
• Allow users to customize settings such as image resolution,
prediction intervals, and model parameters.
6. Integration with Other Technologies
• Cloud-Based Model Training:
• Consider integrating cloud services for model training and
storage, allowing users to leverage more powerful computing
resources.
• Mobile Application Development:
• Develop a mobile version of the application to enable image
classification on mobile devices, expanding accessibility and
usability.
7. Comprehensive Documentation and Tutorials
• User Guides:
• Create detailed user manuals and tutorials to help users
understand how to effectively use the application and its
features.
• Developer Documentation:
• Provide comprehensive documentation for developers to
facilitate contributions and modifications to the codebase.
8. Community Engagement and Feedback
• Open Source Collaboration:
• Consider making the project open source to encourage
community contributions, feedback, and collaborative
improvements.
• User Feedback Loop:
• Establish a feedback mechanism to gather user insights and
suggestions for future enhancements.
References

1. OpenCV documentation - https://docs.opencv.org/


2. scikit-learn Documentation – https://scikit-
learn.org/stable/index.html
3. Pillow (PIL) Documentation
https://pillow.readthedocs.io/en/stable/
4. tkinter Documentation -
https://docs.python.org/3/library/tkinter.html
5. Youtube – https://www.youtube.com/watch?v=CeTR_-
ALdRw
6. Github - https://github.com/NeuralNine/camera-
classifier
7. Machine Learning -
https://machinelearningmastery.com/
8. Research papers on SVM & image classification

You might also like