Skip to content

Latest commit

Β 

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸš— AgentDrive AI

Python YOLO11 OpenCV Streamlit LangChain Groq License

πŸš€ Live Demo

πŸ‘‰ https://chethan-agentdrive-ai.streamlit.app/

Experience real-time object detection, multi-object tracking, motion analysis, AI-powered driving advice, and intelligent risk assessment by uploading your own driving video.


πŸ“Œ Overview

AgentDrive AI is an intelligent Driver Assistance System (ADAS) prototype that combines Computer Vision, Multi-Object Tracking, Scene Understanding, Risk Analysis, Generative AI, and Neural Voice Alerts into a real-time dashboard.

The application detects road users from a driving video, tracks them across frames, evaluates traffic conditions, estimates driving risk, generates contextual driving advice using an LLM, and delivers concise voice alerts similar to modern Advanced Driver Assistance Systems.

Unlike a conventional object detection project, AgentDrive AI integrates perception, reasoning, and driver interaction into a single modular AI system.


✨ Features

  • πŸš— Real-Time Object Detection using YOLO11
  • 🎯 Multi-Object Tracking using ByteTrack
  • 🚦 Traffic Density Analysis
  • πŸ‘₯ Pedestrian Detection
  • πŸš› Vehicle Detection
  • πŸ“ˆ Motion Analysis
  • ⚠ Risk Assessment Engine
  • πŸ€– AI Driving Advisory using Llama 3.3 (Groq)
  • πŸ”Š Neural Voice Alerts using Microsoft Edge TTS
  • πŸ“€ Upload Any Driving Video
  • πŸ–₯ Premium Streamlit Dashboard
  • πŸ“Š Live Telemetry Cards
  • 🧠 Modular AI Pipeline

πŸ—οΈ System Architecture

                    Driving Video
                          β”‚
                          β–Ό
                   OpenCV Video Reader
                          β”‚
                          β–Ό
                 YOLO11 Object Detection
                          β”‚
                          β–Ό
              ByteTrack Object Tracking
                          β”‚
                          β–Ό
                 Scene Analyzer Module
                          β”‚
             β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
             β–Ό                         β–Ό
     Motion Analyzer            Risk Engine
             β”‚                         β”‚
             β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β–Ό
                 Decision Engine
                          β”‚
          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
          β–Ό                               β–Ό
   Alert Engine                     LLM Assistant
          β”‚                               β”‚
          β–Ό                               β–Ό
 Microsoft Edge TTS            AI Driving Advisory
          β”‚                               β”‚
          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
                          β–Ό
                 Streamlit Dashboard

πŸ–₯ Dashboard

Main Dashboard


AI Voice Assistant


Upload Custom Video


Detection Example


🧠 AI Pipeline

The project follows a modular pipeline architecture.

Module Responsibility
YOLO11 Object Detection
ByteTrack Object Tracking
Scene Analyzer Scene Understanding
Motion Analyzer Movement Estimation
Risk Engine Collision Risk Analysis
Decision Engine Determines whether to invoke the LLM
Alert Engine Generates short safety alerts
Voice Agent Neural voice notifications
LLM Assistant Generates contextual driving advice

πŸ›  Tech Stack

Programming

  • Python 3.12

Computer Vision

  • OpenCV
  • YOLO11 (Ultralytics)

Multi Object Tracking

  • ByteTrack

Generative AI

  • LangChain
  • Groq API
  • Llama 3.3

Voice AI

  • Microsoft Edge TTS
  • pygame

Dashboard

  • Streamlit

πŸ“‚ Project Structure

AI_Driving_Assistant/

β”‚

β”œβ”€β”€ app.py
β”œβ”€β”€ requirements.txt
β”œβ”€β”€ README.md

β”‚

β”œβ”€β”€ assets/
β”‚   β”œβ”€β”€ dashboard.png
β”‚   β”œβ”€β”€ upload.png
β”‚   β”œβ”€β”€ voice.png
β”‚   └── detection.png

β”‚

β”œβ”€β”€ videos/

β”‚

└── src/

    β”œβ”€β”€ detector.py
    β”œβ”€β”€ visualizer.py
    β”œβ”€β”€ scene_analyzer.py
    β”œβ”€β”€ motion_analyzer.py
    β”œβ”€β”€ risk_engine.py
    β”œβ”€β”€ decision_engine.py
    β”œβ”€β”€ alert_engine.py
    β”œβ”€β”€ voice_agent.py
    β”œβ”€β”€ llm_assistant.py
    β”œβ”€β”€ memory.py
    └── pipeline.py

πŸš€ Installation

Clone the repository

git clone https://github.com/ChethanMShivappa/AgentDrive-AI.git

Navigate into the project

cd AgentDrive-AI

Create a virtual environment

python -m venv venv

Activate

Windows

venv\Scripts\activate

Install dependencies

pip install -r requirements.txt

Run

streamlit run app.py

🎯 Example Output

Traffic Level

HEAVY

Risk Level

MEDIUM

Motion Summary

2 Cars Approaching

1 Truck Moving Away

Voice Alert

⚠ Heavy Vehicle Ahead

AI Driving Advisory

Reduce speed.

Maintain a safe following distance.

Watch pedestrians crossing ahead.

πŸ“ˆ Future Enhancements

  • Lane Detection
  • Traffic Sign Recognition
  • Driver Drowsiness Detection
  • Depth Estimation
  • Speed Estimation
  • Collision Prediction
  • Voice Commands
  • Edge Device Deployment
  • Docker Support
  • Cloud Deployment

πŸ’Ό Skills Demonstrated

  • Computer Vision
  • Multi-Object Tracking
  • Scene Understanding
  • Motion Analysis
  • Risk Assessment
  • Prompt Engineering
  • Large Language Models
  • LangChain
  • Real-Time Video Analytics
  • Software Engineering
  • Modular AI System Design
  • Streamlit Dashboard Development

πŸ‘¨β€πŸ’» Author

Chethan M S

AI Engineer | Generative AI | Computer Vision | Agentic AI

GitHub: https://github.com/ChethanMShivappa

LinkedIn: https://linkedin.com/in/chethan-m-s-b544673a9/


⭐ Support

If you found this project useful, please consider giving it a ⭐ on GitHub.

About

AI-powered Driver Assistance System using YOLO11, ByteTrack, LangChain, Llama 3.3, and Microsoft Edge TTS

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages