osm-fr / osmose-backend

Part of osmose that runs the analysis, and send the results to the frontend.
GNU General Public License v3.0
92 stars 115 forks source link

detection of not mapped bicycle infrastructure with mapillary data #999

Closed masterofnoroad closed 4 years ago

masterofnoroad commented 4 years ago

Hello My idea is to use mapillary traffic sign recognition to find places with missing bicycle infrastructure in osm data. The idea was already implemented in Osmose for different purpose here:

https://lists.openstreetmap.org/pipermail/talk/2017-September/078792.html

It is simple: highlight places on the map that mapillary found traffic sign connected with bicycle and there is no bicycle data on the map.

In Poland we are experiencing boom in new bicycle infrastructure and alot of it stays not maped for long time. Unfortunately im not a programist and dont know how to do this on my own. Mybe someon could pick up this?

frodrigo commented 4 years ago

What a nice idea!

It does not require code, just a new section in this file: https://github.com/osm-fr/osmose-backend/blob/master/merge_data/mapillary-traffic-signs.mapping.json

Can suggest the new content, please?

masterofnoroad commented 4 years ago

Those are the traffic signs connected with bicycle infrastructure:

regulatory--bicycles-only--g1 regulatory--dual-path-bicycles-and-pedestrians--g1 regulatory--dual-path-pedestrians-and-bicycles--g1 regulatory--end-of-bicycles-only--g1 regulatory--end-of-dual-path-bicycles-and-pedestrians--g1 regulatory--end-of-dual-path-pedestrians-and-bicycles--g1 regulatory--end-of-mopeds-and-bicycles-only--g1 regulatory--end-of-shared-path-pedestrians-and-bicycles--g1 regulatory--end-of-shared-path-bicycles-and-pedestrians--g1 regulatory--mopeds-and-bicycles-only--g1 regulatory--motorcycles-and-bicycles-only--g1 regulatory--no-bicycles--g1 regulatory--shared-path-pedestrians-and-bicycles--g1 regulatory--shared-path-bicycles-and-pedestrians--g1 information--bicycles-crossing--g3 information--bicycles-crossing--g1 information--trail-crossing--g2

And we need to check for nearby tags: highway=cycleway bicycle=designated/yes cycleway=*

....and then will see how it works :D

Famlam commented 4 years ago

Something like this I guess? No clue about conflation. Notes:

  {
    "class": 000000000000000,
    "level": 2,
    "otype": [
      "ways"
    ],
    "conflation": 200,
    "title": "cycleway",
    "object": [
      regulatory--bicycles-only--g1,
      regulatory--end-of-bicycles-only--g1,
      regulatory--end-of-bicycles-only--g2,
      regulatory--dual-path-bicycles-and-pedestrians--g1,
      regulatory--end-of-dual-path-bicycles-and-pedestrians--g1,
      regulatory--dual-path-pedestrians-and-bicycles--g1,
      regulatory--end-of-dual-path-pedestrians-and-bicycles--g1,
      regulatory--dual-path-equestrians-and-pedestrians-bicycles--g1,
      regulatory--mopeds-and-bicycles-only--g1,
      regulatory--end-of-mopeds-and-bicycles-only--g1,
      regulatory--shared-path-pedestrians-and-bicycles--g1,
      regulatory--end-of-shared-path-pedestrians-and-bicycles--g1,
      regulatory--shared-path-bicycles-and-pedestrians--g1,
      regulatory--end-of-shared-path-bicycles-and-pedestrians--g1,
      regulatory--motorcycles-and-bicycles-only--g1,
      regulatory--bicycles-and-buses-only--g1
    ],
    "select_tags": [
      {
        "highway": "cycleway"
      },
      {
        "highway": null,
        "bicycle": "designated"
      },
      {
        "highway": null,
        "cycleway": "track"
      },
      {
        "highway": null,
        "cycleway": "opposite_track"
      },
      {
        "highway": null,
        "cycleway:right": "track"
      },
      {
        "highway": null,
        "cycleway:left": "track"
      },
      {
        "highway": null,
        "cycleway:both": "track"
      },
      {
        "highway": null,
        "bicycle_road": "yes"
      },
      {
        "highway": null,
        "cyclestreet": "yes"
      }
    ],
    "generate_tags": {}
  },
frodrigo commented 4 years ago

It looks promising Please, can you review this results Analyser_Merge_Traffic_Signs-switzerland_valais.geojson.zip

Famlam commented 4 years ago

Checked them:

  1. OK: map & image -> cycleway, not yet drawn on the map
  2. OK: map & image -> shared foot-and-cycleway with sign => highway=path and/or bicycle=designated expected, footway and bicycle=yes found
  3. OK: map & image -> mini mandatory foot/cycleway around bus stop. I wouldn't have drawn such small ways in myself though, but it's technically correct
  4. FAIL: map & image -> Duplicate of nr 2
  5. OK: map & image -> shared foot/cycleway marked as footway only
  6. OK: map & image -> (same way, but 100m further; new signs, hence not really a false positive)
  7. FAIL: map & image -> Mapillary false positive in the detection
  8. Likely OK: map & image -> shared foot/cycleway marked as highway=track (can't read what's written under the sign). Should be highway=path + bicycle=designated or such.
  9. OK: map & image -> foot/cycleway marked as residential road
  10. OK: map & image -> Incorrectly tagged cycleway=lane: should be cycleway=track (or bicycle=designated on a separate way).
  11. OK: map & image -> marked as cycleway=lane rather than cycleway=track
  12. OK: map & image -> marked as unclassified rather than mandatory way for cyclists & pedestrians
frodrigo commented 4 years ago

Thank you.

Regarding nr. 2/4 (duplicates of the same traffic sign, same position) : would it help to increase conflation to "merge" them in a single entry? (Or what does conflation mean...?)

No, we cannot avoid this. The distance is not a clustering distance but a conflation between Mapillary data and OSM object.

Famlam commented 4 years ago

Ah, well, I can live with that :). (Having multiple reports of the same object is also the case for the other Mapillary tests)

masterofnoroad commented 4 years ago

one question:
it will be integrated with all not mapped max speed limits? or it will be possible to filter the results to show only cycle infrastructure?

Im asking because there is so many not mapped speed limits that it will be hard to find the missing bicycle infrastructure spots. The best would be separate entry.

Look at this and try to find missing bicycle infrastructure pin :)

Captura de pantalla 2020-10-13 a las 18 15 31
frodrigo commented 4 years ago

Need some code, but can be done.

masterofnoroad commented 4 years ago

would be worth it, to have good tool... For me speed limits and bicycle infrastructure are totally separate problems, they are linked just through sign recognition. And I think cyclists are non really interested in speed limits (I am not as a cyclist so will not spend my time on it).

Famlam commented 4 years ago

would be worth it, to have good tool...

Meanwhile, as soon as the fix is live, http://osmose.openstreetmap.fr/en/errors/?country=netherlands_gelderland&limit=2500&item=8300&level=1%2C2%2C3 might help (of course, select the region of your interest). Here you can click on the count of the respective issue (rightmost column) to get all of the cycle warnings.

frodrigo commented 4 years ago

Please review pre-result http://osmose.openstreetmap.fr/en/errors/?item=8470&level=1%2C2%2C3&useDevItem=all

Famlam commented 4 years ago
frodrigo commented 4 years ago

Publicly enabled.

YaroShkvorets commented 4 years ago
  • Only possibly worrysome one is the US "bicycle lane" sign (example), which is regulary detected by Mapillary as a cycleway sign, rather than a cycle lane. But it's not that common it seems.

Can confirm that 100% of warnings of this type where I live are false-positives. Checked about 30 of those in Ottawa, Canada and every one of them is a bad detection like this.

image

Maybe this sign detection can be turned off for North America?

frodrigo commented 4 years ago

Yes we can disable the traffic sign for NA, but can also be reported as false positive to Mapillary. But the Osmose -> Mapillary link for false positive is not done. cc @cbeddow