AI-Assisted Road Tracing

From OpenStreetMap Wiki
Jump to: navigation, search


In 2016, Facebook started researching how various machine learning algorithms could be integrated into a mapping workflow. At State of the Map 2016 Facebook shared initial results on how one could use AI and new mapping techniques, such as advanced deep neural net models, to detect roads from satellite imagery. We have since received many requests to share our process and masks. Our goal is to collaborate with the OpenStreetMap community to create quality road data, validated by trained mappers and local OSM communities. Please send questions to

DigitalGlobe's Vivid+ product provides high-resolution (50cm / pixel, or zoom 18) color-corrected cloud-free satellite imagery with full country coverage. We now have license to extract road data from the imagery and contribute to OSM.

The following images show the benefits of using current high-resolution imagery. For example the quality of satellite image currently available to the OSM community for Mu Ban Don Sak Thani, Thailand is not optimal for mapping.

Mu Ban Don Sak Thani of Thailand. Vivid+ on left, Bing Aerial on right, at zoom 14, which is Bing Aerial's max zoom for the city.

Figure 1.png

The full resolution goes to zoom 18.

Figure 2.png

Another example of Ko Samui where Bing has zoom 18 but it's heavily covered by clouds.

Figure 3.png


Partnering with the local OSM communities, we will start testing our submission in Thailand in February 2017. Depending on the progress, we will expand our effort to Indonesia and Malaysia during the year. We chose these countries because of their relative low road coverage on OSM.

Update - November 2017

We have been mapping in Thailand since May 2017. Here are our Stats since.

26 of 79 Provinces Completed

5,588 of 17,574 Tasks Completed

201,992 New Ways Added

101,104  km’s of Road Added

2,764,716 Nodes Added

Figure 4.png

Update - February 2018

44 of 79 Provinces Completed

10,235 of 17,574 Tasks Completed

354,936 New Ways Added

150,188  km’s of Road Added

Road Density Change from Start to Now (Feb 2018)

Road Density.png

Density change.gif

Road Density Change from June 1st 2017, to December 21st 2018

79 of 79 Provinces Completed

Stats for total project length (including community contributions during the time frame)

956,381 New ways added

515,306 km's of roads added

Data Processing

Road Extraction

We will only contribute roads to OSM. We use the latest deep learning algorithms to assist road extraction and mapping. Here is an example of a prediction using deep learning for an area in Thailand.

Data Processing Image Example.png

Data Processing Image Example 2.png

We then apply a series of post processing steps to generate .osm file that can be loaded into JOSM or our modified iD for manual correction and enhancement. The images below show the .osm file in our iD, where the grey road is an existing road on OSM, and green roads are new.

Data Processing Image Example 3.png

Data Processing Image Example 4.png

Submission Process

The submission process consists of the following steps summarized in the image below.

Project Workflow.png

(1) We use the OSM Tasking manager to divide up tasks and create a flow of editing and validation for the Facebook mapping team.

(2) The Mapper picks a task and loads an .osm/.xml file generated from the post processing step into our enhanced version of iD (this includes both the roads generated by us and the current OSM data).

(3) The Mapper evaluates the roads we generated (styled in a different color) and inspect them for issues like crossing highways, disconnected roads, incorrect intersections, short road stubs, road types, etc., and fixes these issues manually one by one, using DigitalGlobe satellite imagery.

(4) Our modified iD tool is equipped with data validation functionalities similar to JOSM and osmlint. This allows us to check for quality and conflicts with current OSM data prior to submission. Some examples of what we check for include:

  • Isolated roads that are not connected to rest of the map.
  • Roads crossing waterways.
  • Roads with repeating node IDs.
  • Roads with possible connections after a short extension.
  • Self-intersecting ways.

You can watch the video example of the various data integrity editing features here.

(5) In case of conflicts between our newly added roads and other OSM contributors' changes, our mappers will almost always choose “keep their edits.” If we end up changing another mapper's edits, (for example, to align better with the latest version of DG satellite imagery) we will leave detailed notes to explain why. 

(6) Until all errors are fixed, Mappers will not be able t upload to OSM. Here is an example of a highlighted issue prompting the mapper to fix it.

(7) After fixing all the issues detected in the iD tool, the Mapper clicks the “Save local” button to save their edited roads locally for validation.

(8) A Validator then goes into the same task to verify that the data looks correct by re-validating the data, makes necessary changes as needed, and clicks “Submit” to finally upload the task to OSM. 

(9) The Validator then conducts a post-submission review of the submitted edits in JOSM. If any errors are detected, the validator addresses the errors and submits necessary changes. A custom JOSM paint style is used to help distinguish our submissions from community submissions, so that all roads with the import=yes tag are highlighted in green. Some examples for what we check for include: 

  • Short Unclassified ways (between 10-60 meters)
  • Highway crossing waterway without a bridge tag
  • Highway crossing buildings
  • Overlapping ways
  • Unspecific highway tags

(10) We will continue to watch all comments made on our edits, reply to them in a timely fashion. We are happy to incorporate feedback and local expertise into our validation process and future mapping behaviors. 

Data Preparation

Road Type Tagging

During the submission process, our mappers will assign and fix road types according to the general highway tag guidelines of OSM

Before moving to a new location, we will work with mappers from local OSM community in each country to verify our highway tagging method and make sure they align with local conventions.

Some other methods we use to tag roads include:

  • Refering to local Wiki guides for each country.
  • Looking at commonly used tags in the local area of mapping.
  • When connecting to current OSM roads on the map we try to use the same tag where it makes sense to do so.
  • Refering to local community for advice.

Changeset Tags

We use the following tags:

Changeset Tags:

We use the above changeset tags in every import changeset, where the '#country' tag is the country of the submission. For Thailand the tags are '#nsroadimport #thailand'.

Element Tags:

  • source = digitalglobe
  • import = yes

The 'source' tag indicates that road geometries are based on DigitalGlobe satellite imagery.

Data Merge Workflow

Team Approach

This import (data integration) will be done through a Tasking Manager, by engineers and a group of selected trained map editors. Among the skills required:

  • Good experience with iD and JOSM.
  • Familiarity with editing norms: how to merge nodes (M), join ways (J), combine ways (C) and un-glueing (G)
  • S/he knows how to handle conflicts with both iD tool and JOSM.

The map editing team consists of Mappers and Validators, and their accounts are listed as below.

Mappers: Jaclyn VLD001 (not active), Annie VLD002 (not active), Alexandra VLD003 (not active), Sheffield VLD004 (not active), Mei VLD005 (not active), Joseph VLD006 (not active), Kurt VLD007 (not active), Pablo VLD008 (not active), Klavdija VLD010 (not active), Michael VLD011 (not active), Paris VLD012 (not active), Kailei VLD013 (not active), Jen VLD014 (not active), Joseph VLD015 (not active), Gemma VLD016, Rena VLD017, Lena VLD018 (not active), Elizabeth VLD019 (not active), Tina VLD020, Elena VLD050 (not active), Gerum VLD052, Linzi VLD053, Ryan VLD054, Yonis VLD055 (not active), Luxinaree VLD056 (not active), Katalin VLD057 (not active), John VLD058 (not active), Nick VLD059, Jesspher VLD062, Guowei VLD063, Alayna VLD025 (not active), Maureen VLD026, Ismael VLD028 (not active), Sophie VLD030, Dylan VLD032, Savanna VLD033 (not active), Christina VLD034 (not active), Katherine VLD035, Jacob VLD039, Rowen VLD040, Mike VLD041, Jonathan VLD042, Haley VLD043, Casey VLD044 (not active), Ming VLD066, Jacob VLD067, Derrick VLD070, Bala VLD100, Narendar VLD109, Samba VLD117, Sandeep VLD118, Shakil VLD119, Teesta VLD124, Gunapati VLD126, Nayani VLD127,

Validators: Zvone RVR001, David RVR003 (not active), Adrian RVR005 (not active), Stefani RVR006 (not active), Mohamed RVR007 (not active), Ian VLD023, Louis VLD027, Olympia VLD036

QA: Jeff RVR002, Yunzhi RVR004, Charmaine RVR012, Yoko VLD009 (not active), Sam RVR009 (not active)

We are not bots :) The usernames (VLD001, RVR001, etc.) were made to help our internal process where we have paired Mappers and Validators to ensure quality. Please feel free to send us questions individually about edits or email all of us at

Sub-contracted Teams

Humanitarian OpenStreetMap Team (HOT)

For mapping Indonesia, Facebook has subcontracted to HOT employees, as they have an office in Jakarta; in order to better coordinate with the local community and improve the road network of Indonesia. The team is comprised of:

Wulan IRM-RV, Team Lead Adiatma IRM-RV, QA Hanif IRM-RV, QA Yeni IRM-RV, QA Akrimullah IRM-RV,QA Adam IRM-ED, Mapper Silvia IRM-ED, Mapper Dary IRM-ED, Mapper Irwan IRM-ED, Mapper Riyadi IRM-ED, Mapper Zainab IRM-ED, Mapper Deo IRM-ED, Mapper Anisa IRM-ED, Mapper atmahadi IRM-ED, Mapper Dennis IRM-ED, Mapper Fatri IRM-ED, Mapper Muty IRM-ED, Mapper Iko IRM-ED, Mapper Aglis IRM-ED, Mapper Diana IRM-ED, Mapper Fadlilaa IRM-ED, Mapper Aude IRM-ED, Mapper (not active) Arma IRM-ED, Mapper Elisabeth IRM-ED, Mapper Diah IRM-ED, Mapper Dorica, Team Lead Gwantwa, QA Dorice, QA Jamal, Mapper Mariamu, Mapper Nuru, Mapper Account Samwel, Mapper Charles, Mapper Abou, Mapper Christina, Mapper Edger, Mapper Aron, Mapper Erasto, Mapper Asibwene, Mapper Godfrey F, Mapper Janet, Mapper Catherine, Mapper Damon, Mapper Furaha, Mapper Godfrey H, Mapper Neema, Mapper


Following the imports guidelines, these imports will be discussed first in the country specific mailing list, and to get more feedback it will also be shared with the import list.


In summary, the overall mapping workflow is:

(1) Extract grey-scale road mask images from high resolution DigitalGlobe satellite imagery.

(2) enerate road vectors based on the road mask images and merge them with latest OSM data to produce .osm files.

(3) The human mapping team does manual validation on the .osm files through our enhanced iD tool and on JOSM prior to submission (as described in the “Submission Process” above).

(4) After conflict resolution, submission, and post-submission review, work with local OSM community to complete local validation as described in the “Validation Steps” below.

Validation Steps

There will be a 4 steps validation process done by experienced OSM editors including local country Mappers.

  • Our method for each country will include starting with small number of edits to gather feedback from the local OSM community before proceeding with larger edits.
  • We then start with human validation from our Mappers as explained in the “Submission Process.”
  • Before submitting our changes, our team will verify that our updates are based on the current dataset.
  • After Submission (as described in the “Submission Process” above, a team of selected Validators and QA's conduct a second post-submission review by passing over chunks of multiple submitted tasks , region by region, by repeating the JOSM validation checks in described in Step 9 under “Submission.”
  • Our validation process primarily only includes elements that our team has contributed, which can be identified by the “import=yes” tag. Elements that our team “inherits,” meaning elements that are authored by one of our usernames but lacking the “import=yes” tag, are not typically included in post-submission validation. For more about inheritance, see footnotes.
    • We understand inherited versus contributed elements by exploring the ownership of nodes and their parent ways. We can identify inheritance based on authorship and tagging. Roads that are authored by one of our usernames, but does not include the Import=yes tag, is likely an inherited way. Because we are a team of remote mappers, using one data source, we want to avoid overstepping our contributions.
  • Community feedback on imported roads is evaluated and incorporated for final edits in this stage as well. All edits can be identified with the changeset tags above and the team will respond to any e-mails or concerns about edits within 48 hours.

To facilitate the validation process, we share our road mask as a tile service that can be used in iD tool and JOSM as a background layer. The URL template of the tile service is distributed on a per-request basis. Please contact for requesting a validated URL template.

So far we have prepared road masks for selected areas in Egypt and Thailand. We will announce the availability for other countries here as they become ready.

Local OSM Community Engagement - Using the list servers and wikis we contact local OSM community members before starting to edit in a specific country. Through this we invite members to collaborate and provide valuable local insight and feedback.

Legal terms of use for our tile service: see Media:FacebookRoadMaskLicense.pdf. Information regarding DigitalGlobe Imagery: DigitalGlobe confirms the above stated license grants pertaining to DigitalGlobe satellite imagery are accurate.

To use our tile service in iD:

(1) Click the “Edit custom background” button in iD

Legal terms of use for our tile service 1.png

(2) Paste the URL template above in the input box of the pop-up dialog and click “OK”

Legal terms of use for our tile service 2.png

To use our tile service in JOSM:

(1) Click Imagery > Imagery Preferences dialog

(2) In the Imagery providers tab, in the lower right hand side of the dialog box, click on “+TMS” button

Legal terms of use for our tile service 3.png

(3) Enter the URL template in the input box and provide a name for the new layer

Legal terms of use for our tile service 4.png

(4) Once added, this new layer will show up under the Imagery list. You can select this layer to be displayed in JOSM

Legal terms of use for our tile service 5.png