-
OpenCV: OpenCV is a popular computer vision library used for various image and video processing tasks. It provides functions for image/video capture, processing, and analysis.
-
Python: Python is the programming language used to develop the application. It provides a simple and flexible syntax along with extensive libraries for different tasks.
-
YOLOv8s: YOLOv8s is a deep learning-based object detection model. It's capable of detecting and classifying objects in real-time with high accuracy. In this case, it's used to detect people in the video feed.
-
Arduino: Arduino is an open-source electronics platform based on easy-to-use hardware and software. It's used to interface with external hardware components, such as the passive buzzer in this scenario.
-
Passive Buzzer: A passive buzzer is an electronic component that produces sound when an alternating current is passed through it. It's used to audibly alert nearby individuals when a fall is detected.
-
sms_script: A script responsible for sending SMS or email notifications to the necessary authorities when a fall is detected. It could use SMTP for email or APIs for SMS services.
-
arduino_script: A script that interfaces with an Arduino board to control external hardware, such as a passive buzzer. It activates the buzzer when a fall is detected and requires manual intervention to turn it off.
-
Video Feed Capture: The program captures video feed either from a webcam or an external camera.
-
Object Detection: Using YOLOv8s, the program performs real-time object detection to identify people in the video feed. It draws rectangular bounding boxes around detected persons and labels them as "person".
-
Fall Detection Algorithm:
- The program constantly monitors the dimensions (height and width) of the bounding box around each person.
- If the width of the box becomes greater than the height, it triggers a condition check.
- It continuously checks this condition for a certain duration (e.g., 10 seconds) to confirm if it's a fall or just a sudden movement.
-
Fall Detection:
- When the condition of width being greater than height persists for the specified duration, the program detects a fall.
- Upon fall detection, it triggers the
sms_script
to send email notifications to the necessary authorities and activates thearduino_script
to activate the passive buzzer.
-
Alert System:
- The
sms_script
sends an email notification containing details about the fall (timestamp, location if available, etc.) to predefined recipients, such as emergency contacts or caregivers.
- The
-
Buzzer Activation:
- The
arduino_script
interfaces with the Arduino board to activate the passive buzzer, producing an audible alert. - The buzzer continues to sound until manually turned off, ensuring that the fall doesn't go unnoticed.
- The
With the inclusion of Arduino and the passive buzzer, the program provides both visual and audible alerts when a fall is detected, enhancing its effectiveness in notifying nearby individuals about the potential emergency situation.
To run just open in your preferred IDE and run the main_script.py