Inspiration
Driving safety is a crucial issue, as countless accidents result from drowsiness, stress, and distracted driving. Inspired by the pressing need to reduce these incidents, I developed a solution that leverages real-time data and AI to prevent potential accidents by monitoring driver health indicators and alerting support systems. With recent advancements in machine learning, stress detection, and driver monitoring, I was motivated to create a solution that addresses these challenges and offers proactive safety support.
What It Does
This project combines multiple safety-focused features into a robust driver assistance system:
- Drowsiness Detection: Using a custom-trained model on the MRL Eyes dataset, the agent continuously monitors eye states to detect drowsiness. If the driver shows signs of fatigue, the system triggers safety actions to alert and engage the driver.
- Stress Monitoring: Through simulated physiological metrics (e.g., heart rate, respiratory rate), the agent identifies stress levels that exceed safe thresholds and initiates grounding exercises to calm the driver.
- Immediate Notifications: When triggered, the system can alert the relevant agency or service providers, enabling prompt response or assistance.
- Grounding Support: Once a stress alert is triggered, the agent connects to the OpenAI API to generate a custom “Rainbow Grounding” exercise that’s dynamically converted to audio, providing the driver with instant relaxation guidance.
How I Built It
This solution integrates several technologies:
- ML Model for Drowsiness: Trained on the MRL Eyes dataset, this model enables the agent to classify the driver’s eye state (open or closed) and activate alerts upon detecting drowsiness.
- Agent Communication: Utilizing autonomous agents coded with the uAgents framework, each module (StressMonitor, GroundingAgent) communicates efficiently across HTTP endpoints. The dynamic retrieval of agent addresses enables seamless interaction across components.
- Text-to-Speech for Grounding: Using OpenAI’s GPT API and Google Text-to-Speech, the agent generates personalized grounding exercises on the fly and plays them as audio to calm the driver.
Challenges I Ran Into
Creating a system with reliable real-time capabilities presented several challenges, including:
- Model Accuracy for Drowsiness Detection: Ensuring that the drowsiness model could accurately detect closed eyes across various conditions was challenging, requiring extensive model tuning and validation.
- Dynamic Agent Communication: Setting up dynamic address retrieval and maintaining robust communication between agents was essential for real-time responsiveness.
- Latency in API Calls: Managing the time lag in generating and playing grounding exercises was critical to ensure the system’s intervention remained timely and effective.
Accomplishments That I'm Proud Of
I’m particularly proud of the custom-trained drowsiness detection model and its real-time deployment. Additionally, integrating a stress-responsive grounding exercise and achieving seamless agent communication marks a significant milestone in creating a responsive driver safety system.
What I Learned
This project offered extensive learning in:
- Training and deploying ML models for real-time applications
- Managing agent-based systems to communicate dynamically and autonomously
- Leveraging APIs for generating grounding exercises with minimal latency
What's Next for This Project
Future work will focus on enhancing detection precision, expanding sensor integrations for more comprehensive driver health monitoring, and refining the system's ability to deliver grounding exercises through adaptive, personalized methods based on driver preferences and environmental factors.
Built With
- fetch-ai
- openai
- opencv
- smtp
- tensorflow
Log in or sign up for Devpost to join the conversation.