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 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
- 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.
-
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
Stream
|
-Video_Streaming
|
-Streaming.py
-Templates/index.html