File size: 1,382 Bytes
4003a93
 
350e5a4
 
 
4003a93
 
 
350e5a4
 
 
4003a93
 
 
350e5a4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
---
title: Pixels Points Polygons Building Vectorizer
emoji: 🏙️
colorFrom: purple
colorTo: blue
sdk: gradio
sdk_version: 6.20.0
app_file: app.py
short_description: Extract building polygons from aerial images (P3 / Pix2Poly)
python_version: "3.12"
startup_duration_timeout: 1h
pinned: false
---

# Pixels, Points & Polygons — Building Vectorizer

Interactive demo of the **Pix2Poly image model** from
[*The P³ Dataset: Pixels, Points and Polygons for Multimodal Building Vectorization*](https://huggingface.co/papers/2505.15379)
(Sulzer, Duan, Girard & Lafarge, 2025).

Upload a nadir aerial RGB tile and the model predicts closed **building outline
polygons**, drawn as a vector overlay. The pipeline is a DINO ViT-S/8 encoder →
transformer polygon decoder (autoregressive vertex generation) → optimal-transport
permutation head that connects vertices into polygons.

- **Weights:** [`rsi/PixelsPointsPolygons`](https://huggingface.co/rsi/PixelsPointsPolygons) (checkpoint `v4_image_vit_bs4x16`)
- **Code:** [github.com/raphaelsulzer/pixelspointspolygons](https://github.com/raphaelsulzer/pixelspointspolygons)

Inputs are resized to 224×224; the model was trained on 25 cm ground-sampling-distance
imagery, so real-world aerial tiles at similar scale work best. Only the image modality
is served here (the LiDAR / fusion variants need Open3D-ML and custom CUDA ops).