GeoRas2Vec model – scanned geological map → GIS polygons, faults and unit names

Research preview (v0.6). Code, installation and documentation: GeoRas2Vec on GitHub.

GeoRas2Vec turns a scanned or rasterised geological map into a GeoPackage that opens directly in QGIS or ArcGIS. The GeoPackage holds three things:

  • a polygon layer of geological units, with code, name, age and lithology when they can be read;
  • a line layer of faults;
  • the legend table, with default QGIS styles.

Unit names come only from text printed on the map and from its legend.

This repository holds the model files. The command-line tool downloads them automatically.

Real scanned maps

Files

file role
best_fp16.pt segmentation network (U-Net++ / EfficientNet-B4, RGB + Lab): 10 pixel affinities + fault map
naming_model.pkl scores (text read on the map, polygon) pairs
legend_ranker.pkl ranks the candidate codes of each polygon (text evidence, leader lines, legend swatch)
prop_model.pkl decides when a code read on the map can be propagated to polygons of the same colour
water_model.pkl recognises water / outside-the-map regions
exemple/ example output GeoPackage, legend CSV, QGIS render
training/ training curves and metrics of the network

The .pkl files are scikit-learn pickles: only load files from this repository.

Usage

git clone https://github.com/PerfectWin7777/georas2vec.git && cd georas2vec
pip install -r requirements.txt
python scripts/vectorize.py my_map.tif my_legend.csv my_map.gpkg

See the GitHub README for the legend CSV format.

Results (never seen during training)

Official test split

official test split large units small units map area in the correct polygon
real scans (78 tiles, USGS GMNA 300 dpi) 94.5 % 77.0 % 98.5 %
synthetic maps, 4 continents (60 tiles) 85.2 % 73.6 % 90.4 %

Faults: line-level F1 at 2 px is 0.80 on the real-scan test split and 0.85 on a held-out region.

Four continents

Names

End to end on a held-out 6144 × 6144 px region of the GMNA north sheet. Polygons and names are both predicted. The ranker and the propagation model were trained without this region.

area named names correct area correctly named
names from text only 65.9 % 94.1 % 62.0 %
+ colour propagation 74.7 % 93.7 % 69.9 %

Names

How it works

Geometry Names

Limitations

  • A unit whose code is never printed (or never readable) stays Unité non identifiée, with 3 suggestions.
  • Sibling units with almost identical colours (e.g. lK / K) cause most propagation errors.
  • Real-scan validation is so far on the USGS Geologic Map of North America. The other continents are evaluated on realistic renderings of official vector maps.
  • On sea and ice areas the map prints many texts that are not the unit's code: there GeoRas2Vec gives the right code as first suggestion instead of guessing.
  • On large maps, unnamed areas can show straight cuts at the 2048 px block edges.

Versions

version change
v0.6 English attribute table by default (--lang fr for French), age shown once, fragments < 200 px merged into their neighbours (3× fewer polygons), no colour propagation onto white paper / ice
v0.5 two-scale mutex watershed; fault lines split at junctions; topological contours (no gap, no overlap); water detection; OCR restricted to the legend alphabet; decoding of age prefixes, Ʀ, Є and superscripts; colour propagation over the whole map; block processing of large maps
v0.2 first public release (revision="v0.2")

The repository was renamed from PerfectWin/geocarto-model to PerfectWin/georas2vec-model (old links redirect).

Citation

Winter Tony, GeoRas2Vec: from scanned geological maps to vector units, faults and names, 2026 – GitHub. Please also cite the data sources listed in the dataset card.

Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train PerfectWin/georas2vec-model