Skip to main content
QUICK REVIEW

[Paper Review] Line Segment Detection Using Transformers without Edges

Yifan Xu, Weijian Xu|arXiv (Cornell University)|Jan 6, 2021
Image and Object Detection TechniquesComputer Science33 references8 citations
TL;DR

This paper proposes LETR, a novel end-to-end line segment detection method using Transformers that bypasses edge detection and heuristic grouping. By employing a multi-scale encoder-decoder architecture with a direct endpoint distance loss, LETR achieves state-of-the-art performance on Wireframe and YorkUrban benchmarks, setting new SOTA results without relying on traditional mid-level visual processing pipelines.

ABSTRACT

In this paper, we present a joint end-to-end line segment detection algorithm using Transformers that is post-processing and heuristics-guided intermediate processing (edge/junction/region detection) free. Our method, named LinE segment TRansformers (LETR), takes advantages of having integrated tokenized queries, a self-attention mechanism, and an encoding-decoding strategy within Transformers by skipping standard heuristic designs for the edge element detection and perceptual grouping processes. We equip Transformers with a multi-scale encoder/decoder strategy to perform fine-grained line segment detection under a direct endpoint distance loss. This loss term is particularly suitable for detecting geometric structures such as line segments that are not conveniently represented by the standard bounding box representations. The Transformers learn to gradually refine line segments through layers of self-attention. In our experiments, we show state-of-the-art results on Wireframe and YorkUrban benchmarks.

Motivation & Objective

  • To address the persistent challenge of line segment detection in cluttered, occluded scenes where traditional edge-based and heuristic grouping methods fail.
  • To eliminate the need for intermediate heuristics-driven stages such as edge detection, junction detection, and perceptual grouping in line segment detection pipelines.
  • To enable end-to-end learning of geometric structures like line segments using Transformers, which are not naturally suited to bounding box representations.
  • To improve detection accuracy for fine-grained, elongated geometric structures by introducing a novel endpoint distance loss function.

Proposed method

  • Leverages a multi-scale encoder-decoder Transformer architecture inspired by DETR, with features from both deep (C5) and shallow (C4) ResNet layers for coarse and fine decoding.
  • Introduces a direct endpoint distance loss to train the model to predict line segment endpoints directly, enabling geometric structure modeling beyond standard bounding box regression.
  • Uses learnable queries and self-attention mechanisms to jointly predict multiple line segments in an end-to-end fashion, avoiding post-processing and heuristic grouping.
  • Employs bipartite matching (Hungarian matching) during training to associate predictions with ground-truth line segments based on the endpoint distance loss.
  • Applies coarse-to-fine decoding: the coarse decoder predicts initial line segments from high-level features, and the fine decoder refines them using lower-level features and attention.
  • Utilizes feature pyramid fusion between C5 and C4 features to enhance spatial precision in the final predictions.

Experimental results

Research questions

  • RQ1Can a pure Transformer-based architecture achieve state-of-the-art line segment detection without relying on edge detection or heuristic grouping modules?
  • RQ2How effective is a direct endpoint distance loss compared to standard bounding box regression for detecting elongated geometric structures like line segments?
  • RQ3What is the impact of multi-scale feature fusion and coarse-to-fine decoding on detection accuracy in line segment detection?
  • RQ4How does pretraining on large-scale datasets (e.g., COCO) affect convergence and performance in low-data regimes like Wireframe?
  • RQ5To what extent does image upsampling improve detection performance in line segment detection, and how does LETR compare to baseline methods under such settings?

Key findings

  • LETR achieves state-of-the-art performance on the Wireframe benchmark with an sAP10 of 65.2 and sAP15 of 67.7, outperforming prior methods including HAWP and DWP.
  • The multi-scale encoder-decoder design significantly improves detection accuracy, with the best performance achieved when both C5 and C4 features are used in the coarse and fine decoders.
  • The direct endpoint distance loss leads to consistent improvement over standard focal loss and bounding box regression, especially for long and thin line segments.
  • Pretraining on COCO object detection weights leads to faster convergence and better performance (sAP10: 62.3, sAP15: 65.2) compared to ImageNet pretraining (sAP10: 58.4, sAP15: 62.0) or no pretraining.
  • Image upsampling during inference improves performance for both HAWP and LETR, with LETR achieving a test sAP10 of 65.2 and sAP15 of 67.7 at 1100×1100 resolution.
  • Ablation studies confirm that the coarse-to-fine decoding strategy with attention heatmap visualization shows progressive refinement of line segment predictions across decoding layers.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.