Project Overview
The Roadway Distress Detection Platform is an AI-powered infrastructure monitoring solution built for highway authorities, civil engineering consultancies, and transportation departments responsible for maintaining large road networks. It transforms routine dashcam footage — captured by survey vehicles, maintenance trucks, or inspection fleets — into structured, location-tagged damage reports, enabling data-driven pavement maintenance planning.
At its core, the platform addresses a long-standing operational gap in road maintenance: manual road-condition surveys are slow, inconsistent, labour-intensive, and expensive. Engineers have historically relied on either costly specialised surveying equipment or subjective visual inspections that fail to scale to tens of thousands of kilometres of roadway. This platform automates that process by combining modern computer vision with geometric reasoning, producing standardised distress measurements suitable for budgeting, prioritisation, and compliance reporting.
From a business value perspective, the solution converts a manual, error-prone inspection workflow into a repeatable digital pipeline. A single pass by a survey vehicle generates comprehensive reports including GPS coordinates, highway chainage markers, distress type, severity classification, and real-world physical measurements — all correlated with the original video footage. Transportation authorities receive an auditable record of pavement condition across entire routes, facilitating planning decisions and enabling trend analysis over time. The product serves both technical and non-technical users: civil engineers obtain measurable, standards-aligned distress data, while operations personnel benefit from an accessible desktop interface that shields them from the underlying machine-learning complexity.
Key Features & Functionality
The platform offers a complete, end-to-end workflow for turning raw video into actionable infrastructure reports. Users select a dashcam recording, provide basic deployment parameters, and review the resulting detections in a visual dashboard.
Automated distress detection identifies two of the most commercially significant pavement defects — potholes and alligator (fatigue) cracking — directly from video frames, highlighting each defect with pixel-accurate contours rather than coarse bounding boxes. Real-world measurement conversion translates visual detections into physical dimensions: length, width, and affected surface area in metres. Severity classifications follow industry-aligned thresholds and are generated automatically, removing the subjectivity of human grading.
Continuous geolocation and contextualisation extract supporting metadata embedded in dashcam overlays — date, timestamp, GPS coordinates, chainage markers, and vehicle speed — so each detection is fully traceable to a specific moment and location on the road network. Temporal tracking across video frames ensures a single defect seen for several seconds is counted once rather than duplicated dozens of times. Configurable region-of-interest masking allows users to exclude portions of the frame (such as the vehicle bonnet, lane markings, or sky) that are irrelevant to analysis, reducing noise and false alarms.
Comprehensive reporting outputs both annotated videos (suitable for stakeholder review) and structured tabular datasets (suitable for GIS import, asset management systems, and statistical analysis). A manual annotation mode allows expert reviewers to correct, confirm, or supplement automated findings, ensuring human oversight for high-stakes reporting. An integrated settings panel gives operators control over camera geometry, filtering sensitivity, output formats, and interface appearance, making the product adaptable to a wide range of survey vehicles and conditions.
Technology Stack
The platform is built on a modern Python-based computer vision stack, selected to balance state-of-the-art accuracy, production stability, and cross-platform portability.
- Deep learning: PyTorch and Ultralytics YOLOv8 for high-performance instance segmentation, with torchvision supporting model operations.
- Computer vision: OpenCV for frame processing, drawing, and video I/O; NumPy for array operations; scikit-image for structural analysis.
- Optical character recognition: EasyOCR for extracting embedded metadata from dashcam overlays, enabling automatic geospatial tagging without external sensors.
- Data processing and reporting: Pandas for tabular output and PyYAML for configuration management.
- Graphical interface: CustomTkinter for a modern, themeable desktop UI paired with Pillow for image handling and live previews.
- Video encoding: FFmpeg integration for robust video input/output across formats.
- Augmentation and training: Albumentations for dataset augmentation during model training.
The entire stack runs locally on Windows, Linux, or macOS machines with optional GPU acceleration, and requires no cloud dependencies for deployment.
Technical Complexity & Challenges
Turning raw dashcam footage into reliable, measurement-grade infrastructure data required addressing several non-trivial engineering problems.
Pixel-to-metre conversion under perspective distortion. Because dashcams are mounted at varying heights and angles, a pixel near the top of the frame represents far more ground area than a pixel near the bottom. The platform implements a geometric conversion layer that accounts for camera height, mounting tilt, and per-detection position within the frame, producing measurements in real-world units. This allows a defect appearing anywhere in the image to be reported with accurate physical dimensions.
False-positive suppression on heterogeneous road surfaces. Real-world highway imagery contains a wide variety of visual textures — gravel scatter, patch repairs, shadows, wet patches, lane markings, and road aggregate — that superficially resemble cracks or potholes. A multi-stage filtering system evaluates candidate detections against a combination of structural, textural, and geometric cues, rejecting ambiguous detections that do not exhibit the characteristic signatures of true distress. This layered approach significantly reduces noise without sacrificing sensitivity to genuine defects.
Temporal consistency in unconstrained video. Dashcam footage is subject to vibration, sudden lighting changes, motion blur, and variable vehicle speeds. A custom tracking layer maintains detection identity across frames, consolidating repeated observations into single, high-confidence reports that include the best representative frame, maximum observed area, and tracked duration.
Overlay metadata extraction at scale. Dashcam metadata is typically rendered as text overlays rather than exposed through structured APIs, and different devices produce different layouts, fonts, and formats. The platform uses a hybrid strategy combining overlay-region detection, image preprocessing, OCR, and field parsing to reliably extract structured data — while caching recognised values to minimise compute overhead on long recordings.
Performance-sensitive pipeline design. Processing a single one-hour recording can require analysing tens of thousands of frames. The architecture employs batched inference on the GPU, selective OCR invocation, and frame-skipping options — balancing throughput with analytical completeness. Engineering decisions around batching, caching, and lazy computation enable the system to process long recordings in a practical time window on commodity hardware.
Design & User Experience
The user experience was designed around a simple principle: operators should focus on the road, not the machine learning. The platform wraps all underlying complexity behind a clean, modern desktop interface that guides users through each step of the workflow.
The interface uses a sidebar navigation pattern, giving immediate access to a Dashboard, Processing workflow, Manual Annotation tools, Results viewer, Settings panel, and About page. Users transition fluidly between exploration, processing, and review without re-configuring parameters each time. The Dashboard greets users with a system status overview and quick-action tiles — a reassuring entry point that communicates readiness and surfaces recently used functions.
The Processing page walks users through inputs in logical order: selecting a video, entering survey parameters, configuring optional masking regions, and launching inference. A live preview panel displays each frame as it is processed, with detection overlays drawn in real time. Counters for detected defects update continuously, giving operators confidence the system is working as expected. A dark/light theme toggle accommodates different environments, from brightly lit offices to night-shift maintenance operations.
For power users, the product remains fully scriptable: every core GUI capability has a command-line equivalent, allowing the platform to be embedded into batch workflows, scheduled jobs, or larger pipelines without sacrificing accessibility for less-technical team members.
Scale & Scope
The platform is a substantial engineering effort spanning approximately 5,900 lines of Python code, organised into a cleanly layered architecture of roughly 28 modules across nine logical subsystems.
- The graphical interface layer accounts for approximately 1,700 lines of UI code, including separate modules for primary navigation and specialised manual annotation tooling.
- The detection and tracking pipeline spans roughly 1,000 lines, covering model orchestration, video ingestion, identity tracking, and layered false-positive filtering.
- The measurement and geometry layer contributes approximately 550 lines dedicated to perspective-aware conversion logic.
- The output layer provides around 500 lines generating annotated videos and structured tabular reports.
- The overlay-parsing subsystem spans close to 600 lines managing metadata detection, OCR orchestration, and field parsing.
- Additional modules cover region-of-interest handling, dataset preparation, and training orchestration.
The platform is distributed with multiple end-user scripts, a desktop launcher, a structured YAML-based configuration system, and a detailed rules specification document. A labelled segmentation dataset comprising several hundred annotated images supports model training and retraining for adaptation to new geographies or additional defect classes.
Business Impact & Use Case
The platform is designed for organisations responsible for inspecting and maintaining road networks at scale — including national highway authorities, municipal transportation departments, civil engineering consultancies, smart-city initiatives, and infrastructure asset managers.
Traditional pavement surveys are expensive, slow, and subject to inter-inspector variability. By automating detection and measurement from existing dashcam hardware, this solution reduces the cost per kilometre surveyed, compresses turnaround times from weeks to hours, and produces consistent, repeatable results that stand up to audit.
Concrete use cases include: annual condition assessments covering thousands of kilometres; before-and-after verification of maintenance contracts; longitudinal monitoring to observe how defects evolve between inspections; compliance reporting to funding agencies or regulatory bodies; and prioritisation of maintenance budgets toward the most severe or widespread defects.
Because the system generates georeferenced tabular outputs, results integrate cleanly into existing geographic information systems, asset management platforms, and maintenance scheduling tools — extending its value beyond standalone reporting. The platform is particularly well suited to road networks where surface conditions are highly heterogeneous and where specialised laser-profiling equipment is cost-prohibitive.
Development Approach
The project was built with production deployment in mind, favouring clarity, modularity, and maintainability over shortcuts. The codebase follows a separation-of-concerns architecture, with each subsystem responsible for a single aspect of the pipeline — detection, tracking, filtering, measurement, metadata extraction, and output — so teams can evolve or replace individual components without destabilising the rest.
Configuration is centralised in human-readable files rather than scattered across source code. Filtering parameters, severity thresholds, camera geometry defaults, and operational toggles are all exposed through configuration and a dedicated rules document, making the system adaptable to new vehicle fleets, camera models, or regional survey conventions without requiring code changes.
Data structures across the system are defined as strongly typed records, enabling type safety, serialisation, and clean interface boundaries between modules. Shared rendering logic ensures consistency between automated annotations and manual expert review, preventing visual drift between workflows.
The project includes both GUI and scripted entry points, documentation covering setup and operation, and a labelled dataset facilitating future retraining. Overall, the product reflects careful engineering discipline appropriate for a system intended to generate auditable, measurement-grade outputs in a regulated infrastructure context — combining research-grade computer vision techniques with the usability, observability, and configurability expected of professional commercial software.
Tech stack
- Python
- PyTorch & Ultralytics YOLOv8
- OpenCV & NumPy
- EasyOCR
- scikit-image
- CustomTkinter & Pillow
- Pandas & PyYAML
- FFmpeg
- Albumentations (training)
- Cross-Platform Offline Runtime