Project Info
This project did not submit a demo video on Devpost.
Inspiration
Randomly, we encountered an unexpected statistic: 1 in 25 adults has dozed off while driving in the previous month. This made us discover that fatigue-related driving is responsible for more than 100,000 accidents annually in the U.S., with a significant number involving long-haul operators. We were amazed at how frequently fatigue and distraction remain overlooked until it's too late — particularly on lengthy journeys. That’s when we started considering if we could create a system that not only comprehends the road but also focuses on the driver. That concept formed the basis for NeuroGuardian.
What it does
Data Entries An EEG headset was utilized to track the driver’s cognitive condition in real time, recording signals indicative of attention and fatigue. In addition, we installed a dual-camera system: one directed at the driver to monitor behavior, and another aimed at the road to collect traffic and lane information. Detection Workflow We incorporated YOLOv8 for identifying objects and utilized UltraFast Lane Detection to analyze the drivable region. These outputs were merged to categorize objects according to the lane zone where they were detected. At the same time, EEG signals were examined to identify states of distraction or fatigue. Results & Notifications If the system identifies distraction or potential risk in the driver's lane, it activates a voice alert through a text-to-speech system (using Gemini). The alert aims to be simple yet impactful, assisting in redirecting the driver’s attention without causing them to feel overloaded
How we built it
NeuroGuardian is an assistant for driver awareness that integrates brainwave signals with computer vision to minimize distraction and fatigue. An EEG headset tracks the driver's concentration in real time, supplemented by a dual-camera system—one directed at the road and the other observing the driver. It identifies lane boundaries and detects objects with YOLOv8, subsequently classifying those objects according to their location in relation to the driving lane. If it senses a lapse in attention or a possible danger in a crucial area, it provides a brief voice alert via a text-to-speech system to redirect the driver’s focus to the road.
Challenges we ran into
We faced issues with training and fine-tuning models due to limited processing power. Additionally, finding data sets for our EEG model was difficult.
Accomplishments we're proud of
We are proud of combining both EEG technology and CV to protect drivers, which hasn't been done before.
What we learned
We learned how to reduce the noise in data. The data and dataset for all our AI models were noisy, so we've learned the importance and a lot of techniques in it while tackling the data analysis.
What's next
We would like to use a smaller BCI device such as Muse2, but the data quality is low, so we also need to improve the machine learning model. We will also need feedback from the users so that we can find further improvements.
NeuroDrive
UC Berkeley AI Hackathon 2025 Project
A real-time driver monitoring system that integrates computer vision and EEG analysis to detect distraction, drowsiness, and potential hazards for enhanced driving safety.
🏆 Project Vision
We win these - Building the future of intelligent driver assistance systems.
🏗️ Architecture
Microservices Design
┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐
│ Distraction CV │ │ Dizziness EEG │ │ Object Detection│
│ Port 8001 │ │ Port 8002 │ │ Port 8003 │
└─────────────────┘ └─────────────────┘ └─────────────────┘
│ │ │
└───────────────────────┼───────────────────────┘
│
┌─────────────────┐
│ Main GUI │
│ (Tkinter) │
└─────────────────┘
Core Services
-
Distraction CV Service (
services/distraction_cv.py)- Real-time eye tracking and attention detection
- Head pose estimation
- WebSocket streaming on port 8001
-
Dizziness EEG Service (
services/dizziness_eeg.py)- EEG signal processing for drowsiness detection
- Brain wave analysis (Alpha, Beta, Theta)
- WebSocket streaming on port 8002
-
Object Detection Service (
services/object_detection_cv.py)- Real-time road hazard detection
- Vehicle and pedestrian identification
- WebSocket streaming on port 8003
-
Main Integration (
main.py)- Tkinter-based GUI for unified monitoring
- Real-time data aggregation from all services
- Central control and visualization
🚀 Quick Start
Prerequisites
- Python 3.8+
- pip package manager
Installation
-
Clone the repository
git clone <repository-url> cd inner-eye-drive -
Install dependencies
pip install -r requirements.txt
Running the System
-
Start all services (in separate terminals):
# Terminal 1 - Distraction CV python3 services/distraction_cv.py # Terminal 2 - Dizziness EEG python3 services/dizziness_eeg.py # Terminal 3 - Object Detection python3 services/object_detection_cv.py -
Launch the main application:
# Terminal 4 - Main GUI python3 main.py -
Test with multi-client (optional):
# View all service outputs simultaneously python3 multi_client.py
🔧 API Endpoints
Service Health Checks
- Distraction CV:
GET http://127.0.0.1:8001/ - Dizziness EEG:
GET http://127.0.0.1:8002/ - Object Detection:
GET http://127.0.0.1:8003/
WebSocket Endpoints
- Distraction CV:
ws://127.0.0.1:8001/ws - Dizziness EEG:
ws://127.0.0.1:8002/ws - Object Detection:
ws://127.0.0.1:8003/ws
📁 Project Structure
inner-eye-drive/
├── main.py # Main GUI application
├── multi_client.py # Multi-service test client
├── client.py # Single service test client
├── requirements.txt # Python dependencies
├── README.md # Project documentation
├── services/
│ ├── distraction_cv.py # Eye tracking & attention detection
│ ├── dizziness_eeg.py # EEG drowsiness detection
│ └── object_detection_cv.py # Road hazard detection
└── models/ # ML models (future implementation)
🛠️ Development Status
✅ Completed
- Microservices architecture setup
- FastAPI + WebSocket infrastructure
- Real-time communication between services
- Basic Tkinter GUI framework
- Multi-service client testing
🚧 In Progress
- Computer vision algorithms implementation
- EEG signal processing integration
- Machine learning model integration
- Advanced GUI with real-time visualizations
📋 Planned Features
- Real-time driver alerting system
- Data logging and analytics
- Mobile app integration
- Cloud-based monitoring dashboard
🤝 Contributing
This project was developed during the UC Berkeley AI Hackathon 2025.
📄 License
[Add your license information here]
Built with ❤️ at UC Berkeley AI Hackathon 2025
Analysis
View
Metric
- 18
- 8
- 5
- 1
Figures cover GitHub contributors during the hackathon window. A co-authored commit counts in full for each author, so per-member totals add up to more than the whole-team figures.
Technology
- FastAPIIn code
- PythonIn code
- PyTorchIn code
- TensorFlowIn code
4 of 4 appear in the indexed code.
AI coding agents
No AI coding agent signals were found in this repository.
Detected from committed agent config files and commit authorship. Absence of a signal is not proof an agent was unused.
Codebase size
Source size
167 KB
Source files
28
Counts recognized source files only; vendored directories, binaries and lockfiles are excluded, so this is smaller than the repository on disk.
Repository
deanzahci/neuro-drive
33 files · 6.4 MB · @ 7d36773
Structure
Application logic
16 files · 48%Domain rules, services and shared utilities.
Data & schema
12 files · 36%Schema definitions, migrations and data access.
Supporting
Layers are inferred from where files sit in the tree, not from reading the code. A project that names its directories unconventionally will read oddly here — open the file browser to check anything the diagram implies.
Languages
- Python96%
- Markdown4%
Share of indexed source by file size. Binary and vendored files are excluded.
Dependencies
requirements.txt
pypi · 21- addict
- fastapi
- matplotlib
- mediapipe
- numpy
- opencv-python
- pathspec
- pydantic
- pyOpenBCI
- pyserial
- requests
- scikit-learn
- scipy
- shapely
- tensorboard
- torch
- torchvision
- tqdm
- +3 more
models/distraction_cv/requirements.txt
pypi · 3- numpy
- opencv-python
- tensorflow
Declared in the repository’s manifests at the indexed commit. A declared package is not proof it is used, and runtime dependencies are listed first.
This project’s features have not been analysed yet.
Export this project's context (description, README, evidence, key source files) to chat with an AI agent elsewhere.