ScaleLSD: Scalable Deep Line Segment Detection Streamlined

Zeran Ke, Bin Tan, Xianwei Zheng, Yujun Shen, Tianfu Wu, Nan Xue · DOI

Introduction

Line Segment Detection (LSD) serves as a foundational component in computer vision, critical for tasks ranging from 3D reconstruction and robotics to structural analysis. For over a decade, the handcrafted LSD algorithm introduced by Grompone von Gioi et al. (2010) remained the industry standard due to its precision and reliability. While deep learning-based models eventually emerged, they were historically hampered by a "generalization wall." These models were typically trained on small, specialized datasets like the Wireframe dataset (~5k images), leading to poor performance on diverse, real-world imagery. Furthermore, existing self-supervised methods relied on computationally expensive "homographic adaptation"—a process of warping images multiple times to ensure consistency—which prevented scaling to millions of images.

ScaleLSD addresses these bottlenecks by introducing a streamlined, self-supervised framework that bridges the gap between deep learning and classical computer vision. By leveraging a massive 10-million image dataset (SAM-1B) and a novel pseudo-labeling strategy, ScaleLSD becomes the first deep approach to consistently outperform classical algorithms across all major benchmarks.

Methodology

1. Architecture and Representation

ScaleLSD utilizes a Vision Transformer (ViT) backbone paired with a Dense Prediction Transformer (DPT) head. This architecture is designed to capture long-range geometric relationships more effectively than traditional Convolutional Neural Networks (CNNs), allowing the model to process the structural complexities found in large-scale data.

To represent line segments, the model employs a Holistic Attraction Field (HAT). Rather than performing sparse endpoint regression, the model predicts a dense field where every pixel "points" toward its nearest line segment. This dense representation provides significant robustness against noise and fragmentation compared to traditional methods.

2. The LSD-Rectifier

The core innovation of ScaleLSD is the LSD-Rectifier, a mechanism designed to generate high-quality pseudo-labels for unlabeled data. The authors observed a synergy between deep and classical methods: while deep models are excellent at identifying the presence and location of lines, classical gradient-based algorithms remain superior at determining precise orientation.

The LSD-Rectifier uses a "seed" deep model to identify line candidates and then "rectifies" their angles using the classical LSD algorithm. This hybrid approach eliminates the need for expensive homographic adaptation, enabling the model to scale its training to millions of images efficiently.

3. HAT-Induced Proposal Verification

Previous deep models often required complex "Line-of-Interest" (LOI) pooling to verify predicted segments. ScaleLSD simplifies this process through HAT-induced verification. The system calculates a "support degree" by counting how many pixels in the predicted HAT field align with a proposed line segment, providing a computationally efficient way to filter out false positives.

Large-Scale Training and Datasets

ScaleLSD was trained using a multi-stage pipeline:

  • Pre-training: A synthetic dataset of 16k geometric primitives (cubes, stars, etc.) was used to "preheat" the model.
  • Fine-tuning: The standard Wireframe dataset (20k images) provided initial supervised grounding.
  • Scaling: The final model was trained on SAM-1B, a collection of 10 million unlabeled real-world images, using the LSD-Rectifier to generate self-supervised labels.

Experimental Results

ScaleLSD achieved state-of-the-art (SOTA) performance across several rigorous benchmarks, demonstrating superior generalization over both classical and prior deep learning methods.

Repeatability and Precision

On the YorkUrban dataset, ScaleLSD achieved a repeatability score of 0.725, a substantial improvement over classical LSD (0.419) and the previous deep SOTA, DeepLSD (0.514). This indicates that ScaleLSD finds more consistent features across different viewpoints of the same scene.

Vanishing Point Estimation

In structural analysis tasks, ScaleLSD recorded the lowest median errors to date. On the YUD+ dataset, it achieved a median error of 1.55°, and 3.18° on NYU-VP, outperforming all baseline models.

3D Reconstruction

When applied to multi-view 3D line mapping on the DTU dataset, ScaleLSD produced the most accurate and complete reconstructions. It achieved an average accuracy metric of 0.7091 (where lower values represent reduced error), proving its utility in complex spatial reasoning tasks.

Conclusion

ScaleLSD demonstrates that simplicity and scale can overcome long-standing limitations in geometric computer vision. By replacing complex geometric augmentations with a streamlined LSD-Rectifier and a massive dataset, the authors have created a model that finally surpasses classical handcrafted methods.

While the model is currently optimized for straight line segments and may struggle with extremely faint lines in cluttered scenes, it sets a new benchmark for the field. Future work may involve extending the HAT field framework to explicitly model curved geometries and exploring even larger datasets to further enhance robustness.

Summary updated

BibTeX
@inproceedings{ke2025scalelsd,
  author = {Zeran Ke and Bin Tan and Xianwei Zheng and Yujun Shen and Tianfu Wu and Nan Xue},
  title = {{ScaleLSD: Scalable Deep Line Segment Detection Streamlined}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2025},
  doi = {10.1109/cvpr52734.2025.00593},
}
Figure