--- pretty_name: PolyTopoBench license: - odbl - cc-by-4.0 task_categories: - image-segmentation - object-detection tags: - remote-sensing - aerial-imagery - geospatial - polygon - vectorization - building-footprint - land-cover - topology size_categories: - 100K/*.tif # 512×512 RGB patches, grouped by city │ ├── splits.csv # patch → split, source tile, patch origin │ └── building/{train,val}.{json,parquet} # annotations (COCO JSON and GeoParquet) ├── deventer/ │ ├── images/{train,val}/*.png # 512×512 RGB patches, shared by all three tasks │ ├── splits.csv # patch → split, upstream image id │ └── {road,vegetation,unvegetated}/{train,val}.{json,parquet} └── raw/ # source data before patch extraction (optional) ├── inria/ │ ├── train/images/*.tif # 180 Inria tiles, 5000×5000 │ ├── train/gt/*.tif # official Inria binary masks (not the PolyTopoBench ground truth) │ └── raw/train/gt_polygonized/*.geojson # full-tile vector ground truth (OSM-aligned, manually corrected) └── deventer/{train,val}/ ├── images/*.png # same images as deventer/images ├── masks/*.png # multi-class masks (values 0–4) └── annotations/{building,road,vegetation,unvegetated,water}.json # upstream per-class COCO ``` ### Which files do I need? | Use case | Download | Size | |---|---|---:| | Evaluate your method on the validation sets | `inria/**/val*`, `deventer/**/val*`, `tasks.json` | ~3 GB | | Train and evaluate your method | `inria/`, `deventer/`, `tasks.json` | ~13 GB | | Re-tile Inria, run Frame Field Learning, or work with Deventer building/water | add `raw/` | +14 GB | ```python from huggingface_hub import snapshot_download # Benchmark data only (recommended) snapshot_download( repo_id="PingL/PolyTopoBench", repo_type="dataset", local_dir="PolyTopoBench", allow_patterns=["tasks.json", "inria/*", "deventer/*"], ) ``` Add `"raw/*"` to `allow_patterns`, or drop `allow_patterns`, to download everything. ## Annotation format Every task split is provided in two equivalent formats. They contain the same polygons, point for point. ### COCO JSON (`/.json`) The files follow the COCO layout (`images`, `annotations`, `categories`). Each task has a single category with `category_id = 100`. Image `file_name` is relative to `/images//`, for example `austin/austin1-x0000-y0000.tif`. > **Important: holes are encoded differently from standard COCO.** `segmentation` is a list of rings `[exterior, hole_1, hole_2, ...]`. Ring 0 is the exterior boundary and every further ring is a **hole** of that exterior. Standard COCO tools such as `pycocotools` treat multiple rings as a union of parts, so they will **fill the holes**. Build geometries yourself as shown below. Each ring is a flat list `[x1, y1, x2, y2, ...]` in pixel coordinates of the 512 × 512 patch (origin at the top-left, y pointing down), closed so that the first point is repeated at the end. Each annotation is one polygon. ```python import json from pathlib import Path from PIL import Image from shapely.geometry import Polygon root = Path("PolyTopoBench") coco = json.loads((root / "inria/building/val.json").read_text()) def to_polygon(segmentation): rings = [list(zip(r[0::2], r[1::2])) for r in segmentation] return Polygon(rings[0], rings[1:]) # exterior, holes image_info = coco["images"][0] image = Image.open(root / "inria/images/val" / image_info["file_name"]) polygons = [to_polygon(a["segmentation"]) for a in coco["annotations"] if a["image_id"] == image_info["id"]] ``` ### GeoParquet (`/.parquet`) One row per polygon, with the columns `annotation_id`, `image_id`, `file_name`, `category`, `area`, `hole_count`, and `geometry`. `geometry` is a WKB `Polygon` whose first ring is the exterior and whose remaining rings are holes. Coordinates are in pixels and no CRS is set. The files open directly in GeoPandas: ```python import geopandas as gpd gdf = gpd.read_parquet("PolyTopoBench/deventer/road/val.parquet") gdf[gdf.hole_count > 0].head() ``` ### Splits and task registry - `inria/splits.csv` lists every patch with `file_name, image_id, split, city, source_tile, x0, y0`. `source_tile` and the pixel offset `(x0, y0)` locate the patch inside its 5000 × 5000 Inria tile. - `deventer/splits.csv` lists every patch with `file_name, image_id, split, raw_image_id`. `raw_image_id` is the image id in the upstream Deventer-512 annotations. - `tasks.json` lists, for each task and split, the image directory, the annotation files with their SHA-256 checksums, and the image, instance and hole counts. `image_id` values are contiguous from 1 within each split. The three Deventer tasks share the same images and the same `image_id` values. ## Evaluation and baselines The unified evaluator, baseline wrappers and the scripts that convert this release into each baseline's native input format are in the [code repository](https://github.com/seai-lab/PolyTopoBench). The evaluator scores exterior geometry, interior-ring recovery and full ring topology; see the paper for the metric definitions. ## Construction details **Inria building.** Vector ground truth was built by aligning OpenStreetMap building footprints to the 180 training tiles of the [Inria Aerial Image Labeling dataset](https://project.inria.fr/aerialimagelabeling/) (Austin, Chicago, Kitsap County, Western Tyrol, Vienna), manually correcting residual mismatches, and restoring interior rings from the official raster masks. The full-tile result is in `raw/inria/raw/train/gt_polygonized/`. - Tiles are split by city, 80/20: in each city, 29 tiles go to train and 7 to validation. - Each tile is cut into a 10 × 10 grid of 512 × 512 patches. The last row and column start at pixel 4488, so they overlap their neighbours. - Polygons are clipped to each patch, and clipped parts whose bounding box is 5 px or less on a side are removed. - Training patches without buildings are dropped. All validation patches are kept, including 512 without buildings. **Deventer land cover.** The Deventer tasks use the road, vegetation and unvegetated classes of [Deventer-512](https://huggingface.co/datasets/HeinzJiao/Deventer-512). The upstream validation and test splits are merged into the PolyTopoBench validation split. Image ids are renumbered contiguously; `deventer/splits.csv` maps them back to the upstream ids. 292 Deventer polygons (0.65%), mostly with self-touching rings, are not valid under the OGC simple-feature rules. They are kept as released upstream so that the benchmark ground truth stays unchanged. ## License This dataset combines sources with different terms; see [LICENSE.md](LICENSE.md) for the file-by-file breakdown. - **Inria vector annotations** are derived from OpenStreetMap and are released under the [Open Database License (ODbL) 1.0](https://opendatacommons.org/licenses/odbl/1-0/). © OpenStreetMap contributors. - **Inria imagery and official masks** come from the [Inria Aerial Image Labeling dataset](https://project.inria.fr/aerialimagelabeling/), which is built from public-domain imagery and building footprints. Please cite Maggiori et al. (2017). - **Deventer-512 imagery and annotations** are released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/), following the [upstream release](https://huggingface.co/datasets/HeinzJiao/Deventer-512). ## Citation ```bibtex @misc{liu2026polytopobenchbenchmarkcomplexvector, title={PolyTopoBench: A Benchmark for Complex Vector Polygon Generation from Remote Sensing Imagery}, author={Zeping Liu and Ni Lao and Weiwei Sun and Gil Wolff and Yiqun Xie and Liang Zhao and Junfeng Jiao and Gengchen Mai}, year={2026}, eprint={2609.32856}, archivePrefix={arXiv}, primaryClass={cs.CV}, url={https://arxiv.org/abs/2609.32856}, } ``` Please also cite the source datasets: ```bibtex @inproceedings{maggiori2017can, title = {Can Semantic Labeling Methods Generalize to Any City? The Inria Aerial Image Labeling Benchmark}, author = {Maggiori, Emmanuel and Tarabalka, Yuliya and Charpiat, Guillaume and Alliez, Pierre}, booktitle = {IEEE International Geoscience and Remote Sensing Symposium (IGARSS)}, pages = {3226--3229}, year = {2017} } @inproceedings{jiao2026acpv, title = {ACPV-Net: All-Class Polygonal Vectorization for Seamless Vector Map Generation from Aerial Imagery}, author = {Jiao, Weiqin and Cheng, Hao and Vosselman, George and Persello, Claudio}, booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)}, pages = {13244--13253}, year = {2026} }``` ## Contact Please open an issue in the [code repository](https://github.com/seai-lab/PolyTopoBench/issues). Corresponding author: Gengchen Mai (gengchen.mai@austin.utexas.edu).