File size: 3,574 Bytes
c38dbec
d2173d1
 
 
 
c38dbec
1eb3236
c38dbec
 
d2173d1
 
 
 
 
 
 
 
 
 
 
c38dbec
 
d2173d1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
---
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.