Broken-Kaddu / symbiot2024

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fall Detection System With OpenCV

Components:

  1. 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.

  2. 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.

  3. 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.

  4. 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.

  5. 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.

  6. 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.

  7. 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.

Workflow:

  1. Video Feed Capture: The program captures video feed either from a webcam or an external camera.

  2. 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".

  3. 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.
  4. 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 the arduino_script to activate the passive buzzer.
  5. 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.
  6. 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.

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

About


Languages

Language:Python 87.1%Language:C++ 12.9%