Abstract
Line Segment Detection (LSD) is a fundamental computer vision task often hindered by noise and complex backgrounds. This paper introduces the Attraction Field Map (AFM), a novel dual representation that reformulates LSD as a region-based dense prediction problem. By training a deep convolutional neural network to predict 2D vectors pointing from pixels to their nearest line segments, the proposed method achieves state-of-the-art accuracy and real-time performance, significantly outperforming traditional heuristic-heavy methods.
Introduction
Detecting line segments in digital images is essential for various applications, yet it remains challenging due to local noise, cluttered backgrounds, and discretization artifacts. Traditional LSD methods typically follow a two-stage process: generating a "heat map" of potential line pixels and then fitting geometric models using complex heuristics. This approach often fails due to local ambiguity and extreme class imbalance, where line pixels are rare compared to background pixels.
Methods
The core innovation of this work is the Attraction Field Map (AFM), which bridges the gap between 1D line segments and 2D image regions.
The Attraction Field Map
Instead of binary classification of pixels, the image is partitioned into regions where every pixel is associated with its nearest line segment. The model predicts a 2D vector—the "attraction"—for every pixel, pointing to its projection on the associated line segment. This transforms LSD into a dense prediction task, similar to semantic segmentation, effectively addressing the class imbalance problem.
Detection Pipeline
The architecture utilizes encoder-decoder networks, such as U-Net or an a-trous Residual U-Net, to predict the AFM directly from raw images. To recover line segments from these vectors, a lightweight "squeeze" algorithm groups pixels pointing to the same locations and fits geometric models to them. This single-stage deep learning framework eliminates the need for hand-crafted heuristics.
Key Results
The proposed method was evaluated on the WireFrame and YorkUrban datasets. It achieved an F-measure of 0.773 on the WireFrame dataset, representing a 4.5% improvement over previous state-of-the-art models.
The system is highly efficient, operating at 6.6 to 10.4 FPS on a single GPU, which is 3-5 times faster than other high-performing deep learning-based detectors. Qualitative analysis shows superior robustness in ignoring texture-heavy regions like rugs or brick walls that often confuse traditional edge-based detectors.
Conclusion and Future Work
While the method shows significant progress, limitations remain. The "squeeze" module, currently implemented on the CPU, acts as a performance bottleneck; porting it to the GPU could further enhance frame rates. Additionally, extremely cluttered scenes with many overlapping lines still pose challenges for the region-partitioning logic. Future work may focus on optimizing the post-processing stage and improving handling of complex intersections.
Summary updated