Real-Time Face Detection For Public Safety: Kanimozhi.D Pavithra.P Rajalakshmi.R
Real-Time Face Detection For Public Safety: Kanimozhi.D Pavithra.P Rajalakshmi.R
A PROJECT REPORT
Submitted by
Kanimozhi.D - 110821106310
Pavithra.P - 110821106313
Rajalakshmi.R - 110821106315
BACHELOR OF ENGINEERING
in
APRIL 2026
ANNA UNIVERSITY: CHENNAI 600 025
BONAFIDE CERTIFICATE
Certified that this project report “REAL-TIME FACE DETECTION FOR PUBLIC SAFETY
Is the bonafide work of “Kanimozhi.D (110821106310), Pavithra.P (110821106313),
Rajalakshmi.R (110821106315 )”.Who carried out the project work under my supervision.
SIGNATURE SIGNATURE
Dr. A. SARAVANAN, Dr. R. MUTHALAGU,
M.E., HEAD OF THE DEPARTMENT, PROFESSOR,
Department of ECE, Department of ECE,
Jaya Engineering College, Jaya Engineering College,
Thiruninravur- 602 024. Thiruninravur- 602 024.
At the outset we express our deep sense of gratitude to our esteemed Chairman Prof.
A. KANAGARAJ, M.A., [Link]., of Jaya Educational Trust, Vice-Chairman Mr. K.
NAVARAJ, M., Tech. Ph.D., of Jaya Educational Trust, and Secretary Mrs. K.
VIJAYAKUMARI, M.A., [Link]., for their guidance and blessings.
We would like t o express our sincere thanks to our Principal Dr. V. SURESH
KUMAR, M.E., Ph.D., and our Vice-Principal Dr. S. RAJENDRAN, M.E., Ph.D., of Jaya
Engineering College for their incredible support towards the completion of our project.
Our deep sense of gratitude and heart full of thanks to our Head of Department and Project
Supervisor Dr. A. SARAVANAN, [Link]., Ph.D., of Jaya Engineering College for his extreme
guidance and valuable advice during the project. We would also want to thank our project
coordinator Mr. D. ANBARASU [Link]., [Link]., Ph.D., who gave us guidance and
ideas during the project.
We take this opportunity to extend our deep sense of gratitude to thank our Family
Members, Friends and Well-Wishers, for all that they meant to us during the crucial period of the
completion of our project.
ABSTRACT
The system captures live video using a web camera and processes each frame to detect
human faces using the Haar Cascade algorithm. The use of grayscale image processing helps
reduce computational complexity while maintaining detection accuracy. Once a face is
detected, a signal is transmitted to the ESP32 through serial or wireless communication.
The ESP32 activates a buzzer to provide an immediate alert and displays system status
messages on a 16x2 Liquid Crystal Display. This integration of software-based detection and
hardware-based alerting ensures quick response and reliable operation. The ESP32 also
provides IoT capabilities through built-in Wi-Fi and Bluetooth support.
The system operates with minimal delay and performs effectively under normal lighting
conditions. It offers a low-cost, efficient, and scalable solution for applications such as
intrusion detection, access control, smart attendance systems, and public surveillance. The
design can be further enhanced by integrating features like face recognition, cloud
monitoring, and mobile notifications.
i
TITLE [Link]
CHAPTER NO
3.9 ARCHITECTURE SUMMARY FLOW
14
CHART
TABLE OF CONTENTS
4 HARDWARE REQUIREMENTS 15
4.1 HARDWARE COMPONENTS USED 15
CHAPTER NO TITLE [Link]
` 4.2 WEBCAM 16
LIST OF CONTENTS
4.4 LCD ii
17
LIST OF FEATURES ix
4.5 BUZZER 17
LIST OF ABBREVIATIONS x
4.6 POWER SUPPLY 18
1 INTRODUCTION 1
4.7 JUMPER WIRE INTERCONNECTION
1.1 GENERAL INTRODUCTION 119
1.2 PROBLEM STATEMENT 2
5 SOFTWARE REQUIREMENT 20
1.3 SCOPE OF THE PROJECT 3
5.1 SOFTWARE REQUIREMENTS
2 LITREATURE SURVEY 420
5.2LITERATURE
2.1 PYTHON PROGRAMMING
2022 4
LANGUAGE2024
2.2 LITERATURE 22
5
5.21 PYTHON SOURCE CODE
3 7
SYSTEM
5.3 OPEN ARCHITECTURE
CV LIBRARY 27
3.1 SYSTEM ARCHITECTURE 7
3.2 SYSTEM DESCRIPTION
5.3.1 OPENCV PROCESSING FLOW 728
[Link].1 ADVANTAGES
ALGORITHM 8
29
3.1.2 DISADVANTAGES 9
5.4 PYSERIAL LIBRARY 31
3.3 PROCESSING FLOW 9
[Link]
SERIAL COMMUNICATION
ARCHITECTURE SUMMARY 1132
3.5 HARDWARE COMPONENTS USED
11
5.5 DEVELOPMENTED ENVIRONMENT 34
3.6 SOFTWARE
11
3.7 SCHEMATIC
5.6 SYSTEM REQUIREMENT
DIAGRAM 1234
6 3.8 CIRCUIT
RESULTS DIAGRAM
AND ANALYSIS 1335
3.6 SOFTWARE 11
4.2 WEBCAM 15
4.5 BUZZER 17
iii
4.6 POWER SUPPLY 18
JUMPER WIRE INTERCONNECTION
4.7 19
SOFTWARE REQUIREMENTS
5.1 20
5.2 PYTHON PROGRAMMING 20
LANGUAGE
iv
CHAPTER 1
INTRODUCTION
In recent years, the demand for advanced security systems has increased significantly
due to rising concerns about safety and unauthorized access. Conventional security
methods such as manual monitoring and basic alarm systems are often inefficient, time-
consuming, and lack real-time response capabilities. To overcome these limitations,
intelligent systems based on computer vision and embedded technologies are being
widely adopted.
This project focuses on the design and implementation of a real-time face detection
and alert system using Python and OpenCV, along with an ESP32 microcontroller. The
system captures live video through a web camera and processes it using a Haar Cascade
classifier to detect human faces. When a face is detected, a signal is sent to the ESP32,
which activates a buzzer to generate an alert and displays the system status on an LCD.
In today’s world, ensuring safety and security in homes, offices, and restricted areas
has become increasingly important. Traditional security systems such as CCTV
surveillance and manual monitoring require continuous human attention and often fail to
provide immediate response during critical situations. These systems are generally
passive, as they only record events rather than actively detecting and alerting users in real
time.
Moreover, many existing advanced security solutions are expensive and require
complex infrastructure, making them unsuitable for small-scale or low-budget
applications. There is a need for an efficient, low-cost, and automated system that can
detect potential intrusions and provide instant alerts without human intervention.
2
1.3 SCOPE OF THE PROJECT
The scope of this project focuses on the design and development of a real-time face
detection and alert system using computer vision and embedded system technologies.
The system is intended to provide an efficient, low-cost, and automated solution for basic
security and monitoring applications.
The project includes the implementation of real-time video capture using a web
camera and processing of video frames using Python with OpenCV. The Haar Cascade
algorithm is used to detect human faces in the captured frames. Upon successful
detection, the system sends a signal to the ESP32 microcontroller, which activates a
buzzer and displays the system status on an Liquid Crystal Display.
The scope of this project is limited to face detection only, and it does not include
face recognition or identification of individuals. The system is designed to work
effectively under normal lighting conditions and within a limited range of the camera. It
is suitable for small-scale applications such as home security, office monitoring, and
restricted area surveillance.
3
CHAPTER 2
LITERATURE SURVEY
INTRODUCTION
Face detection and recognition technologies have been widely researched due to their
growing importance in security, surveillance, and human–computer interaction systems.
Various approaches have been developed ranging from traditional image processing
techniques to advanced deep learning models. This section reviews some of the key
research works and technologies related to real-time face detection systems.
4
systems provide high-level security, they also raise concerns regarding privacy,
ethical issues, and data security.
The OpenCV documentation provides a comprehensive framework for
implementing computer vision applications. It includes efficient algorithms such as
the Haar Cascade classifier, which enables real-time face detection with relatively
low computational requirements, making it suitable for this project.
The ESP32 technical documentation describes a powerful and cost-effective
microcontroller with built-in Wi-Fi and Bluetooth capabilities. It is widely used in
IoT applications due to its low power consumption, processing ability, and ease of
integration with sensors and external devices.
Recent studies indicate that deep learning-based face detection and recognition
systems significantly outperform traditional methods in terms of accuracy and
robustness. A 2023 IEEE study demonstrated that CNN-based pipelines achieve
reliable performance under varying lighting and pose conditions, but their high
computational requirements limit direct deployment on low-cost embedded
platforms.
In 2024, the IEEE ICME Grand Challenge emphasized low-power facial-landmark
detection, highlighting the use of knowledge distillation and model compression to
enable real-time inference on embedded hardware, reflecting a strong shift toward
edge-AI deployment.
Research during 2023–2024 increasingly focuses on lightweight CNN
architectures optimized for embedded vision. Comparative studies show that
combining fast and accurate models can balance inference speed and recognition
accuracy on constrained devices such as Jetson Nano. Models like Edge Face and
5
optimized Mobile FaceNet variants demonstrate that quantization and architectural
simplification reduce memory and power consumption while maintaining
competitive accuracy.
Edge-based vision systems using ESP32-class devices gained prominence with the
introduction of ESP32-S3 AI modules. Studies report that lightweight face
detection and tracking can be achieved on ESP32-CAM using Tiny ML and
TensorFlow Lite, enabling real-time, privacy-preserving, on-device inference.
Express if documentation further highlights hardware-level AI acceleration in
ESP32-S3 for low-power surveillance and access-control applications.
Despite advances in deep learning, OpenCV-based classical algorithms such as
Haar Cascade remain relevant due to their low computational cost and suitability
for microcontrollers. Hybrid approaches combining classical detection with
lightweight CNN recognition improve efficiency and accuracy.
Recent 2024 literature also emphasizes ethical, privacy, and regulatory concerns,
reinforcing the preference for on-device processing over cloud-based systems.
Research Gap: Deep CNNs offer high accuracy but are computationally
expensive, while lightweight edge-AI models remain constrained on ultra-low-cost
hardware, motivating optimized ESP32-based face-detection solutions.
6
CHAPTER 3
SYSTEM ARCHITECTURE
The proposed system follows a hybrid architecture, combining both software and
embedded hardware components. The software module is responsible for real-time image
acquisition, processing, and face detection, while the hardware module handles alert
generation and system indication. This combination ensures efficient processing, reduced
computational load on hardware, and improved system responsiveness.
The system is designed to perform real-time face detection using a webcam and
generate an immediate alert using an ESP32 microcontroller. It integrates computer
vision techniques with embedded system control to achieve efficient, reliable, and low-
latency performance.
The software module, developed using Python and OpenCV, captures and processes
live video frames. It applies image processing techniques and a Haar Cascade classifier to
detect human faces. The hardware module, built around the ESP32 microcontroller,
receives detection signals and activates output devices such as a buzzer and Liquid
Crystal Display.
The ESP32 serves as an interface between the software and physical alert system,
ensuring quick execution of alert actions. Its built-in Wi-Fi and Bluetooth capabilities
also allow the system to be extended into IoT-based applications in the future.
7
3.2.1 ADVANTAGES
The proposed system offers several advantages due to its design and implementation:
1. Real-Time Detection:
The system processes video frames instantly, enabling quick detection and
response.
2. Low Cost:
Uses affordable components such as ESP32 and a standard webcam, making it
economical.
3. Easy Implementation:
Simple architecture and widely available software tools make the system easy to
develop and deploy.
4. Modular Design:
Software and hardware modules can be modified or upgraded independently.
5. Fast Response Time:
Immediate alert generation through buzzer and Liquid Crystal Display ensures
quick notification.
6. Scalability:
Can be extended with advanced features like face recognition, cloud integration,
and mobile alerts.
7. Low Power Consumption:
ESP32 consumes less power, making the system efficient for continuous operation.
8. IoT Compatibility:
Built-in Wi-Fi and Bluetooth support future integration with smart systems.
8
3.2.2 DISADVANTAGES
1. Lighting Dependency:
Detection accuracy decreases in low-light or poor lighting conditions.
2. Limited Accuracy:
Haar Cascade algorithm may fail in detecting faces with occlusions or unusual
angles.
3. No Face Recognition:
The system can detect faces but cannot identify specific individuals.
4. Camera Dependency:
Performance depends on the quality and resolution of the webcam.
5. False Positives:
Sometimes non-face objects may be incorrectly detected as faces.
Processing Flow
1. Video Acquisition
A webcam continuously captures live video and converts it into individual frames for
processing. This ensures uninterrupted monitoring of the environment.
2. Image Processing
9
Each frame is processed using Python and OpenCV. The image is converted into
grayscale format to reduce computational complexity and increase processing speed
while maintaining acceptable detection accuracy.
3. Face Detection
The Haar Cascade classifier is applied to detect human faces within the frame. The
algorithm scans the image at multiple scales and identifies facial features such as eyes,
nose, and mouth patterns.
4. Decision Logic
5. Signal Transmission
When a face is detected, a signal is sent from the Python program to the ESP32
microcontroller via serial communication (USB) or wireless communication (Wi-Fi).
6. Hardware Response
The ESP32 processes the received signal and performs the following actions:
10
7. Continuous Operation
The entire process runs continuously in a loop, ensuring real-time monitoring, quick
response, and uninterrupted operation.
Limited Range:
Detection works effectively only within a certain distance from the camera.
Basic Alert System:
Only buzzer and Liquid Crystal Display are used; no remote or mobile
notifications in the current version.
Webcam
ESP32 Microcontroller
Liquid Crystal Display (LCD 16x2)
Buzzer
Power Supply
Jumper Wire Interconnection
3.6 SOFTWARE
OpenCV
11
3.7 SCHEMATIC DIAGRAM
12
3.8 CIRCUIT DIAGRAM
13
3.9 ARCHITECTURE SUMMARY FLOW CHART
14
CHAPTER 4
HARDWARE REQUIREMENT
The proposed system utilizes several hardware components to achieve real-time face
detection and alert functionality. Each component plays a crucial role in the overall
operation of the system by contributing to data acquisition, processing, communication,
and alert generation.
The webcam acts as the primary input device, capturing real-time video data from the
environment. This data is processed by the software system, and the results are
communicated to the ESP32 microcontroller. The ESP32 serves as the central control
unit, which interprets the signals and activates the output devices accordingly.
Output components such as the Liquid Crystal Display and buzzer provide both visual
and audible feedback, ensuring that the user is immediately notified when a face is
detected. The power supply ensures stable operation of all components, while jumper
wires facilitate proper electrical connections within the system.
Overall, the combination of these hardware components creates a reliable and responsive
system capable of performing real-time monitoring and alert generation. The modular
15
nature of the hardware design also allows for easy expansion and integration of additional
features in future developments.
4.2 WEBCAM
The webcam is used to capture live video input from the surrounding environment. It
continuously streams video frames to the Python program for processing. The quality and
resolution of the webcam directly affect the accuracy of face detection. A standard USB
webcam is sufficient for this system, as it provides real-time video with adequate frame
rate for processing.
The ESP32 is the core hardware component responsible for controlling the alert system.
It receives signals from the Python program when a face is detected and executes the
corresponding actions. The ESP32 is chosen due to its high processing capability, low
power consumption, and built-in Wi-Fi and Bluetooth features. These features make it
suitable for IoT-based applications and future system expansion.
16
4.4 LCD (Liquid Crystal Display (16x2))
The 16x2 Liquid Crystal Display is used to provide visual feedback to the user. It
displays system status messages such as “Face Detected,” “No Face Detected,” or “Alert
ON.” The Liquid Crystal Display enhances user interaction by clearly indicating the
system’s current state. It is typically interfaced with the ESP32 using I2C
communication, which reduces wiring complexity.
4.5 BUZZER
The buzzer acts as an alert device that generates an audible signal when a face is
detected. It helps in providing immediate notification to the user or security personnel.
The buzzer is directly controlled by the ESP32 and is activated as soon as a detection
signal is received.
17
Figure 4.5
BUZZE R
4.6 POWER
SUPPLY
The system requires a stable power supply to operate efficiently. The ESP32 typically
operates at 3.3V, while other components like the Liquid Crystal Display may require
5V. A regulated power supply or USB power source is used to ensure consistent voltage
and prevent damage to components. Proper power management is essential for reliable
system performance.
18
4.7 JUMPER WIREINTERCONNECTION
Jumper wires are used to establish electrical connections between the ESP32
microcontroller and other hardware components such as the Liquid Crystal Display and
buzzer. Proper interconnection is essential for ensuring smooth communication and
reliable operation of the system.
The connections are made based on the pin configuration of the ESP32 and the
interfaced devices. The wiring is done carefully to avoid loose connections, short circuits,
or incorrect pin mapping.
19
CHAPTER 5
SOFTWARE REQUIREMENT
The successful implementation of the proposed real-time face detection and alert system
depends on a combination of software tools, programming environments, and
communication libraries. These software components are responsible for video
acquisition, image processing, face detection, and communication with the hardware
module (ESP32). The selection of these tools ensures efficient performance, real-time
processing, and ease of development.
Python is the primary programming language used in the development of the proposed
real-time face detection and alert system. It is a high-level, interpreted language known
for its simplicity, readability, and extensive library support. Python is widely used in
fields such as artificial intelligence, machine learning, and computer vision, making it an
ideal choice for this project.
One of the main advantages of Python is its ability to perform complex tasks with
simple and concise code. This reduces development time and makes the system easier to
understand and maintain. In this project, Python acts as the core software platform that
manages all major operations, including video processing, face detection, and
communication with the ESP32 microcontroller.
Python is used to capture live video from the webcam using the OpenCV library. The
video stream is divided into individual frames, and each frame is processed in real time.
20
Before applying the face detection algorithm, the frames are converted into grayscale
format. This reduces computational complexity and improves processing speed while
maintaining acceptable accuracy.
The face detection process is implemented using the Haar Cascade classifier available in
OpenCV. Python applies this algorithm to identify human faces by detecting specific
features such as eyes, nose, and mouth. When a face is detected, a bounding box is drawn
around the detected region for visualization.
Python also handles the decision-making logic of the system. It continuously checks
each frame to determine whether a face is present. If no face is detected, the system
continues monitoring. When a face is detected, Python sends a signal to the ESP32
microcontroller using the Py Serial library. This signal triggers the hardware components
such as the buzzer and Liquid Crystal Display
Another important feature of Python is its ability to communicate easily with external
hardware. Through serial communication, Python ensures real-time data transfer between
the software and the ESP32, enabling quick response and alert generation.
Python supports modular programming, allowing the system to be divided into smaller
sections such as video capture, processing, detection, and communication. This improves
code organization and makes future modifications easier.
21
In conclusion, Python plays a crucial role in this project by managing real-time
processing, implementing face detection, and enabling communication with hardware
components. Its simplicity, flexibility, and powerful features make it a suitable and
efficient choice for developing a reliable real-time face detection and alert system.
# Hard-coded file paths — works both as script and PyInstaller --onefile exe
if getattr(sys, "frozen", False):
BASE_DIR = sys._MEIPASS
else:
22
BASE_DIR = [Link]([Link](__file__))
running = False
ser = None
def recognition_loop(com_port):
global running, ser
try:
ser = [Link](port=com_port, baudrate=9600, bytesize=8,
timeout=2, stopbits=serial.STOPBITS_ONE)
except Exception as e:
print(f"[ERROR] Could not open {com_port}: {e}")
running = False
status_label.config(text=f"Serial error: {e}", fg="red")
23
start_btn.config(state=[Link])
stop_btn.config(state=[Link])
return
while running:
ret, frame = [Link]()
if not ret:
break
24
for name in names:
code = NAME_CODE.get(name, "X")
msg = "*" + code + "#"
[Link]([Link]())
print(msg)
[Link]()
[Link]()
if ser and ser.is_open:
[Link]()
start_btn.config(state=[Link])
stop_btn.config(state=[Link])
status_label.config(text="Stopped", fg="black")
def start_recognition():
global running
com_port = com_entry.get().strip()
if not com_port:
status_label.config(text="Enter a COM port", fg="red")
return
running = True
start_btn.config(state=[Link])
25
stop_btn.config(state=[Link])
status_label.config(text="Running...", fg="green")
t = [Link](target=recognition_loop, args=(com_port,), daemon=True)
[Link]()
def stop_recognition():
global running
running = False
# GUI
root = [Link]()
[Link]("Face Recognition")
[Link]("300x160")
[Link](False, False)
btn_frame = [Link](root)
btn_frame.pack(pady=12)
26
[Link]()
In the proposed system, OpenCV plays a crucial role in handling video capture, image
processing, and face detection. It acts as the backbone of the software module by
providing tools to analyze and manipulate visual data in real time.
One of the primary functions of OpenCV in this project is video acquisition. It allows
the system to access the webcam and capture live video streams. The video stream is
divided into individual frames, and each frame is processed sequentially. This frame-by-
frame processing is essential for real-time face detection.
27
The most important role of OpenCV in this project is implementing the face detection
algorithm. It uses the Haar Cascade classifier, which is a machine learning-based
approach for object detection. The classifier is pre-trained to detect human faces by
identifying patterns such as edges, lines, and textures that correspond to facial features.
OpenCV applies this classifier to each frame and detects the presence of faces.
When a face is detected, OpenCV helps in drawing a rectangular bounding box around
the detected region. This visual representation makes it easier to verify the detection
results during testing and demonstration. It also enhances the user interface by clearly
showing where the face has been identified.
OpenCV is highly optimized for performance, which makes it suitable for real-time
applications. It uses efficient algorithms that minimize processing time and ensure
smooth operation. Even on systems with moderate hardware specifications, OpenCV can
process video frames quickly and accurately.
In this project, OpenCV forms the core of the face detection module. It enables the
system to access the webcam, process image frames, and detect human faces in real time.
28
Converting images into grayscale format
Applying the Haar Cascade classifier for face detection
Drawing bounding boxes around detected faces
Performing continuous frame-by-frame analysis
Face recognition
Motion detection
Object tracking
AI-based deep learning detection
OpenCV significantly improves the speed, accuracy, and reliability of the proposed
system.
5.3.2 ALGORITHM
29
Algorithm for Real-Time Face Detection and Alert System
In the proposed system, Py Serial acts as a communication bridge between the software
module (Python with OpenCV) and the hardware module (ESP32). When a face is
31
detected by the Python program, a signal is transmitted to the ESP32 through serial
communication. This signal is then used by the ESP32 to trigger hardware actions such as
activating the buzzer and updating the Liquid Crystal Display.
Py Serial provides functions such as [Link] () to open the communication port and
write () to send data. In this system, Python sends simple commands such as “1” or “0” to
indicate whether a face is detected. These commands are received and processed by the
ESP32, which then performs the required actions.
Py Serial is a Python library used to establish communication between the computer and
the ESP32 microcontroller. It acts as a communication bridge between the software
module and the embedded hardware module.
When a face is detected by the Python program, Py Serial transmits a signal to the
ESP32 through serial communication. Based on the received signal, the ESP32 activates
the buzzer and displays status information on the Liquid Crystal Display.
The library is lightweight, efficient, and ideal for embedded system communication. It
ensures quick response time, which is essential in real-time security applications.
Py Serial also supports future wireless extensions using the ESP32’s built-in Wi-Fi and
Bluetooth modules.
33
5.5 DEVELOPMENTD ENVIRONMENT
The software was developed and tested using the following tools:
Tool Purpose
Python IDE / VS Code /
Coding and Debugging
PyCharm
Arduino IDE Programming ESP32
These tools provide a complete development environment for coding, testing, and
deployment.
The minimum software and system requirements for running the project are:
Requirement Specification
Operating System Windows / Linux / macOS
RAM Minimum 4 GB
34
CHAPTER 6
HARDWARE COMPLETION
The proposed real-time face detection and alert system was successfully implemented
and tested under various conditions to evaluate its performance, accuracy, and reliability.
The system integrates Python-based face detection using OpenCV with an ESP32
microcontroller for alert generation.
35
Figure 6.1 HARDWARE COMPLETION
The system was able to detect human faces in real time using a webcam and trigger the
alert mechanism effectively. Upon detecting a face, the Python program sent a signal to
the ESP32, which immediately activated the buzzer and displayed a message on the
Liquid Crystal Display. The system demonstrated stable performance with minimal delay
between detection and alert generation.
The face detection process was accurate under normal lighting conditions, and the system
successfully identified faces at different angles and distances within a reasonable range.
The Liquid Crystal Display displayed appropriate status messages such as “Face
Detected,” while the buzzer provided an audible alert, ensuring effective notification.
36
Figure 6.1.1 Results Obtained
1. Detection Accuracy
The Haar Cascade classifier provided satisfactory accuracy for detecting frontal human
faces. The system performed well when the face was clearly visible and properly
illuminated. However, detection accuracy decreased under poor lighting conditions or
when the face was partially covered.
2. Response Time
The system exhibited fast response time, with detection and alert generation occurring
almost instantly (within milliseconds). This makes the system suitable for real-time
applications where quick action is required.
3. Lighting Conditions
37
The system was capable of detecting multiple faces simultaneously and triggering alerts
accordingly. However, performance depended on lighting and camera resolution.
5. System Stability
The system demonstrates efficient real-time performance with a good balance between
accuracy and speed. The integration of software and hardware components ensures
immediate alert generation, making the system reliable for basic security applications.
38
However, the system has certain limitations, such as dependency on lighting conditions
and lack of advanced recognition capabilities. These limitations can be addressed in
future improvements by incorporating deep learning techniques and advanced image
processing methods.
39
CHAPTER 7
CONCLUSION
7.1 CONCLUSION
The proposed project successfully demonstrates the design and implementation of a real-
time face detection and alert system using Python, OpenCV, and the ESP32
microcontroller. The system is capable of capturing live video, processing frames in real
time, and detecting human faces using the Haar Cascade algorithm with satisfactory
accuracy. Upon detection, the system effectively communicates with the ESP32 to trigger
hardware components such as a buzzer and Liquid Crystal Display, providing immediate
audible and visual alerts.
Although the system performs well under normal lighting conditions, it has certain
limitations such as reduced accuracy in low-light environments and lack of face
recognition capability. Despite these limitations, the project meets its objectives and
demonstrates the feasibility of implementing a real-time, hardware-integrated face
detection system Overall, the system provides a strong foundation for developing
advanced smart security solutions and highlights the effective use of computer vision and
embedded systems in real-world applications.
40
CHAPTER 8
FUTURE ENHANCEMENT
The proposed system can be further enhanced and extended with advanced features to
improve its functionality, accuracy, and usability. Some possible future improvements
include:
1. Face Recognition:
Upgrade the system to identify specific individuals instead of only detecting faces.
2. Mobile Application Integration:
Send real-time notifications or alerts to users through a mobile application.
3. Cloud-Based Monitoring:
Store and access data remotely using cloud platforms for better monitoring and
analysis.
4. Smart Door Lock Integration:
Automate door access by unlocking only for authorized individuals.
5. Multi-Camera Support:
Expand the system to monitor multiple locations simultaneously using multiple
cameras.
6. AI-Based Deep Learning Models:
Replace the Haar Cascade algorithm with advanced deep learning models for
higher accuracy and better performance under varying conditions.
41
CHAPTER 9
REFERENCES
9.1 REFERENCES
1. Viola, P., & Jones, M., “Rapid Object Detection using a Boosted Cascade of
[Link]
7. Espressif Systems, ESP32 Technical Reference Manual, Available:
[Link]
8. Python Software Foundation, Python Documentation, Available:
[Link]
9. Bradski, G., “The OpenCV Library,” Dr. Dobb’s Journal of Software Tools, 2000.
10. Szeliski, R., Computer Vision: Algorithms and Applications, Springer, 2010.
2008.
13. Bishop, C. M., Pattern Recognition and Machine Learning, Springer, 2006.
42
14. Goodfellow, I., Bengio, Y., & Courville, A., Deep Learning, MIT Press, 2016.
CVPR, 2018.
20. Liu, W., et al., SSD: Single Shot MultiBox Detector, ECCV, 2016.
21. Schroff, F., Kalenichenko, D., & Philbin, J., FaceNet: A Unified Embedding for
43
28. Qandeel, M., Facial Recognition Technology: Regulations, Rights and the Rule of
Technical Documentation.
30. Edge AI and Vision Alliance, Edge AI for Vision Applications, 2023.
[Link]
32. IEEE Access, Real-Time Lightweight CNN Models for Embedded Vision, 2023.
33. Jain, A. K., Bolle, R., & Pankanti, S., Biometrics: Personal Identification in
Neuroscience, 1991.
35. NIST, Face Recognition Vendor Test (FRVT), National Institute of Standards and
Technology Reports.
44