This project aims to monitor road conditions using machine learning models, GPS data, and video recordings. The system processes video footage and GPS tracks, extracts frames, maps them to GPS coordinates, and applies machine learning models to classify road surfaces and detect potholes. The results are then stored and visualized through an interactive dashboard.
- Video Processing: Extract frames and metadata from uploaded videos.
- GPS Integration: Match GPS data to video frames for geospatial mapping.
- Machine Learning Models:
- TensorFlow-based classification model for paved/unpaved road detection.
- PyTorch-based detection model for pothole identification.
- Database Storage: Uses SQLite with SQLAlchemy for structured data management.
- Streamlit Dashboard: Displays real-time road condition analysis with filtering options.
- Time-Based Analysis: Allows historical data retrieval and time-based filtering.
- Extract metadata (creation time, frame rate, duration)
- Extract frames at predefined intervals
- Save frames to storage
- Filter GPS points within video duration
- Match frames to GPS using timestamp offset
- Extract and save relevant GPS data
- Classification Model predicts paved/unpaved roads
- Detection Model identifies potholes
- Store results with timestamps and locations
- Store processed data in a structured format
- Ensure latest data is always available
- Query results dynamically for analysis and visualization
- A route is defined as a sequence of GPS points with the same video creation time.
- Routes are stored uniquely, ensuring duplicates are not reprocessed.
- If two routes intersect, the newest data is prioritized.
- Union of intersecting routes ensures continuity in road monitoring.
- Timestamps are compared to maintain recent data accuracy.
- While extracting for display, the most recent route data is shown.
- Redundant or outdated data is ignored to optimize performance.
- This ensures a seamless and up-to-date representation of road conditions.
- Each extracted frame is stored with GPS coordinates, timestamp, and processed results.
- Images are converted to Base64 and stored in the database.
- Queries retrieve the latest available road conditions and pothole detections.
- Time-slider filtering allows historical analysis of road conditions.
- 💾 Upload Video & GPX
- User uploads 🎥 & GPX.
- System extracts metadata & 🌍 points.
- Frames are extracted from 🎥.
- ⚙️ Processing & Analysis
- Frames mapped to GPS.
- ML models classify & detect.
- Data stored in 📚.
- 📊 Dashboard & Reports
- User views results.
- Reports provide insights.
- ⏳ Slider filters by time.
The system uses SQLite as the database, with SQLAlchemy for ORM-based interaction.
- RoadConditions
- Stores the combined results of road classification and pothole detection.
| id | latitude | longitude | timestamp | frame_path | road_type | road_condition | pothole_data |
|---|---|---|---|---|---|---|---|
| 1 | 9.71469 | 76.68943 | 2025-01-29 17:17:22 | frame_0000.jpg | Asphalt | Good | [] |
- A single map is plotted with the newest points or portions of the route.
- Older parts of the route are displayed if newer data is not available.
- Each point is plotted with an approximation distance set.
- Users can select different routes and view their details.
- Routes are identified using timestamps, as a single route can have different data points with the same timestamps.
- Allows users to filter and view data based on time.
- Provides historical analysis of road conditions.