Last updated
Share
Get started
CompVis
Map Features

Map Features in OpenStreetMap with Computer Vision

This Blueprint helps you use object detection and image segmentation models to identify and map features in OpenStreetMap. It includes code for running inference on satellite images, validating results, and submitting contributions to OSM. Additionally, it provides notebooks for training custom object detection models on new datasets, allowing you to detect objects beyond the default swimming pool detection setup.

If you encounter any issues with the hosted demo below, try the Blueprint in the Google Colab Notebook available here.

Hosted demo
Hosted Demo
Step by step walkthrough
Tools used to create

Trusted open source tools used for this Blueprint

Ultralytics

Ultralytics’ YOLO model detects objects and outputs bounding boxes.

SAM 2

SAM 2 refines the prediction by segmenting the object within the detected region.

Streamlit

Streamlit app demonstrates swimming-pool detection for OSM contributions

icon choices
Choices

Insights into our motivations and key technical decisions throughout the development process.

Focus
Decision
Rationale
Alternatives Considered
Trade-offs
Focus
Focus
Decision
Rationale
Alternatives Considered
Trade-offs
Overall Motivation
Overall Motivation
Build a local-friendly AI helper for OpenStreetMap.
Enhances community-driven mapping with AI while keeping human verification.
Using an API-based solution that leverages Visual LLMs.
Using local-friendly and non-transformer models requires training data and finetuning step. Some Visual LLMs provided some outputs ‘Out of the box’, but the results were poor.
Object Detection Model
Object Detection Model
Finetuned YOLOv11 by Ultralytics.
State of the art, open source model, easy to finetune.
Out of the box pre-trained models.
Finetuning requires gathering and preparing a dataset.
Segmentation Model
Segmentation Model
SAM2 by Meta.
When provided with an input bounding box, there is no need to finetune to segment the object of interest.
Finetuning a custom segmentation model.
The dataset gathered for object detection is not “exploited” for segmentation.
Dataset Creation
Dataset Creation
Used OSM’s Overpass API & Mapbox Static Tiles API.
Open APIs that are flexible and can be easily queried.
Use an existing dataset with the objects of interest.
Using the APIs requires code to post-process the downloaded data.
Inference Pipeline
Inference Pipeline
Object Detection: Segmentation; Human verification.
2-step computer vision improves accuracy. Human verification ensures quality control.
Fully-automated. 1-step computer vision.
2-step computer vision pipeline introduces additional complexity and dependencies.
Deployment Options
Deployment Options
Supports Codespaces, Google Colab, HF Spaces.
Flexible for diverse environments and compute needs.
Single-path setups like only local.
Maintaining multiple pathways adds complexity for updates and consistency.
Ready? Try it yourself!
icon extensions
Explore Blueprints Extensions

See examples of extended blueprints unlocking new capabilities and adjusted configurations enabling tailored solutions—or try it yourself.

Load more
Text Link
Federated AI
tags
Text Link
Image Segmentation
tags
Text Link
Object Detection
tags
Text Link
Automatic Speech Recognition
tags
Text Link
Speech-to-Text
tags
Text Link
Query structured documents Q&A
tags
Text Link
Emails
tags
Text Link
Newsletter
tags
Text Link
Podcast
tags
Text Link
Community
tags
Text Link
Events
tags
Text Link
Discord
tags
Text Link
Data Extraction
tags
Text Link
User-Interface
tags
Text Link
Performance Optimization
tags
Text Link
LLM Inference
tags
Text Link
Language Modelling
tags
Text Link
Text-to-Text
tags
Text Link
Text-to-Speech
tags
Text Link
LLM
tags
Text Link
Email
tags
Text Link
Podcast personalities
tags
Text Link
Document-to-podcast
tags
Text Link
Blueprints
tags
Text Link
Use Cases
tags
Text Link
English
tags
Text Link
General Language
tags
Text Link
Multilingual
tags
Text Link
Audio
tags
Text Link
Text
tags
Text Link
Finetuning
tags
Text Link
Local AI
tags
Text Link
Federated Learning
tags
Text Link
LLM Integration
tags