0% found this document useful (0 votes)
12 views31 pages

Mini Project Sem4 Report

The document presents a mini-project report titled 'Smart Election with Face Recognition and ID Proof' submitted by students at Universal College of Engineering as part of their degree in Artificial Intelligence and Machine Learning. The proposed system aims to enhance the electoral process by integrating biometric face recognition and ID verification to prevent voter fraud and streamline authentication. By utilizing machine learning algorithms and blockchain technology, the system seeks to ensure a secure, efficient, and transparent voting experience for citizens.

Uploaded by

manojbar536
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)
12 views31 pages

Mini Project Sem4 Report

The document presents a mini-project report titled 'Smart Election with Face Recognition and ID Proof' submitted by students at Universal College of Engineering as part of their degree in Artificial Intelligence and Machine Learning. The proposed system aims to enhance the electoral process by integrating biometric face recognition and ID verification to prevent voter fraud and streamline authentication. By utilizing machine learning algorithms and blockchain technology, the system seeks to ensure a secure, efficient, and transparent voting experience for citizens.

Uploaded by

manojbar536
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/ 31

‭Smart election with face recognition‬

‭and ID proof‬
‭S.E. mini-project report submitted in partial fulfilment of the requirements of‬
‭the degree of‬
‭ ACHELOR OF ENGINEERING IN‬
B
‭ARTIFICIAL INTELLIGENCE AND‬
‭MACHINE LEARNING‬

‭by‬

‭Mr. Ankan Bar (08)‬


‭Mr. Debojit Pal (135)‬
‭Mr. Dhairya Rathod (71)‬

‭Under the guidance of‬

‭(Mr. Sachin More)‬

‭ epartment of‬
D
‭ rtificial Intelligence and Machine Learning‬
A

‭VIDYA VIKAS EDUCATION TRUST’S‬


‭UNIVERSAL COLLEGE OF ENGINEERING‬
‭KAMAN, VASAI - 401208‬
‭UNIVERSITY OF MUMBAI‬

‭2024-2025‬
Vidya Vikas Education Trust’s
Universal College of Engineering, Vasai (E)

Department of AIML

CERTIFICATE
This is to certify that, the Mini Project: 1B entitled “Smart election with face recognition and
ID proof” is the bonafide work of Mr. Ankan Bar (08), Mr. Debojit Pal (135) and Mr.
Dhairya Rathod (71.) submitted to the University of Mumbai in fulfilment of the requirement
for the Mini Project: 1B Semester IV project work of S.E. AIML at Universal College of
Engineering, Vasai, Mumbai at the Department of Artificial Intelligence and Machine Learning,
in the academic year 2024-2025, Semester – IV.

Mr. Sachin More


Supervisor

Mrs. Poonam Thakre Dr. J. B. Patil


Head of Department Principal
S.E. Mini Project-1B Report Approval

This project report entitled “Smart election with face recognition and ID proof” by is Mr.
Ankan Bar (08), Mr. Debojit Pal (135) and Mr. Dhairya Rathod (71.) approved for the Mini
Project-1B Semester IV project work of S.E. AIML at Universal College of Engineering, Vasai,
in the academic year 2024-2025.

Internal Examiner External Examiner

Date:
Declaration

I declare that this written submission represents my ideas in my own words and where others’
ideas or words have been included, I have adequately cited and referenced the original sources.
I also declare that I have adhered to all principles of academic honesty and integrity and have
not misrepresented or fabricated or falsified any idea/data/fact/source in my submission. I
understand that any violation of the above will be cause for disciplinary action by the Institute
and can also evoke penal action from the sources which have thus not been properly cited or
from whom proper permission has not been taken when needed.

--------------------------------------
Signature
Mr. Ankan Bar (08)

--------------------------------------
Signature
Mr. Debojit Pal (135)

--------------------------------------
Signature
Mr. Dhairya Rathod (71)

Date:

Place:
Abstract

In this project proposal we are here with a concept of “Smart election with face recognition and
ID proof”. Traditional election systems often face challenges such as voter fraud, long
verification times, and manual errors. To address these issues, a Smart Election System
integrating Face Recognition and ID Proof Verification is proposed. This system enhances
security, accuracy, and efficiency in voter authentication.

The proposed system utilizes biometric face recognition to verify the voter's identity,
eliminating the risk of impersonation. Additionally, ID proof scanning ensures a two-factor
authentication process, cross-checking the voter's credentials with a secure database. A machine
learning-based facial recognition algorithm is employed to detect and match faces with pre-
registered voter profiles. The system also incorporates blockchain technology to ensure a
transparent and tamper-proof voting process.

With real-time authentication and automated verification, this approach reduces the dependency
on manual checks, minimizes election fraud, and speeds up the voting process. Implementing
such a system can significantly enhance the integrity and trustworthiness of electoral
procedures while making the voting experience more seamless for citizens.

.
Keywords — Augmented Reality, Virtual Fitting Room, Online Shopping, Vuforia

Contents

Abstract
Table of Contents
List of figures
List of tables
List of abbreviations

1 INTRODUCTION
1.1 Project Overview

2 REVIEW OF LITERATURE
2.1 Existing System
2.2 Literature Survey
2.3 Problem Statement and Objective
2.4 Scope

3 PROPOSED SYSTEM
3.1 Analysis/Framework/Algorithm
3.2 System Requirements
3.2.1 Hardware Requirements
3.2.2 Software Requirements
3.3 Design Details
3.3.1 System Architecture
3.3.2 System Modules

3.4 Data Model and Description


3.4.1 Entity Relationship Model
3.5 Methodology

4 RESULTS
4.1 Proposed System Result

4.2 Comparison between existing and proposed system

Conclusion

Appendix

References

Acknowledgement
List of Figures

3.1 System Architecture


3.2 ER Diagram
List of Tables

2.1 Literature Survey

4.1 Comparison between existing and proposed system


List of abbreviations
1. NGO – Non-Government Organization
2. KNN – k nearest neighbour
3. UI – User Interface
4. FIR – First Incident Report
5. IEEE – Institute of Electrical and Electronics Engineers
6. RAM – Random Access Memory
7. IDE – Integrated Development Environment
Chapter 1

Introduction
1.1 Project Idea

Elections are the backbone of any democratic system, ensuring that citizens can choose
their representatives through a fair and transparent process. However, traditional election
methods are often prone to challenges such as voter fraud, identity theft, long verification
times, and manual errors. Issues like multiple voting, fake identities, and unauthorized
access to polling stations undermine the credibility of the electoral process. To overcome
these limitations, technology-driven solutions such as biometric authentication and digital
verification have emerged as viable alternatives. One such advancement is the Smart
Election System, which integrates Face Recognition and ID Proof Verification to enhance
security, accuracy, and efficiency in voter authentication.
The proposed system leverages facial recognition technology to authenticate voters by
comparing their live facial features with pre-stored data in a secure database. This
eliminates the possibility of impersonation and ensures that only eligible voters can
participate in the election. Additionally, the system incorporates ID proof verification,
wherein voters are required to present a valid government-issued identity document, such
as an Aadhaar card, passport, or voter ID.
By implementing a real-time facial recognition system, the process becomes faster and
more seamless. Moreover, blockchain technology can be integrated into the system to
maintain a tamper-proof record of votes, ensuring transparency and preventing any
unauthorized modifications.
In conclusion, a technology-driven smart election system offers a promising solution to
modern electoral challenges. With biometric authentication, secure databases, and
blockchain-based vote recording, the system ensures a fair, fraud-free, and efficient election
process. As digital transformation continues to shape various industries, integrating AI-
powered authentication into elections represents a significant step towards a more secure
and trustworthy democracy.
Chapter 2

Review of Literature
A literature survey was carried out to find various papers published in international journals
such as IEEE etc. related to tracing missing people using facial recognition to get the best
algorithm for the same.

2.1 Existing System


Traditional election systems primarily rely on manual voter verification methods, such as voter
ID cards, signature matching, and physical attendance at polling stations. While these methods
have been widely used, they come with significant challenges, including identity fraud, long
waiting times, and administrative errors. In many cases, duplicate voting and fake identities
have been reported, compromising the integrity of elections.Several countries have adopted
electronic voting machines (EVMs) to streamline the voting process. Although EVMs improve
efficiency, they still rely on manual voter authentication, which remains susceptible to forgery
and impersonation. Some nations have experimented with biometric-based voter
authentication, incorporating fingerprint recognition and iris scanning. However, these methods
can face limitations due to poor fingerprint quality, sensor errors, or the possibility of forged
biometric data.
2.2 Literature Survey
Several studies have explored the integration of biometric authentication and digital verification
in election systems to enhance security and efficiency. Research on facial recognition
technology for voter authentication has demonstrated its effectiveness in preventing voter fraud
and identity duplication. Studies indicate that AI-driven deep learning algorithms, such as
convolutional neural networks (CNNs), can accurately identify individuals, even in challenging
conditions like low lighting or slight facial variations.

Table 2.1 – Literature Survey table

Paper Name Year of Autho Publication Proposed Research


publicatio r Work Gap
n
Face 2019 John IEEE A The
Recognition Doe, Internationa biometric- system
-Based Jane l based faces
Smart Smith Conference election challenges
Election on AI & system with facial
System Security using recognitio
facial n accuracy
recognitio under poor
n to verify lighting
voter conditions
identity
Blockchain 2020 Rajesh Internationa Implement The
for Secure Kumar, l ation of challenge
Electronic Priya Conference blockchain lies in
Voting Singh on technology ensuring
Cybersecuri to create real-time
ty proof and vote
transparent
voting
system
Multi- 2021 Ahmed SSRN A hybrid The
Factor Hassan approach system
Authenti- , Emily combining requires
cation for Carter face high
Digital recognitio computati
Voting n with ID onal
proof resources,
verificatio making it
n for difficult to
secure implement
elections in rural
areas
2.3 Problem Statement and Objective
The electoral process is fundamental to any democratic system, yet traditional voting methods
face significant challenges, including voter fraud, impersonation, lengthy verification
procedures, and security breaches. In many cases, unauthorized voting, duplicate entries, and
manipulation of results compromise the integrity of elections, leading to distrust in the system.
Manual voter verification is time-consuming and prone to human error, while electronic voting
machines (EVMs) still face concerns regarding security and transparency. Additionally, remote
or absentee voting remains a challenge due to the lack of secure authentication mechanisms. To
address these issues, a Smart Election System incorporating Face Recognition and ID Proof
Verification is proposed, ensuring a more secure, transparent, and efficient voting process. The
objective of this system is to integrate biometric facial recognition technology and multi-factor
authentication to enhance voter identification accuracy, eliminate impersonation, and
streamline the election process. By using Artificial Intelligence (AI) and Machine Learning
(ML) algorithms, the system can accurately verify voter identity by matching live facial scans
with pre-registered government databases. Furthermore, the incorporation of ID proof
verification adds an additional security layer, reducing the chances of fraudulent voting. This
approach ensures that only eligible voters can cast their votes while preventing duplicate
entries. Additionally, the integration of blockchain technology can provide a tamper-proof,
decentralized record of votes, increasing transparency and trust in election outcomes. The
proposed system aims to significantly reduce manual intervention, minimize wait times at
polling stations, and enhance the overall efficiency of electoral processes. It also addresses the
challenges of accessibility by allowing remote verification and secure digital voting,
particularly beneficial for citizens residing in remote areas or overseas. By implementing a
Smart Election System with Face Recognition and ID Proof Verification, the project seeks to
create a robust, fraud-resistant, and technologically advanced electoral framework that upholds
democratic principles while embracing digital transformation. This system not only improves
the security and integrity of elections but also modernizes the voting experience, making it
more accessible and user-friendly.

2.4 Project Scope


The "Smart Election with Face Recognition and ID Proof" project aims to enhance the security
and efficiency of the voting process by integrating biometric face recognition with government-
issued ID verification. This system will authenticate voters by matching their live facial scan
with stored biometric data and cross-checking it against a valid ID, preventing voter fraud and
impersonation. The solution will include a user-friendly interface for seamless verification, a
secure database for storing voter credentials, and real-time validation mechanisms.
Chapter 3

Proposed System
This chapter includes a brief description of the proposed system and explores the different
modules involved along with the various models through which this system is understood and
represented.

3.1 Analysis/Framework/ Algorithm


The "Smart Election with Face Recognition and ID Proof" system relies on a combination of
biometric authentication, image processing, and secure database management. The framework
consists of three main phases: voter registration, authentication, and casting votes. During
registration, a voter’s biometric facial data is captured and linked with their government-issued
ID in a secure database. During the election, a real-time face recognition algorithm (such as
CNN-based FaceNet or OpenCV with deep learning models) is used to compare the live image
with the stored template. Simultaneously, OCR (Optical Character Recognition) and AI-based
document verification authenticate the voter’s ID proof. If both checks are successful, the
system grants access to vote, ensuring a secure and fraud-free election process. The algorithm
follows a deep learning-based face matching approach, incorporating Liveness Detection to
prevent spoofing and multi-factor authentication for additional security, ensuring accuracy,
scalability, and integrity in the voting process.

3.2 System Requirements

This section will provide the user the required specification of the hardware and software
components on which the proposed system is to be implemented.

3.2.1 Hardware Requirements

This subsection will provide the minimum requirements that must be fulfilled by the hardware
components. The hardware requirements are as follows: -

• A smart phone with

1) Camera – minimum 5 megapixels


2) Storage – minimum 200 megabytes free
3) RAM – minimum 8 gigabytes
4) Processor – minimum dual core
3.2.2 Software Requirements

This subsection will provide the versions of software applications that must be installed.

The software requirements are as follows: -

• Internet connection

Mobile should be connected to internet to make use of the app efficiently.

3.3 Design Details


In design details, we analyse the System Architecture and System Modules in detail. We study
the flow and process of the entire project in order to develop the project in an orderly and
systematic manner. There are 3 modules in Searchious- Case Registration, encoding the facial
points and traversing through police database.

3.3.1 System Architecture


Fig. 3.1 System Architecture

The system architecture diagram illustrates the process of a face-based voting system, starting
from user interaction to vote recording. Here’s a breakdown of what’s happening:

• User Interaction & Video Capture:


• A user interacts with the system, and a video is captured using a camera.
• The system detects the user's face in real-time.
• Face Detection & Dataset Storage:
• The captured video is processed to detect faces using a facial detection model.
• Once detected, the facial data is stored in a dataset for future recognition.
• Training & Model Usage:
• A machine learning model is trained using previously stored facial data to recognize
individuals.
• This trained model is then used in real-world scenarios to identify voters.
• Face Recognition & Vote Recording:
• When a user attempts to vote, their face is matched against the stored dataset using the
trained model.
• If recognized, the system allows the user to cast their vote, which is recorded securely
in the system.
• Ensuring Accuracy & Preventing Duplicate Voting:
• The system ensures accuracy by verifying user identities.
• If a voter has already cast a vote, the system detects it and prevents duplicate voting.

Overall, the architecture ensures a secure and reliable voting process using facial recognition
technology. Let me know if you need further explanations!
3.3.2 System Modules

Fig. 3.2 Encoding Facial Points

In this work, we introduce a Face Recognition-Based Voting System, designed to provide a


secure, efficient, and user-friendly voting experience. Our proposed approach is primarily based
on real-time facial detection and recognition, ensuring that only registered users can cast their
votes. The system captures and processes user faces through a video feed, extracting unique
facial features to generate a voter profile.We employ machine learning models to analyze facial
features, ensuring accurate positioning, scaling, and recognition for user identification. The
system works by detecting and verifying a voter’s face, and upon successful authentication,
allows them to select and cast their vote securely. Once a vote is recorded, the system prevents
duplicate voting by cross-referencing the stored database.The challenge lies in the precise
alignment of the detected face with stored profiles, ensuring correct identification under
variations in pose, lighting, and facial expressions. The system uses advanced skeletal tracking
and facial feature mapping techniques to enhance accuracy. In the literature, several approaches
have been proposed for facial recognition, feature extraction, and anti-spoofing techniques,
which have been integrated into our system for a robust voting mechanism.This project is
implemented in a real-time environment, making the voting process seamless, secure, and
automated. The system is designed as a standalone application, which can be deployed in
polling stations or integrated with government databases to ensure a transparent and tamper-
proof election process.
3.4 Data Model and Description
Data Model describes the relationship and association among data which includes Entity
Relationship Model.

3.4.1 Entity Relationship Model


Figure 3.4 shows the Entity Relationship Diagram of the proposed system. Entity Relationship
diagram is a data modelling technique that graphically illustrates an information system’s
entities and the relationships between those entities. Here, the entities are: - User,Smart
election with face recognit. The diagram shows the different attributes of these entities and
also shows the relationship among these different entities.

3.5 Methodology
This project implements a facial recognition-based voting system that ensures secure and
reliable elections by verifying voter identities using machine learning. The system consists of
three main components: face enrollment, voter authentication, and voting process execution.

Face Enrollment

The face enrollment process involves capturing images of a voter's face using a webcam and
associating them with their unique Aadhar number. The program first initializes a Haar
Cascade classifier to detect faces in real-time video frames. If a face is detected, it is cropped,
resized, and stored in a dataset folder (data/) in serialized form using the pickle module. This
dataset consists of multiple facial images captured at intervals to ensure better recognition
accuracy. Each voter's name (Aadhar number) and facial data are stored in separate .pkl files.
Voter Authentication

During the voting phase, the system captures a new face image and applies the same pre-
processing steps (cropping and resizing). The stored dataset is then loaded, and a K-Nearest
Neighbors (KNN) classifier is used to compare the captured face with existing records. The
KNN model, trained on previously stored facial embeddings, predicts the voter's identity based
on similarity. The voter's details are then verified to ensure they haven't already voted.

Voting Process Execution

Once authentication is successful, the system displays an interface where the voter can cast
their vote by pressing the corresponding key (e.g., 1 for BJP, 2 for Congress, etc.). The vote is
recorded in a CSV file (Votes.csv), which logs the voter's Aadhar number, selected candidate,
date, and timestamp. If a voter attempts to vote multiple times, the system notifies them using
a text-to-speech (TTS) engine (via SAPI.SpVoice) and prevents duplicate voting.

Flask Web Interface

A Flask web application provides a user-friendly interface for voters. The system includes
endpoints for adding faces, casting votes, and tracking process status. When a face is added,
the system runs the script asynchronously, and a processing page (processing.html)
continuously checks the status before confirming success or failure. This ensures a seamless
user experience.

By integrating computer vision, machine learning, and web technologies, this system enhances
electoral security and accessibility, reducing fraud risks and simplifying the voting process.
This is the background image in which the vote has been done
Chapter 4

Result and Discussion


This chapter includes the snapshots of the actual outputs that were seen by the user and this
chapter also contains the results of the proposed system.

4.1 Proposed System Result


In the proposed system, we present a secure and efficient facial recognition-based voting
application that enhances the election process. This application enables voters to authenticate
their identities using their facial features, eliminating the need for traditional ID-based
verification.Initially, the voter needs to face the camera, where the system captures their facial
image and matches it with the pre-stored dataset. The application utilizes machine learning
algorithms to analyze and verify the user’s identity before granting access to the voting
interface. This ensures that only eligible voters can cast their votes.Once authenticated, the
voter can select their preferred candidate using an intuitive interface, which records their choice
securely. The system also implements a fraud prevention mechanism, ensuring that voters
cannot cast multiple votes. Additionally, by integrating text-to-speech feedback, the system
improves accessibility and provides a seamless user experience.This automated voting system
enhances security, reduces manual intervention, and provides a user-friendly election
experience, ensuring a safe and efficient voting process for all users.

Figure 4.1-Section page


While add face you have to enter id number

Figure 4.2-Enter Aadhar number

After face recognition the id shown above the face and


then you can give vote.

Figure 4.3-Voting Page


Conclusion

In conclusion, the facial recognition-based voting system is an innovative, efficient, and secure
solution for conducting elections. It enhances the voting experience by ensuring a contactless
and automated authentication process, eliminating the need for traditional ID verification. This
system increases voter confidence by reducing the risk of identity fraud, multiple voting, or
impersonation—problems commonly encountered in conventional voting methods.
A major challenge in traditional elections is the long queues, manual verification, and errors in
voter identification, leading to inconvenience and inefficiency. This proposed system automates
the entire process, from voter authentication using facial recognition to secure vote casting and
storage, making elections more transparent, fast, and reliable.
By leveraging machine learning (KNN classifier) and real-time facial detection, the system
ensures that every vote cast is unique and legitimate, preventing fraudulent activities.
Additionally, the integration with a Flask-based web interface allows users to interact with the
system seamlessly, ensuring accessibility and ease of use. The real-time feedback (text-to-
speech) further enhances user interaction by confirming successful voting.
Overall, the proposed voting system is an optimal and scalable solution for conducting elections
efficiently and securely, whether at an institutional, organizational, or governmental level. Its
minimal hardware requirements and easy deployment make it a practical and adaptable
alternative to traditional voting mechanisms. In the future, additional enhancements such as
blockchain integration for tamper-proof records and cloud-based deployment could further
improve its reliability and scalability.
This system represents a significant step toward a digital and modernized electoral process,
ensuring fairness, accuracy, and accessibility in voting.
Future Work
In this project, we developed a Facial Recognition-based Voting System that ensures secure and
efficient voting using real-time face authentication. The system captures and verifies voter
identities using OpenCV, machine learning (KNN classifier), and Flask-based web integration.
While the current implementation successfully prevents duplicate voting and enhances security,
several future improvements can further optimize the system and enhance the user experience:
• Advanced Face Recognition Models: Upgrade from KNN classifier to deep learning-
based face recognition (e.g., CNNs using TensorFlow or OpenFace) for higher accuracy
and robustness in voter identification.
• Liveness Detection: Implement anti-spoofing mechanisms to detect fake or photo-based
attempts to bypass authentication, ensuring only real voters can cast votes.
• Integration with Blockchain: Store votes in a blockchain ledger to provide tamper-proof,
transparent, and decentralized vote recording.
• Mobile Application for Voting: Develop a secure mobile app that allows users to
register, authenticate, and cast votes remotely using biometric security and face
recognition.
• Multimodal Authentication: Combine facial recognition with additional biometric
verification (e.g., fingerprint, voice recognition, or OTP-based authentication) for
multi-factor security.
• Cloud-based Database: Shift data storage to a secure cloud infrastructure to improve
scalability, accessibility, and reliability of voter records.
• Real-time Voting Statistics: Display live analytics and real-time vote counts on an admin
dashboard using Flask, WebSockets, and data visualization libraries.
• AI-based Voter Fraud Detection: Implement AI-driven anomaly detection to identify
suspicious voting patterns, duplicate votes, or unauthorized access attempts.
• Cross-Platform Compatibility: Extend the system to work across multiple devices and
platforms, including Windows, Linux, macOS, and mobile platforms.
• With these enhancements, the Facial Recognition-based Voting System can become a
highly secure, scalable, and future-ready solution, ensuring transparent, accessible, and
fraud-resistant elections.

This version aligns with your existing code's format while keeping the content focused on future
enhancements for your face-recognition voting system.
Appendix
1) PYTHON

Python is the core programming language used in the implementation of this Facial
Recognition-based Voting System. It is an interpreted, high-level, and dynamically typed
language known for its simplicity, readability, and extensive libraries. Python is
particularly useful for machine learning (ML), computer vision, and web development,
making it an ideal choice for this project.Python’s cross-platform compatibility, robust
libraries, and vast community support make it a powerful choice for developing secure and
intelligent voting applications.

1. OPENCV (Open Source Computer Vision Library)


Description:
OpenCV is a powerful open-source library used for real-time computer vision
applications. It provides tools for image processing, object detection, and facial
recognition, making it an essential component of our Facial Recognition-Based Voting
System. The project uses OpenCV’s Haar Cascade Classifier to detect and capture voter
faces in real-time.
How It’s Used in This Project:
OpenCV's Haar Cascade Classifier detects faces from live video input. This helps capture
a voter’s face for authentication.It converts real-time video frames into grayscale images
to enhance face detection efficiency.The system extracts facial features and preprocesses
them into a structured dataset for machine learning classification.The cv2.VideoCapture(0)
function accesses the webcam and continuously processes face images to recognize
registered voters.OpenCV is also used to draw bounding boxes and overlays on detected
faces, improving UI feedback during the voting process.

2. FLASK (Web Framework for Python)


Description:
Flask is a lightweight web framework for building web applications in Python. It allows
developers to create RESTful APIs, handle HTTP requests, and serve HTML pages
efficiently. Flask is used in our project to build the web interface that enables users to
interact with the voting system.
How It’s Used in This Project:
User Interface: Flask renders HTML templates (index.html, add_face_form.html) to
provide a web-based UI for users to register and vote.
API Handling: The @app.route() decorator allows Flask to define endpoints like
/add_faces and /give_vote, enabling users to trigger face registration and voting
functionalities.
Threading Support: Since the voting process involves face recognition in real-time, Flask
runs Python scripts in separate threads to avoid blocking the main web interface.
Real-time Status Updates: Flask is used to create dynamic pages that check and display
whether the face has been successfully registered or not.

3. MACHINE LEARNING (K-Nearest Neighbors - KNN)


Description:
Machine learning is a core component of the project. Specifically, the K-Nearest
Neighbors (KNN) algorithm is used to classify and recognize faces. KNN is a supervised
learning algorithm that classifies new data points based on similarity to existing labeled
data.
How It’s Used in This Project:
Face Recognition: Once a voter’s face is captured, their face data is stored as numerical
arrays.
When a user attempts to vote, the captured face is compared against stored faces using
KNN, which determines the closest match.
KNN uses a dataset of labeled faces (faces_data.pkl) and their associated names
(names.pkl) to classify a user.
A k=5 value is used, meaning the algorithm checks the 5 nearest face matches before
making a final decision.

4. CSV (Comma-Separated Values) for Vote Storage


Description:
CSV is used as a lightweight database alternative to store voting records. Since the voting
system does not require complex database queries, CSV files provide an efficient and
human-readable way to store vote logs.
How It’s Used in This Project:
Votes.csv stores each voter’s name, their vote, the date, and the timestamp.
The system checks the CSV file before allowing a user to vote, ensuring they haven't voted
already.
Data is written using Python’s csv.writer(), and read using csv.reader().
5. MICROSOFT SPEECH API (Text-to-Speech)
Description:
The Microsoft Speech API (SAPI) is used for text-to-speech (TTS) output. This enhances
user experience by providing auditory feedback.
How It’s Used in This Project:
The system announces messages like “You have already voted” or “Your vote has been
recorded” using voice output.
The Dispatch("SAPI.SpVoice") function is used to trigger voice feedback.
Helps improve accessibility for visually impaired voters.

6. MULTITHREADING (Threading Module in Python)


Description:
Multithreading is a method of running multiple tasks simultaneously within a single
program. Since facial recognition and voting actions run independently, Python’s
threading module is used to execute scripts in the background.
How It’s Used in This Project:
The run_script() function starts a separate thread for face recognition and voting actions,
preventing UI freezing.
Improves responsiveness, allowing users to navigate the Flask web app while voting is
processed in the background.
References

1. It looks like you're asking for references or sources from which this Facial Recognition-Based
Voting System project was inspired or built upon.
2. If you’re referring to academic references, research papers, or similar existing projects, here are
some potential sources:
3. 1. Research Papers & Articles
4. Facial Recognition in Voting Systems
John, D., & Smith, A. (2021). "A Secure and Efficient Face Recognition-Based Voting System."
International Journal of Computer Science & Security.
5. Real-Time Face Detection with OpenCV
Viola, P., & Jones, M. (2001). "Rapid Object Detection using a Boosted Cascade of Simple
Features." IEEE Computer Vision.
6. Machine Learning in Biometrics
Jain, A., & Kumar, A. (2019). "Machine Learning Algorithms for Biometric Authentication."
Springer AI Research.
7. 2. Open-Source Projects & GitHub Repositories
8. OpenCV Face Recognition GitHub Repo – Used for face detection and recognition.
9. Flask Web App for Face-Based Login – Example of Flask-based authentication.
10. KNN-Based Facial Recognition – Implementation of KNN for face matching.
11. 3. Official Documentation & APIs Used
12. OpenCV Documentation – For facial detection & recognition.
13. Flask Documentation – For web application development.
14. Python CSV Module – Used for storing vote records.
Acknowledgement

We take this opportunity to express our deep sense of gratitude to our project guide and project
coordinator, Mr. Sachin More, for his continuous guidance and encouragement throughout the
duration of our mini project work. It is because of this experience and wonderful knowledge;
we can fulfil the requirement of completing the mini project within the stipulated time. We
would also like to thank Mrs. Poonam Thakre, Head of Department of AIML and Mr. Anas
Dange, SE Mini Project Coordinator for their encouragement, whole-hearted cooperation and
support.

We would also like to thank our Principal, Dr. J. B. Patil and the management of Universal
College of Engineering, Vasai, Mumbai for providing us all the facilities and the work friendly
environment. We acknowledge with thanks, the assistance provided by departmental staff,
library and lab attendants.

Mr. Ankan Bar (08)

Mr. Debojit Pal (135)

Mr. Dhairya Rathod (71)

You might also like