Skip to content

Balukodeboyina/Safepath-crew-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Driver Safety Monitoring System

A real-time driver safety monitoring system using Python and OpenCV for liveness detection (blink + motion), alerting, and face/eye recognition. Built for a hackathon.

Features

  • Real-time face and eye detection with Haar cascade classifiers
  • Two-factor liveness detection (blink and motion monitoring)
  • Alerts for camera block, missing driver, and static image (using sound and status indicators)
  • Event logging with timestamps for safety incidents
  • Configurable detection parameters and thresholds
  • Threading for non-blocking audio alerts

Technology Stack

  • Python
  • OpenCV
  • Haar Cascade Classifiers
  • threading (Python standard library)
  • winsound (Windows alerts)

Architecture

Webcam Input Module: Initializes and captures real-time video stream for face and eye monitoring.

Face & Eye Detection Module: Utilizes Haar cascades to detect and track facial features.

Liveness & Anomaly Detection: Monitors blink rates, face movement patterns, and other safety signals.

Alert & Logging System: Issues sound alerts and maintains logs when safety thresholds are crossed (e.g., driver inattentiveness or camera obstruction).

Display/Status Module: Continuously updates the display window with real-time safety status and logs.

Block Diagram

Webcam Input

Face Detection Module

Eye Detection Module

Blink Monitoring

Head Movement Tracking

Liveness Detection

Anomaly Detection

Alert & Logging System

Display Output with Real-time Status

Installation

  1. Clone the repository git clone https://github.com/Baluwebsite/Safepath-crew- cd Safepath-crew
  2. Install Python dependencies pip install opencv-python numpy
  3. Make sure your webcam is working and you are running Windows (for sound alerts).

Usage

  1. Run the main script: python "final project.py"
  2. The webcam will activate for monitoring.
  3. Alerts and logs will trigger if liveness fails or anomalies are detected.
  4. Press q to exit the program at any time.

Project Flow

  • Captures video stream from webcam
  • Detects face and eyes using Haar cascades
  • Monitors blink patterns and face movement
  • Sounds alerts and logs incidents if safety threshold is breached
  • Provides real-time status on the display window

Example Output

Screenshot (61) Screenshot (62) Screenshot (63)

Contributing

Contributions, suggestions, and bug reports are welcome.
Feel free to fork, create issues, or submit pull requests.

License

This project is licensed under the MIT License.

Acknowledgments

  • For organizing the hackathon
  • OpenCV community and documentation
  • Hackathon participants and mentors

About

real-time driver safety monitoring system using python and openCV for liveness detection blink and motion alerting and face eye recognition. built for a hackathon

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages