Skip to content

Latest commit

 

History

History
48 lines (37 loc) · 1.4 KB

README.md

File metadata and controls

48 lines (37 loc) · 1.4 KB

DMS

This project is on DMS (Driver Monitoring System). We will track drivers movements and send him alert about if he is taking care about the road or not while driving.

Training

  • Training a model is easy when you have your data formated properly.
  • Classification traing data follows following structure here:
  • The folder 'data' is stored in project file DMS

    data
    |
    -train
    |
    --Active
    --Drowsy
    -val
    |
    --Active
    --Drowsy

Video Streaming

- Using Flask For Live Streaming the Video .

Streaming.py

  • This python script creates a Flask web application that serves a video stream from the webcam.

- It initializes the Flask app and creates a video capture object using opencv to access the default webcam.
- The generate_frames() function continuously captures frames from the webcam and yields them as a response.
- If the script is run directly (__name__ == "__main__"), it starts the Flask application.

index.html

  • It includes a title and img tag to display the video stream.

  • The src attribute of the img tag is set to the /video route using Flask's url_for() function, which fetches the video stream

File Structure

Stream
|
-Video_Streaming
|
-Streaming.py
-Templates/index.html