Skip to content

πŸ…ΏοΈ Traffic signs

Detection

In order to detect and classify traffic signs 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 traffic signs model with:

prolix run-model-traffic-signs \
    --tmp-path /path/to/tmp/folder \
    --parallel-tasks 2 \
    --country FR \
    /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_traffic_signs.geojson file, which contains individual annotations, ie each traffic sign visible on each picture. This means that, at this stage, a single traffic sign 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:

Finer positioning

You can run the Traffic signs analyzer to get a more precise traffic signs dataset:

  • With duplicated signs grouped as best as possible
  • With signs positioned at their estimated real location (instead of picture original coordinates)

Depending on how you obtained the annotations, you can use a different command.

If you downloaded pictures with existing annotations from Panoramax server (ie passed through OSM France blurring API), you can run:

prolix analyze-traffic-signs \
    --country FR \
    /path/to/downloaded/pictures \
    /path/to/analyzer/results/

If you downloaded pictures without annotations from Panoramax server, but you have run the prolix run-model-traffic-signs before, you can run with your annotations_traffic_signs.geojson file:

prolix analyze-traffic-signs \
    --country FR \
    --annotations-path /path/to/model/results/annotations_traffic_signs.geojson \
    /path/to/downloaded/pictures \
    /path/to/analyzer/results

In all cases, you end up with several GeoJSON files in your result folder:

  • tfsigns.geojson: the final clean traffic signs dataset
  • And various debug files:
    • 0_lines.geojson: projection as a line of each individual sign detection. It's based on an estimated distance range, and according to direction of sign in image.
    • 1_intersections.geojson: crosses between lines of a same sign category.
    • 2_intersections_filtered.geojson: filtered crosses between lines of a same sign category, to keep only the ones with viable angles.
    • 3_clusters.geojson: groups of filtered intersections for each sign category. Clustering is based on distance.
    • 4_leftovers.geojson: original signs detections not belonging to any cluster.

Info

The accuracy of these results directly depend on original pictures GPS precision. You can expect traffic sign 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 for traffic signs.

Output data format

The tfsigns.geojson file is a classic GeoJSON Feature Collection. Each feature corresponds to a single sign, with a Point geometry. They have the following properties:

Property Description
id Incremental identifier for the sign (not stable).
object_size_meter The sign estimated size, in meters.
object_size_meter_sd The sign estimated size standard deviation.
object_azimuth The sign heading, in degrees.
nb_pictures_visible Number of pictures this sign was visible on.
position_accuracy Indicator of precision of coordinates. high means sign was seen on many pictures at different angles. average means sign was seen on several pictures but not at different angles. low means picture was seen on a single picture.
picture_id The nearest Panoramax picture UUID (offering the best view of this sign).
picture_collection_id The sequence UUID of the nearest picture.
picture_timestamp The timestamp (in ISO format) of the nearest picture.
annotation_id Either the Panoramax Annotation ID (if the annotation comes from Panoramax) or ID of the Prolix annotation (if generated in the detection process).
traffic_sign_code The traffic sign code, using OSM syntax (example: FR:B14[50]).
traffic_sign_confidence The sign classification confidence (between 0 and 1, 1 means 100% confidence).
annotation_xywh The position of sign in associated Panoramax picture.
pnx_url Direct URL to display sign in Panoramax website.
sign_label A human-readable description of the sign.
sign_svg URL to a SVG icon representing this sign (from Wikimedia Commons).
sign_png_320 URL to a 320px-wide PNG icon representing this sign (from Wikimedia Commons).

Info

nb_pictures_visible and position_accuracy are good indicators for filtering out your traffic signs: if you want to keep only strongly confident signs, only keep the ones with nb_pictures_visible >= 2 and position_accuracy = high/average.