All projects

Offline geolocation from a map screenshot

OCR, a gazetteer and a road graph instead of cloud services

Locates a map screenshot within a hard 15-second budget, fully offline. When the evidence is thin, it honestly answers with a region or "unresolved" instead of a confident mistake.

Verifiable decisions

  1. Map labels alone never produce an exact point. The answer is a region, a street with a radius, or "unresolved".

    code

  2. In a local run on 2026-09-18, p95 was about 750 ms against a 15-second budget.

    measured run

In detail

The job

Given a map screenshot, find the place within a hard 15-second budget, with no network and no cloud services.

How it works

ONNX-based OCR reads the labels, a world gazetteer finds candidates, and country hints are combined. Each candidate is then checked against the OpenStreetMap road graph: road names and numbers near the point, plus junction topology taken from the screenshot. Indexes live in SQLite with full-text search and R-trees, so a graph query takes milliseconds.

Honest uncertainty

Text alone never yields an exact point. The answer is a region, a street with a radius, or “unresolved”. An honest region beats a confident mistake.

What is measured and what is not

Latency in a local run on 2026-09-18: p50 about 560 ms, p95 about 750 ms against a 15-second budget. Accuracy is not published: it needs a benchmark on real labelled screenshots, which does not exist yet.

Data: GeoNames (CC BY 4.0) and OpenStreetMap (ODbL).

All projects