Downloads · 30 days
0
Safe-Drive-TN/State-farm-detection
State-farm-detection is a machine learning model from Safe-Drive-TN. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This is a YOLOv8 classification model trained on the State Farm Distracted Driver Detection dataset. The model is designed to classify driver behavior into 10 distinct categories to detect distracted driving activities.
Downloads · 30 days
0
Access
Public
Updated Nov 19, 2025
Repo size
6 MB
Likes
0
Public
Click a slice to open those files.
.pt6 MB · 100%
From the Hugging Face model README
This is a YOLOv8 classification model trained on the State Farm Distracted Driver Detection dataset. The model is designed to classify driver behavior into 10 distinct categories to detect distracted driving activities.
The model predicts the following 10 classes of driver behavior:
The model achieved excellent performance on the validation set:
pip install ultralytics
from ultralytics import YOLO
# Load the model from Hugging Face
model = YOLO('Safe-Drive-TN/State-farm-detection')
# Perform prediction on an image
results = model.predict('path_to_your_image.jpg')
# Get prediction results
predicted_class = results[0].probs.top1
confidence_score = results[0].probs.top1conf
class_names = results[0].names
print(f"Predicted class: {class_names[predicted_class]}")
print(f"Confidence: {confidence_score:.2%}")
The model was trained on the State Farm Distracted Driver Detection dataset, which contains images of drivers performing various activities in a vehicle. The dataset ensures driver separation between train and test splits to prevent data leakage.
The model was trained in a controlled environment and may not generalize perfectly to real-world driving conditions
Performance may vary with different camera angles, lighting conditions, and vehicle types
The model classifies single frames and does not incorporate temporal information
If you use this model, please cite:
@misc{state-farm-detection-2025,
title = {State Farm Detection in Vehicle — Yolov8n-cls},
author = {Malek Messaoudi, Yassine Mhirsi},
year = {2025},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/Safe-Drive-TN/State-farm-detection}}
}
License : MIT