This is a driver drowsiness detection project, that detects if the drivers eyes are closed for 15 continuous frames, then the system alerts the driver. The project uses OpenCV and Haarcascade classifier to detect the eyes. A CNN model is trained on the given dataset to detect whether the eye is open or closed.
- tensorflow
- keras.preprocessing.image
- OpenCV
- keras.models
- tensorflow
- numpy
- keras.preprocessing
- Import Libraries
- Data Preprocessing
- Initializing CNN
- Convolutional Layer
- Max Pooling Layer
- Adding a second convolution and max pooling layer
- Flattening
- Full Connections
- Output Layer
- Training the CNN
- Saving the model
- Import Libraries
- Load CNN Model
- Face and Eye Detection using Haar Cascade
- Eye open or closed prediction using the CNN Model
- Alert if drowsy