Downloads · 30 days
12
4% of all-time downloads
ckcl/driver-drowsiness-detector
driver-drowsiness-detector is a image classification model from ckcl. Use it when you need a label for an image. It is set up for transformers. The card lists the license as mit.
This model is designed to detect driver drowsiness from facial images using a CNN architecture.
Downloads · 30 days
12
4% of all-time downloads
All-time downloads
271
Public
Repo size
890 MB
Likes
0
Public
Click a slice to open those files.
.h5533 MB · 60%
From the Hugging Face model README
This model is designed to detect driver drowsiness from facial images using a CNN architecture.
import tensorflow as tf
import cv2
import numpy as np
# Load model
model = tf.keras.models.load_model('drowsiness_model.h5')
# Preprocess image
img = cv2.imread('face.jpg')
img = cv2.resize(img, (64, 64))
img = img / 255.0
img = np.expand_dims(img, axis=0)
# Make prediction
prediction = model.predict(img)
is_drowsy = prediction[0][0] > 0.5
This model is released under the MIT License.