Anthropic Credits
C-Drive
inspired during the drive back to UF from KnightHacks, we pivoted from an agentic Claude chatbot to build a sleepy driver detector to solve the problem we were actively having running off no sleep
Core trick
Fine-tunes a YOLOv8-nano model on labeled driver images in Colab and runs it on webcam frames to flag drowsiness.
Tags
Built with
colabfastapikagglemediapipenext.jsopencvpythontailwindyolo
Description
Inspiration
Our original goal was to build an
agentic Claude chatbot
that could automate complex tasks using a multi-agent architecture. The backend was powered by
FastAPI
and
LangGraph
, while the frontend was a
Next.js
interface that visualized real-time agent actions through screenshots and progress updates.
Halfway through the hackathon, we realized we wanted to pivot toward something with more real-world impact. After no sleeping from KnightHacks of brainstorming, we repurposed the structure of our project into a
driver state detection system
capable of identifying signs of drowsiness or distraction. The irony of detecting sleepy drivers after getting no sleep ourselves wasn’t lost on us.
What We Learned
We learned how to move quickly between ideas and re-use existing infrastructure efficiently. Working under pressure, we saw how a robust backend and modular design can make pivoting possible without starting from scratch. We also deepened our understanding of computer vision, model fine-tuning, and how to use
Google Colab
to train and deploy small but effective models on limited hardware.
How We Built It
We started with a
FastAPI backend
for multi-agent automation and a
Next.js + Tailwind frontend
for visualization. Once we pivoted, we built a
driver detection module
using
OpenCV
and
MediaPipe
.
We sourced a labeled dataset from
Kaggle
, preprocessed the images, and trained a lightweight
YOLOv8-nano
model on
Google Colab
using GPU acceleration. The model learned to detect eyes, head pose, and gaze direction. We integrated it with our camera input pipeline, allowing it to run in real time and flag potential drowsiness or inattentive states.
Challenges
Time was the biggest challenge. With very little time to pivot, we had to scale down the chatbot’s complexity and repurpose our codebase to support video input and model inference. Managing dependencies between the AI backend and the real-time detection logic also required several quick iterations. Luckily I came off with training vision at KnightHacks with my robot arm chess player where I used CV for board state detection so finding a dataset and training using YOLO was not too bad.
Built With
FastAPI
Next.js
Tailwind CSS
Python
OpenCV
MediaPipe
Google Colab
Kaggle
datasets
YOLOv8-nano
(Ultralytics)
README excerpt
# C-Drive Completed for the UF Claude Builder Club Hackathon on the way back from Knighthacks 8. Two projects: - Agentic chatbot powerd by Claude - Video processor for detecting distracted driver