CornerFormer: Boosting Corner Representation for Fine-Grained Structured Reconstruction

Hongbo Tian, Yulong Li, Linzhi Huang, Yue Yang, Xiangang Li, Weihong Deng · OpenReview

Abstract

Structured reconstruction is a non-trivial dense prediction problem, which extracts structural information (e.g., building corners and edges) from a raster image, then reconstructs it to a 2D planar graph accordingly. Compared with common segmentation or detection problems, it significantly relies on the capability of leveraging holistic geometric information for structural reasoning. Current transformer-based approaches tackle this challenging problem in a two-stage manner, which detect corners in the first model and classify the proposed edges (corner-pairs) in the second model. However, they separate these two stages into different models and only share the backbone encoder. Unlike existing modeling strategies, we present an enhanced corner representation method: 1) It fuses knowledge between corner detection and edge prediction by sharing features at different granularities; 2) Corner candidates are proposed in four heatmap channels w.r.t. their direction. Both qualitative and quantitative evaluations demonstrate that our proposed method can better reconstruct fine-grained structures, such as adjacent corners and tiny edges. Consequently, it outperforms the state-of-the-art model by +1.9% @ F-1 on Corner and +3.0% @ F-1 on Edge.

Introduction

Structured reconstruction goes beyond simple image segmentation. Instead of just labeling pixels, the goal is to extract a geometric graph consisting of points (corners) and lines (edges). This is vital for applications like floor plan generation, urban planning from satellite imagery, and CAD modeling.

Current state-of-the-art methods typically use a two-stage approach: first, detect corners; second, classify pairs of corners as edges. However, treating these stages as detachable modules leads to two major issues: information loss, where the edge detector misses fine-grained local features, and the "Adjacent Corner" problem, where standard non-maximum suppression (NMS) merges close-proximity corners into a single point, collapsing fine details.

Methodology

CornerFormer introduces several architectural innovations to bridge the gap between global reasoning and local detail through a unified transformer flow.

The CornerFormer architecture features a shared backbone, a direction-aware corner detection module, and an edge prediction stage enhanced by a Proposal Feature Enhancement Module (PFEM).

Key Architectural Components

  • Learnable Corner Feature Extractor: This extracts multi-scale "fine features" from early backbone layers. These are fused using a learnable weight matrix, allowing the model to adaptively focus on the most relevant scale for a specific corner.
  • Proposal Feature Enhancement Module (PFEM): This module uses a 6-layer self-attention mechanism to "boost" corner features before they reach the edge decoder, ensuring query embeddings are rich with structural context.
  • Deformable Edge Decoder: By using a deformable cross-attention mechanism to query "global coarse features," the edge predictor maintains a global view of the building shape while remaining anchored by precise local corner proposals.

Direction-Aware Corner Detection

A core innovation of CornerFormer is the Direction Corner Module. Instead of a single heatmap for all corners, the model predicts four separate heatmap channels based on the direction of the rays forming the corner (Up, Down, Left, Right).

The Direction Corner Module predicts corners in four directional channels during training and aggregates them during inference to preserve adjacent corners.

This approach uses orientation as a discriminator to solve NMS quantization errors. By scattering endpoints into different channels based on direction, tiny edges that would normally be "smudged" away by NMS are preserved. This mimics human cognition, where corner and edge detection are inseparable processes.

Evaluation and Results

The model was evaluated on the Outdoor Architecture Reconstruction Dataset, comprising 2,001 high-resolution satellite RGB images of complex building roofs. CornerFormer was compared against several heavyweights, including IP, ConvMPN, and the previous state-of-the-art, HEAT.

Quantitative Performance

CornerFormer set new benchmarks for outdoor structured reconstruction:

  • Accuracy: Outperformed HEAT by +1.9% F-1 score on Corners and +3.0% F-1 score on Edges.
  • Resolution Scaling: On 512x512 images, it showed significant improvements in Region Recall, proving its efficacy in identifying small, complex architectural details.
  • Efficiency: Despite its increased accuracy, CornerFormer is twice as fast as the HEAT model, demonstrating that better feature integration reduces the need for exhaustive search processes.

Conclusion

While CornerFormer represents a major advancement, it remains a bottom-up architecture. Edge prediction is still dependent on corner proposals; if the corner detector misses a point due to low contrast, the edge detector cannot currently "hallucinate" the missing connection. Future work may involve integrating high-level logical constraints (e.g., ensuring closed loops) to handle cases where image signals are weak.

Summary updated

BibTeX
@misc{tian2023cornerformer,
  author = {Hongbo Tian and Yulong Li and Linzhi Huang and Yue Yang and Xiangang Li and Weihong Deng},
  title = {{CornerFormer: Boosting Corner Representation for Fine-Grained Structured Reconstruction}},
  year = {2023},
  eprint = {2304.07072},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2304.07072},
}

Loading related content...

Figure