TL;DR
P2PFormer is a novel, end-to-end transformer architecture that extracts clean, regular building polygons from remote sensing images without any manual post-processing. By shifting the focus from pixel-level masks to geometric "primitives" (like corners and lines) and predicting their sequence directly, it achieves new state-of-the-art results on major benchmarks like CrowdAI and WHU.
What Problem Does This Paper Address?
Delineating building footprints from satellite and aerial imagery is a cornerstone of urban planning and disaster management. However, standard computer vision techniques often fall short of the "human-delineated" quality required for cartography.
Existing methods typically fall into three buckets, each with a catch:
- Mask-based: They produce pixel grids that require complex "vectorization" and "regularization" to look like real buildings.
- Contour-based: They regress a series of points, but often generate too many redundant ones, leading to jagged edges that need difficult "simplification" steps.
- Vertex-based: They find the corners but then require complex graph-search algorithms to figure out how to connect the dots.
The authors of P2PFormer identify a fundamental gap: the lack of a streamlined, end-to-end pipeline that directly outputs regular polygons. As shown in Figure 1, their "primitive-based" approach is the only one that completely eliminates handcrafted post-processing.
Methods
P2PFormer follows a three-stage workflow: Detection, Primitive Segmentation, and Order Decoding.
- Detection: A standard head (FCOS) identifies building bounding boxes.
- Primitive Segmenter: This is the heart of the model. Instead of looking for single pixels, it looks for geometric primitives—specifically corners (defined by three points). To do this effectively, the authors introduced Group Queries. In a typical Transformer, one query might struggle to focus on multiple distant endpoints of a line or corner simultaneously. P2PFormer uses a group of queries that share a single position embedding, allowing the model to "see" the entire primitive structure at once.
- Implicit Position Update: The model dynamically updates the query position embeddings during the decoding process, sharpening the focus on the correct geometric midpoints.
- Order Decoder: Once the primitives are found, a simple transformer-based decoder treats the sequencing of these primitives as a classification problem. It predicts the relative order (e.g., clockwise) of each corner to assemble the final polygon.
Datasets
The model was evaluated on three major benchmarks:
- CrowdAI: A massive satellite dataset with over 280,000 training images.
- WHU: A high-quality aerial image dataset known for its precise annotations.
- WHU-Mix: A challenging, large-scale dataset featuring diverse regions and image styles from across the globe, testing the model's ability to generalize.
Key Insights and Ideas
- Corners > Vertices: One of the most interesting findings is that using "corners" (3-point primitives) as the base unit works significantly better than using single vertices. Corners are less likely to be completely occluded by trees or shadows, making the segmentation more robust.
- The Power of Grouping: The "Group Query" strategy (illustrated in Figure 3) solves a common Transformer limitation. By grouping queries, the model can attend to multiple points of a single geometric feature (like the two ends of a wall) while maintaining a unified spatial reference.
- Simplifying the Topology: By treating the connection of vertices as a simple ordering/classification problem rather than a complex graph-matching problem, the authors removed a major source of error and computational overhead found in previous state-of-the-art models like PolyWorld.
Key Results
P2PFormer sets a new bar for building extraction:
- CrowdAI: It outperformed the previous state-of-the-art (PolyWorld) by 2.7 AP and a staggering 6.5 $AP_{75}$, indicating much higher precision in the final polygon shapes.
- WHU: It achieved 72.7 mAP, surpassing both mask-based and contour-based competitors.
- Qualitative Quality: Visually, P2PFormer produces sharp, right-angled corners that closely match manual human annotations, whereas other methods often produce "rounded" or irregular shapes.
Limitations and Future Work
While highly effective, the authors noted a few areas for improvement:
- Internal Noise: The segmenter can sometimes be distracted by internal building features (like roof structures), leading to incorrect internal primitives.
- Missing Pieces: If the model misses a single critical primitive, the entire contour can fail to close correctly.
- Scale Issues: For very large buildings, the fixed-grid ROI-Align feature extraction can lose fine detail. The authors suggest that a more flexible feature extraction method could help correct points toward the true contours in these cases.
Summary updated