Accurate and complete geographic data of human settlement is crucial for humanitarian aid and disaster response. OpenStreetMap (OSM) can serve as a valuable source, especially for global south countries where buildings are largely unmapped. In a previous blog, we introduced our recent work in detecting OpenStreetMap missing buildings, so this time we will show you a walkthrough on how to train your own building detector using ohsome2label and the TensorFlow Object Detection API. You can find all the necessary scripts and detailed walkthrough tutorials in our GitHub repo.
The open-source package ohsome2label offers a flexible framework for labeling customized geospatial objects (e.g., buildings) using OSM data and satellite imagery, which aims to mitigate the lack of abundant high-quality training samples in geospatial deep learning by automatically extracting customized OSM historical features.
By integrating various satellite imagery APIs, ohsome2label enables seamless training with the-state-of-art deep learning framework (e.g., Tensorflow) via providing standard training data, for instance the Microsoft COCO JSON format. In this walkthrough, we demonstrate how one can easily acquire the OSM training data for a building detection model.
Fig.1: Preview of OSM training samples generated by ohsome2label.
Once the training data is prepared, there will be diverse base models in the Tensorflow model zoo that one can fine-tune to detect buildings in almost any area. In the walkthrough, an example of the fine-tuned model was trained and evaluated for the rural Kalola area, in Tanzania. Moreover, we’ve created utility scripts to easily transform the building detection results into vector data with detailed geographical coordinates, with which one can do further GIS analysis.
Fig.2: Predicted building geometries compared to OSM data.
With the ongoing DeepVGI project, the method shown in the walkthrough has been implemented to identify missing OSM buildings in several selected countries, for example, India, Tanzania, and Mozambique. For more details, you are welcome to explore our MissingOSM maps to see where do we need to map in OpenStreetMap next?
Fig.3: MissingOSM maps: where do we need to map in OpenStreetMap next?