2024 · YOLOv8 · Flask · Docker
Driving into a safer tomorrow: a computer vision platform that detects potholes in real time and routes drivers around them.

Driving into a safer tomorrow: a computer vision platform that detects potholes in real time and routes drivers around them.
One of the leading causes of accidents and vehicle damage is uneven roads and potholes. In Indonesia specifically, potholes are often hard to avoid simply because there's no real-time information about which roads are actually damaged. The downstream effects are concrete rather than abstract: damaged roads slow down travel, and the lack of warning increases both the risk of accidents and the cost of vehicle repairs. SafeRoad exists to close that information gap, turning road damage from something a driver discovers the hard way into something they can see coming and route around.
SafeRoad is a computer vision-powered platform built to make driving safer and smarter, with three core capabilities working together.
Detect Potholes. The system analyzes image data, sourced from cameras or Google Maps, to identify potholes in real time rather than relying on manual road condition reports.
Provide Route Information. Detection results feed into an interactive map that marks safe routes and flags roads with minimal versus significant damage, so a driver can see the tradeoff before they commit to a route.
Improve Safety. By surfacing potholes before a driver reaches them, SafeRoad helps avoid the moments that actually cause accidents or vehicle damage, rather than just logging them after the fact.
The dataset behind SafeRoad's detection model comes from two sources: manually captured images of damaged roads using cameras or drones, and existing road-damage datasets pulled from open-source platforms. Combining both gave the model exposure to road damage across a wider range of conditions than either source alone would provide.
Raw images alone weren't enough to make the model robust, so the dataset was expanded using augmentation techniques such as rotation, flipping, cropping, and lighting adjustments, simulating the kind of variation a model will actually encounter in the field (different angles, time of day, weather). After augmentation, the working dataset grew to roughly 9,000 images.
The augmented dataset was used to train and compare three YOLO model variants: YOLOv8, YOLOv10, and YOLOv11. All three landed in a similar range on mAP50, the metric measuring how correctly detected keypoints align with ground truth at a 50% IoU threshold, but YOLOv8 came out on top and was selected as the production model.
The backend is built on Flask, which handles server logic and system communication, and streams YOLOv8's detection results to the frontend in real time using Server-Sent Events (SSE). The server itself is containerized with Docker for portability and hosted on Azure to handle scaling, while Firebase stores detection results and user history.
The frontend is a Flutter app, giving SafeRoad a single responsive codebase across Android and iOS. It consumes the backend's detection data over its API and renders it as an interactive map, marking safe routes and damaged roads based on the model's live output.
Computer vision & ML: YOLOv8 (selected over YOLOv10 and YOLOv11 after evaluation) Backend: Flask, Server-Sent Events (SSE) for real-time streaming Infrastructure: Docker (containerization), Microsoft Azure (hosting) Database: Firebase Frontend: Flutter (Android & iOS)