Skip to content

🚧 Road damage

Detection

In order to detect road damage based on Panoramax pictures, you can download them from a public API using panoramax_cli:

panoramax_cli download \
    --api-url https://panoramax.ign.fr \
    --user me \
    --path /path/to/downloaded/pictures \
    --file-name id \
    --external-metadata-dir-name meta \
    --quality sd

Info

You must set --file-name id and --external-metadata-dir-name meta for Prolix to work.

Then, run the road damage model with:

prolix run-model-road-damage \
    --tmp-path /path/to/tmp/folder \
    --parallel-tasks 2 \
    /path/to/downloaded/pictures \
    /path/to/model/results

Tip

Using a temporary folder kept between runs allows to stop and restart the detection without losing previous annotations. Also, adjust parallel-tasks according to your GPU capabilities.

At the end, you obtain a annotations_road_damage.geojson file, which contains individual annotations, ie each road damage visible on each picture. This means that a single road damage can be present in file multiple times if visible on multiple pictures. Also, the coordinates are the ones from original picture.

This file can be used for:

πŸ“Š Statistics

You can run the Road damage analyzer to get a more ready-to-use dataset:

  • With potholes positioned at their estimated real location (instead of picture original coordinates)
  • With all kind of damages projected over road network

After you ran prolix run-model-road-damage command, you had a annotations_road_damage.geojson file generated, which will be used as input of this analyzer. The analyzer also requires a GeoPackage or Shapefile of your road network. Any dataset containing Linestrings can be used.

Warning

You should split your roads before running the analyzer: if you want to have statistics over 10 meters road segments, please use any GIS software to cut your roads before. The analyzer doesn't split roads itself. Also, check out which CRS can be used for your area to get a precise buffering around roads (for example, EPSG code 2154 for Metropolitan France).

With your data ready, you can run the following command:

prolix analyze-road-damage \
    --epsg 2154 \
    --annotations-path /path/to/model/results/annotations_road_damage.geojson \
    /path/to/downloaded/pictures \
    /path/to/your/roads_network.gpkg \
    /path/to/analyzer/results

After processing, you end up with following files in your result folder:

  • road_damages.gpkg: your original road network, with 3 new columns alligator_crack, linear_crack, pothole, which counts how many damages have been located nearby each road segment. Note that pothole count is de-duplicated, whereas crack counts are not (they reflect how many times each type has been detected).
  • πŸ•³ pothole.geojson: separate file for de-duplicated pothole positions, with precisely estimated position. Position accuracy is set in position_accuracy column (either high or low in case a pothole was seen only in a single picture).
  • Various debug files can be enabled with --debug option:
    • ph_lines.geojson: projection as a line of each individual pothole detection. It's based on an estimated distance range, and according to direction of pothole in image.
    • ph_intersections_filtered.geojson: filtered crosses between lines of a same pothole, to keep only the ones with viable angles.
    • ph_clusters.geojson: groups of filtered intersections for each pothole. Clustering is based on distance.
    • ph_leftovers.geojson: original potholes detections not belonging to any cluster.

Info

The accuracy of these results directly depend on original pictures GPS precision. You can expect pothole positions around a meter if original pictures are RTK-positioned (few centimers precision). If you have a 5-meters precision on original pictures, you can expect a 5-10 meters precision.