Vision Safe Using ESP32-CAM
Ashvini Hirve
1
Student, E&TC Department, JDIET Yavatmal, Maharashtra, India
Abstract— This paper explores the integration and capabilities of environments with space constraints. Furthermore, its low
the ESP32-CAM, a versatile development board combining the power consumption proves crucial for battery-operated or low-
ESP32 microcontroller with the OV2640 camera module. power applications, such as in IoT deployments. In comparison
Emphasizing its cost-effective solution for Wi-Fi-enabled cameras, to alternative solutions like using Raspberry Pi with Python and
the ESP32-CAM boasts a potent 32-bit microcontroller and
OpenCV, the ESP32-Cam offers distinct advantages.
microSD card support, making it ideal for diverse IoT projects. Its
applications in security surveillance, particularly in DIY security Integrating a camera eliminates the need for additional
projects and home automation, further underscore its versatility peripherals, unlike the Raspberry Pi, which typically requires a
in remote monitoring and surveillance. separate camera module. Moreover, the ESP32-Cam's IoT
The ESP32-CAM project presents a pioneering solution that capabilities and connectivity further enhance its appeal in
extends beyond conventional eye glass detection, aiming to various applications, including those beyond eye glass
prevent accidents in both industrial and vehicular environments. detection. Additionally, our project incorporates algorithms for
By enforcing the mandatory use of safety gear such as helmets and vehicle and machinery operation, ensuring safety compliance
seatbelts, the system ensures vehicle operation only when by halting operations if individuals remove safety gear such as
occupants adhere to safety protocols. Leveraging advanced image
recognition technology and pretrained models, the ESP32-CAM
glasses or helmets. This proactive approach extends to
offers automated detection capabilities for safety equipment, vehicular safety, where the ESP32-Cam monitors for the
including glasses, helmets, and seatbelts. Its sophisticated presence of helmets and seatbelt usage, halting vehicle
algorithms analyze facial features and colors, activating vehicles operations if necessary, precautions are not observed. In
solely when safety gear is correctly worn. Real-time monitoring summary, this paper aims to comprehensively explore the
and alerts further enhance safety measures, fostering a culture of ESP32-Cam's features and its vital role in developing robust
safety while optimizing cost-effectiveness and efficiency. In and cost-effective systems for eye glass detection in industries.
summary, the ESP32-CAM project represents a groundbreaking It not only addresses safety concerns but also outlines the
advancement in safety technology, revolutionizing safety potential for broader applications, showcasing the versatility
standards and significantly reducing accidents across various
and efficacy of this innovative technology.
settings.
II. LITERATURE REVIEW
Keywords—1. ESP32-CAM, Safety technology, 2. Image
recognition, 3. Pretrained models, 4. Automated detection, 5. Real- Previous studies have extensively explored the field of image
time monitoring, 6. Safety protocols Culture of safety, 7. Cost- recognition technology, highlighting the need for cost-effective
effectiveness, Efficiency, 8. Revolutionary advancement and efficient solutions across various applications.
Barybin, E. Zaitseva et al. [1] demonstrated the effectiveness of
I. INTRODUCTION ESP32-based platforms in object detection tasks, showcasing
In the realm of image recognition technology, the ESP32-Cam their practical applications.
has emerged as a pivotal player, offering accessible and cost- In the realm of industrial safety, research by Puput Dani
effective solutions. Leveraging continuous advancements, this Prasetyo Adi, et.al. [2] emphasized the importance of
variant of the ESP32 microcontroller showcases its prowess in automated safety monitoring systems in reducing workplace
automatically recognizing images or objects in its vicinity, accidents, particularly in industries where compliance with
presenting compelling options for diverse applications, protective equipment is paramount. This underscores the
including industrial safety and vehicular accident prevention. significance of reliable safety gear detection systems, such as
This paper delves into one such critical application: the the one proposed in this paper. Moreover, studies on vehicular
comprehensive analysis and detection of individuals wearing safety have highlighted the alarming statistics of accidents
safety glasses. Addressing prevalent safety concerns in resulting from non-compliance with safety measures such as
industries, where negligence in wearing protective eyewear helmet usage and seatbelt fastening.
poses serious risks, our project aims to deploy a reliable and R. Chauhan et al [3] and P. D. P. Adi, A. Kitagawa, and J.
efficient system capable of identifying the presence or absence Akita. [4] stressed the importance of technological
of safety glasses on individuals within a given environment. interventions in enforcing safety regulations to mitigate road
Highlighting the ESP32-Cam's features, including the UFL accidents. These findings align with our project's objectives of
Antenna for enhanced wireless communication with the WIFI incorporating safety compliance monitoring systems into
module, this paper underscores its significance in security vehicles. Furthermore, research on IoT applications in safety
applications. Notably, the ESP32-Cam's cost-effectiveness, and surveillance has demonstrated the potential of
compact size, and form factor make it particularly suitable for interconnected devices in enhancing safety measures.
Ravi Kishore Kodali et al. [5] and Umara Zafar et al. [6] B. Techniques:
showcased the effectiveness of IoT-based systems in real-time I. Our system operates on a simple principle: if safety
monitoring and alerting, contributing to accident prevention helmet and seatbelt glasses are detected using the
efforts in industrial and vehicular contexts. These studies ESP32-Cam's image recognition capabilities, the
provide valuable insights into integrating IoT technologies with machinery or equipment in the vicinity is activated.
image recognition systems, supporting the rationale behind our Conversely, if safety glasses are not detected, the
project's approach. machinery remains inactive, preventing potential
The literature review underscores the significance of accidents or injuries. Also if they put the safety wear
affordable and efficient image recognition solutions in aside when the machine get started then machine
addressing safety concerns across various domains. By detect it within 2 mins and gives alarm of 10 min if in
leveraging the capabilities of the ESP32-CAM, our project that 10 min safety wears are wearied then and only
aims to contribute to the development of robust systems for then machines continue its work otherwise stop.
safety gear detection and accident prevention. II. It gives live streaming if managers CEO or other
wants to see the worker working properly or not or for
III. METHODOLOGIES the security of car and bike ESPCAM gives the IP
The project aims to develop a comprehensive system utilizing address using this address we are able to see our
the ESP32-CAM for detecting eye glasses, helmets, and vehicles and machines too.
seatbelts on individuals, prioritizing safety across various III. It uses user authentication.
environments. Leveraging advanced image recognition IV. It is very cheap and efficient around 800rs this device
techniques, including pretrained models, the system had price.
endeavours to enhance security protocols, access control V. By automatically detecting the presence of safety
measures, and vehicular safety standards. The project's glasses, helmets and seatbelts also we can use it for
objectives include implementing precise detection algorithms home automation we ensure the well-being of workers
for each safety gear, achieving real-time processing while also improving operational efficiency. This
capabilities, integrating an alert system for status changes, and paper provides a comprehensive exploration of the
ensuring accuracy and robustness under diverse conditions. ESP32-Cam's features, emphasizing its significance in
the development of a robust and cost-effective system
A. components: for eyeglass detection in various industries.
Components required are given bellow VI. Our model operates on a combination of Arduino
microcontroller technology, face detection algorithms,
1. ESP32-CAM Module: Core hardware component for and image processing techniques to effectively
capturing and processing images with precision. mitigate the risks posed by pollution to workers' eyes.
2. FTDI (USB to Serial) Adapter: Facilitates communication VII. Arduino Microcontroller: The Arduino serves as the
and programming between the ESP32-CAM module and the brain of our system, responsible for processing data
development environment. from various sensors and controlling the machinery
based on the detected presence or absence of safety
3. Arduino IDE: Robust programming platform utilized for glasses seatbelt and helmets.
crafting intricate detection algorithms and system
functionalities. C. Methodological Steps:
4. Camera Web Server Library: Enables the creation of a
dynamic web interface for accessing detection results and
system status.
5. WiFi Connectivity: Facilitates remote access and
communication with the ESP32-CAM module, enhancing
system accessibility.
6. Pretrained Models: Utilized for advanced image recognition,
allowing for efficient and accurate detection of safety gear
within captured images.
7. Relay Module: Controls power supply to external devices
based on detection results, facilitating integration with
machinery and vehicles.
8. Serial Terminal: Essential tool for monitoring system status
and debugging during development and deployment phases.
Fig. 1 Flow chart of methodology
This flowchart outlines the sequential steps involved in Fortify communication channels with robust encryption
detecting safety gear (such as eye glasses, helmets, and protocols, safeguarding sensitive data and ensuring
seatbelts) using the ESP32-CAM system. It starts with the uncompromising data privacy and integrity.
initialization of hardware and software components, followed
7. User Authentication:
by steps for safety gear detection and implementation of
various protocols for security, user authentication, remote Implement stringent user authentication mechanisms to verify
monitoring, and maintenance. Finally, it concludes with the end and validate user credentials, fortifying the system's security
of the process. posture and preventing unauthorized access.
1.ESP32-CAM Connection with FTDI: 8. Remote Monitoring and Control:
Initiate development by establishing a robust connection Empower users with remote monitoring and management
between the ESP32-CAM module and the FTDI adapter for capabilities, facilitating seamless oversight and control from
seamless programming and communication. anywhere, anytime.
2. Arduino IDE: Detection Algorithms: 9. Regular Maintenance Protocols:
Craft precise detection algorithms for eye glasses, helmets, and Establish proactive maintenance protocols, including firmware
seatbelts using advanced image recognition techniques, updates and system health monitoring, ensuring sustained
including pretrained models. Integrate algorithms seamlessly optimal performance and longevity.
into the system's architecture to enable real-time processing
with unparalleled efficiency. D. Sudo Code for Safety Gear Detection:
3. Open IP Address: 1. Start program
Grant users access to the ESP32-CAM module's IP address, 2. Initialize libraries: esp_camera.h and WiFi.h
providing a gateway to a user-friendly web interface for real- 3. Select Camera Model: AI Thinker with PSRAM
time visualization and configuration of detection results.
4. Initialize Camera Pins
4. Face Enrolment and Calibration:
5. Set WIFI SSID and Password
6. Set Serial Debug Output
7. Start Camera Server in void loop
8. Begin Void Setup
a. Specify bitrate: 115200 bps
b. Enable Serial Debug Output
c. Configure camera and pins
d. WIFI Configuration
e. Camera Server ready
Fig. 2 Eye glass detection f. Display WIFI IP Address Status: Connected
The above diagram shows the difference between eye glass g. Define Pin mode (relay as output) & Digital Write (relay
wear and not wear example, Implement intuitive face low)
enrolment and calibration processes, capturing and storing
crucial facial features and safety gear landmarks for subsequent 9. Define active relay condition
detection tasks. 10. If eye Glass Detected is true and helmet Detected is true and
5. Safety Gear Detection: seatbelt Detected is true
Utilize pretrained models and advanced image recognition a. Set relay high
algorithms to detect the presence of eye glasses, helmets, and 11. If eyeglass Detected is false or helmet Detected is false or
seatbelts within captured images with exceptional accuracy and seatbelt Detected is false
reliability. Integrate detection algorithms seamlessly into the
system to facilitate activation and deactivation of machinery a. Set relay low
and vehicles based on detection results. 12. If relay is high
6. Secure Communication Implementation: a. Activate vehicle ignition/start machine
13. If relay is low
a. Deactivate vehicle ignition/stop machine activation of machinery upon successful eyeglass recognition
streamlines operations, highlighting the system's practicality
14. Repeat automatic start/stop process with safety gear
and potential for optimizing overall industrial productivity.
detection
This project not only addresses pressing safety concerns but
15. End program also spearheads the evolution of intelligent industrial processes,
demonstrating the technology's significance and tangible
This code can be write for particular purpose it is different for impact in real-world applications. Looking ahead, the
different application like for eyeglass detection, PPE kit,
widespread adoption of our eyeglass detection system promises
Helmet, Seatbelt it is different for every application.
to revolutionize safety protocols across various industries,
fostering safer work environments and bolstering productivity.
V. REFERENCES
[1]. Barybin, E. Zaitseva and V. Brazhnyi, "Testing the Security
ESP32 Internet of Things Devices," 2019 IEEE International
Scientific-Practical Conference Problems of
Infocommunications, Science and Technology (PIC S&T),
2019, pp. 143-146, DOI: 10.1109/PICST47496.2019.9061269.
[2]. Puput Dani Prasetyo Adi, et.al., "A Study of Programmable
System on Chip (PSoC) Technology for Engineering
Education", October 2020, Journal of Physics: Conference
Series, Volume 1899, 2nd Workshop on Engineering,
Education, Applied Sciences and Technology (WEAST) 2020 5
Fig. 3 Final setup on Breadboard October 2020, Makassar, Indonesia, doi:10.1088/1742-
6596/1899/1/012163.
[3]. R. Chauhan et al., "Design of Robotic Snake with ESP 32 CAM
and Arduino," 2021 19th OITS International Conference on
The above setup shows the final connection diagram of Information Technology (OCIT), 2021, pp. 6-9, doi:
components on breadboard This integration of advanced 10.1109/OCIT53463.2021.00013.
technology underscores the system's practicality and its [4]. P. D. P. Adi, A. Kitagawa, and J. Akita, "Finger Robotic control
potential to significantly enhance overall industrial efficiency. use M5Stack board and MQTT Protocol-based," 2020 7th
Furthermore, the system's seamless integration with existing International Conference on Information Technology,
Computer, and Electrical Engineering (ICITACEE), 2020, pp.
industrial infrastructure promises a smooth implementation 1-6, DOI: 10.1109/ICITACEE50144.2020.9239170.
process, minimizing disruptions and maximizing productivity [5]. Ravi Kishore Kodali and Venkata Sundeep Kumar Gorantla ,
gains. As a result, our project represents a pivotal advancement “RESTful Motion Detection and Notification using IoT”, 2018
in workplace safety, paving the way for safer and more efficient International Conference on Computer Communication and
industrial environments. Informatics (ICCCI -2018), Jan. 04 – 06, 2018, Coimbatore,
INDIA
This meticulous methodology, integrating pretrained Device [6]. Umara Zafar, Mubeen Ghafoor,Tehseen Zia,Abdullahi
for image recognition, strives to ensure precise and efficient Mohamud Sharif, Face recognition with Bayesian convolutional
detection of safety gear, thereby enhancing safety measures networks for robust. surveillance systems, January 2019,
across various domains. EURASIP Journal on Image and Video Processing 2019(1),
DOI: 10.1186/s13640-019-0406-y.
IV. CONCLUSION
The proper use of PPE kit , Helmets, seatbelt can prevent
40.6% of occupational injuries and diseases. 16%–18% of
occupational injuries resulting in total disability are caused by
employees and people not wearing appropriate PPE .
By implementing effective measures to safeguard workers and
people from pollution and accidents, we not only fulfil our
ethical responsibilities but also contribute to a more sustainable
and equitable work environment for all. The deployment of our
eyeglass detection and recognition system, driven by the
ESP32-CAM, represents a groundbreaking advancement with
profound implications for industrial safety and efficiency. By
integrating state-of-the-art algorithms for eyeglass detection
and seamless recognition, our system emerges as a pivotal tool
in upholding occupational safety standards within industrial
environments. Beyond mere compliance, the automated