AI-Assisted Road Tracing
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 email@example.com.
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.
The full resolution goes to zoom 18.
Another example of Ko Samui where Bing has zoom 18 but it's heavily covered by clouds.
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
3. Data Processing
We will only contribute roads to OSM. We use the latest deep learning algorithms to assist road extraction and mapping. Here is an example prediction result using deep learning for an area in Thailand.
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. This image shows the .osm file in our iD, where the grey road is an existing road on OSM, and green roads are new.
The submission process consists of the following steps:
(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 it for issues like crossing highways, disconnected roads, incorrect intersections, short road stubs, road types, etc., and fix these issues manually one by one, using DigitalGlobe satellite imagery background.
(4) Our iD is equipped with data validation functionalities similar to JOSM and osmlint. This allows us to check for quality and conflicts with current OSM data. 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.
(5) In case of conflicts between our newly added roads and other OSM contributor's changes, our mapper will almost always choose “keep their edits.” If we think our newly added roads are better aligned with the latest version of DigitalGlobe satellite imagery, we'll contact the other Mapper offline to reach resolution. If we end up changing other Mapper's edits, we will leave detailed notes to explain why.
(6) Until all errors are fixed mappers will not be able to save. Here is an example of a highlighted issue prompting the mapper to fix it.
(7) After fixing all the issues detected, our mapper clicks the “Save Local” button in iD to save their edited roads locally for validation.
(8) A Validator then goes into the same task to verify that the data looks correct, makes necessary changes as needed and clicks “Submit” to finally upload the tile to OSM.
(9) We will continue to watch all comments made on our edits and reply in a timely fashion. We are happy to incorporate feedback and local expertise into our validation process and future mapping behaviors.
4. 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 http://wiki.openstreetmap.org/wiki/Key:highway
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:
- 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
- Refer to local Wiki guides for each country
- Refer to local community for advice
comment = '#nsroadimport #country'
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'.
source = digitalglobe
import = yes
The road geometries are based on DigitalGlobe satellite imagery, hence the value of the 'source' key.
5. Data Merge Workflow
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.
- Skilled working with highways. It's needed to know well how to merge nodes (M), join ways (J), combine ways (C) and unglueing (G).
- S/he Knows how to use the Download Along plugin (Alt+Shift+D).
- S/he knows how to deal with conflicts with both iD and JOSM.
Our map editing team consists of 17 Mappers and Validators, and their accounts are listed as below.
Mappers: Jaclyn VLD001 (not active), Annie VLD002 (not active), Alexandra VLD003, Sheffield VLD004 (not active), Mei VLD005 (not active), Joseph VLD006, Kurt VLD007, Pablo VLD008, Yoko VLD009, Klavdija VLD010 (not active), Michael VLD011, Paris VLD012, Kailei VLD013, Jen VLD014, Joseph VLD015
QA: Sam RVR009
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 firstname.lastname@example.org.
In summary, our overall mapping workflow is:
(1) We extract grey-scale road mask images from high resolution DigitalGlobe satellite imagery.
(2) We generate road vectors based on the road mask images and merge them with latest OSM data to produce .osm files.
(3) Our human mapper team does manual validation on the .osm files through iD as described in the “Submission Process” above.
(4) After conflict resolution, submission, and post-submission review, we work with local OSM community to complete local validation as described in the “Validation Steps” below.
6. Validation Steps
There will be a 4 steps validation process done by experienced OSM editors including local country mappers.
- We start with human validation from our Mappers as explained in the Submission Process.
- Before submitting our changes, our team will verify to make sure updates are based on the current dataset.
- 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.
- 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. Here is an example of how our road mask tiles look like. Please note that it does not include the high resolution satellite imagery, but only the derived road masks. The URL template of the tile service is distributed on a per-request basis. Please contact email@example.com 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.
To use our tile service in iD:
(1) Click the “Edit custom background” button in iD (example screenshot)
(2) Paste the URL template above in the input box of the pop-up dialog and click “OK” (example screenshot)
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 (example screenshot)
(3) Enter the URL template in the input box and provide a name for the new layer (example screenshot)
(4) Once added, this new layer will show up under the Imagery list. You can select this layer to be displayed in JOSM (example screenshot)