Skip to main content

RoadScan

RoadScan
Get the code

Language

Python

Tool Type

Algorithm

License

IDB Open-Source Software License

Version

1.0.0

About the tool Responsible

Inter-American Development Bank

RoadScan
What is it?

RoadScan is an open-source tool developed by the IDB to assess road trafficability through automated analysis of satellite imagery. It uses Meta's Segment Anything Model (SAM), image processing techniques, and anomaly detection algorithms to segment roads, identify moving vehicles, and detect pavement defects such as potholes and stains. The pipeline processes TMS (Terrain/Satellite) images from areas defined in KML files, generating georeferenced results in raster (GeoTIFF) and vector (Shapefile, GeoJSON) formats that can be directly integrated into geographic information systems (GIS).

What problems does it solve?

RoadScan reduces the need for manual road inspections, which are costly, slow, and difficult to scale. It automates road condition assessment using satellite imagery, enabling detection of pavement anomalies, vehicle traffic quantification, and generation of georeferenced data remotely. This facilitates prioritization of road maintenance investments and improves decision-making in transport infrastructure.

How does the tool work?

It works as a pipeline of 8 Python notebooks executed sequentially: 1\. Generates bounding boxes from a KML file and downloads TMS satellite images (Terrain and Satellite). 2\. Segments road infrastructure using thresholding and morphological operations on Terrain images. 3\. Crops satellite images to retain only the road surface. 4\. Detects vehicles (cars, buses, and trucks) using LangSAM. 5\. Segments clean pavement by removing lateral visual noise. 6\. Detects visual anomalies (potholes, stains) through chromatic filtering in HSV color space. 7\. Applies reverse geocoding to obtain detailed locations. 8\. Consolidates all results into a unified table with road, vehicle, anomaly, and location data.

Open standards

Uses open geospatial formats: GeoTIFF for raster data, Shapefile and GeoJSON for vector data, and KML for defining areas of interest. Built on open-source libraries such as GeoPandas, Rasterio, OpenCV, and Meta's SAM (Segment Anything Model). Compatible with any standard GIS system.

Sector
Transport
Functionality
Geospatial data analysis
Artificial Intelligence
Sustainable development goals
Industry innovation and infrastructure
Sustainable cities and communities
hands
Get the code for this project
Get the code

Connect with the Development Code team and discover how our carefully curated open source tools can support your institution in Latin America and the Caribbean. Contact us to explore solutions, resolve implementation issues, share reuse successes or present a new tool. Write to [email protected]

Contact us
Pipeline flow diagram Pipeline flow diagram

The complete RoadScan processing flow diagram is shown, from image download to result consolidation.

Road segmentation and vehicle detection

The road segmentation and vehicle detection results using the SAM model on satellite imagery are shown.

Pavement anomaly detection

Detected pavement anomalies are shown, including potholes and stains, classified through HSV chromatic analysis.

Meta Segment Anything Model (SAM)

Meta AI image segmentation model used by RoadScan for vehicle and pavement detection.

See more
Pavimentados
Optimizing road maintenance and signaling with computer vision.

Transport
Geolocation
Image processing
UrbanPy
Simplifying urban data collection and analysis for effective planning.

Urban Development and Housing
Geolocation
Database management
Víasegura
Improving road safety with automatic problem detection.

Transport
Simulators
Artificial Intelligence
Congestiómetro
Improving urban mobility with real-time traffic analysis.

Transport
Geolocation
Distancia2
Using AI to improve the management of social distancing in pandemics.

Reform or Modernization of the State
Image processing
Artificial Intelligence
see all tools
hands
Deepen your knowledge on the implementation of tools in the public sector with our courses, guides and many other resources.
Be part of the community
Jump back to top