saadmannan's picture
Fix: Pin Gradio 4.44.1 and huggingface_hub 0.24.7 for compatibility
1eb3236
---
title: Vehicle Diagnostics Agent
emoji: ๐Ÿš—
colorFrom: blue
colorTo: green
sdk: gradio
sdk_version: 4.44.1
app_file: app.py
pinned: false
license: mit
short_description: Multi-Agent AI System for Predictive Vehicle Diagnostics
tags:
- anomaly-detection
- lstm
- pytorch
- langchain
- langgraph
- multi-agent
- vehicle-diagnostics
- time-series
---
# ๐Ÿš— Vehicle Diagnostics Agent
## Multi-Agent AI System for Predictive Vehicle Diagnostics
This is a production-ready multi-agent AI system that analyzes vehicle sensor data to detect anomalies, identify root causes, and provide actionable maintenance recommendations.
### ๐ŸŽฏ Key Features
- **๐Ÿ” Anomaly Detection**: LSTM-based neural network with 99.53% validation accuracy
- **๐Ÿ”ฌ Root Cause Analysis**: Identifies underlying issues with OBD-II fault code mapping
- **๐Ÿ”ง Maintenance Recommendations**: Provides cost estimates and prioritized action plans
- **๐Ÿ“Š Interactive Visualizations**: Real-time anomaly detection charts
- **๐Ÿ“‹ Natural Language Reports**: Easy-to-understand summaries for vehicle owners
### ๐Ÿ—๏ธ System Architecture
The system employs a **multi-agent architecture** orchestrated by LangGraph:
1. **Data Ingestion Agent** - Loads and prepares vehicle sensor data
2. **Anomaly Detection Agent** - LSTM neural network for pattern detection
3. **Root Cause Analysis Agent** - Fault pattern matching and correlation analysis
4. **Maintenance Recommendation Agent** - Cost estimation and action planning
5. **Report Generation Agent** - Comprehensive diagnostic reports
### ๐Ÿš€ Technology Stack
- **ML Framework**: PyTorch (LSTM-based time-series anomaly detection)
- **Orchestration**: LangGraph for multi-agent coordination
- **Frontend**: Gradio for interactive UI
- **Data Processing**: Pandas, NumPy, Scikit-learn
- **Visualization**: Plotly
### ๐Ÿ“Š Model Performance
- **Validation Accuracy**: 99.53%
- **Training Loss**: 0.0003 (final epoch)
- **Validation Loss**: 0.0409 (best)
- **Dataset**: 50,000 records from 100 vehicles
- **Features**: 60+ engineered features from 14 sensor measurements
### ๐ŸŽฎ How to Use
1. **Select a Vehicle**: Choose from available vehicle IDs
2. **Set Reading Count**: Specify how many recent readings to analyze (default: 200)
3. **Run Diagnostic**: Click the diagnostic button to analyze
4. **Review Results**: View anomaly detection, root cause analysis, and maintenance recommendations
### ๐Ÿ“ˆ Dataset
The system analyzes synthetic vehicle sensor data including:
- Engine temperature, RPM, speed
- Battery voltage and health
- Oil and fuel pressure
- Tire pressure (all four wheels)
- Vibration levels
- Coolant temperature
- And more...
### ๐Ÿ”ฌ Technical Details
**Anomaly Detection Model:**
- Architecture: 2-layer LSTM with 64 hidden units
- Input: Sequences of 10 timesteps with 60 features
- Output: Binary classification (normal/anomaly)
- Training: 31,570 sequences on GPU
**Root Cause Analysis:**
- 8 fault pattern definitions
- Sensor correlation analysis
- Confidence scoring
- OBD-II fault code mapping (P-codes, C-codes)
### ๐Ÿ“ License
MIT License - See LICENSE file for details
### ๐Ÿ”— Links
- **GitHub**: [VehicleDiagnosticsAgent](https://github.com/saadmann18/VehicleDiagnosticsAgent)
- **Documentation**: Full project documentation available in the repository
### ๐Ÿ‘จโ€๐Ÿ’ป Author
Built with โค๏ธ by Saad Mann
---
**Note**: This is a demonstration system using synthetic data. For production use with real vehicles, integration with actual OBD-II devices would be required.