--- 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).