Introduction
Line segment detection (LSD) is a fundamental task for understanding man-made environments, providing the "structural skeleton" needed for 3D reconstruction, vanishing point estimation, and camera pose tracking. Historically, deep learning approaches to LSD have been hindered by multi-stage complexity. TP-LSD (Tri-Points Based Line Segment Detector) introduces a novel one-step deep learning model that treats line segments as a "root-point" (center) with two associated displacement vectors to its endpoints. By eliminating the complex grouping or classification processes used in previous methods, it achieves state-of-the-art accuracy while running at a blistering 78 FPS, making real-time line detection viable for mobile robotics and augmented reality.
The Limitations of Current Approaches
Deep learning approaches to LSD have traditionally fallen into two inefficient categories:
- Top-Down Strategies: These methods detect regions likely to contain lines and "squeeze" them into segments. While they capture global structure, they often struggle with precise endpoint localization.
- Bottom-Up Strategies: These methods detect junctions (corners) first and then use a second stage—either a heuristic algorithm or an extra neural network classifier—to determine which junctions should be connected. This "two-step" process is computationally expensive and prone to errors; if a single junction is missed, the entire line is lost.
Methods: The Tri-Points Representation
The core innovation of this work is the Tri-Points (TP) representation. Instead of searching for pixel-wise lines or junction pairs, the model predicts three components for every line: a center "root-point" and two 2D displacement vectors pointing to the start and end points. This simplifies the pipeline significantly, treating line detection similarly to modern anchor-free object detection frameworks.
Architecture and Structural Priors
The model utilizes a U-shaped encoder-decoder architecture feeding into two parallel branches:
- TP Extraction Branch: This branch predicts a heatmap of root-points and corresponding displacement maps. To handle varying line lengths, the authors introduced a Mixture Convolution Module (MCM). This module uses deformable and atrous (dilated) convolutions to expand the network's receptive field, allowing it to gather features from far-reaching endpoints to accurately localize the center.
- Line Segmentation Branch: This branch performs pixel-wise segmentation to identify all pixels belonging to any straight line.
These branches are integrated via a Feature Aggregation Module (FAM), which feeds the line segmentation map back into the TP branch as a "structural prior." This guides the root-point detector to focus only on areas where linear structures are known to exist. Finally, a Point Filter Module (PFM) suppresses noisy root-point predictions that fall outside of actual linear structures.
Evaluation and Results
The model was evaluated on the Wireframe and YorkUrban datasets. Beyond standard pixel-based metrics, the authors introduced Line Matching Average Precision (LAP). Unlike older metrics that just look at pixel distances, LAP uses a 3D camera model perspective to calculate how well the predicted line's orientation and position match the ground truth, providing a more geometrically meaningful score.
Key Findings
- Speed: TP-LSD achieved 78 FPS on a 320×320 input using an NVIDIA RTX 2080Ti. In contrast, the previous state-of-the-art, L-CNN, runs at approximately 11-13 FPS.
- Accuracy: On the Wireframe dataset, TP-LSD achieved a pixel-based F-score of 0.816, outperforming or matching much slower, more complex models.
- Robustness: The model proved particularly adept at detecting lines in low-contrast environments and complicated scenes where junction-based methods often fail due to occlusions or missing corners.
Conclusion
TP-LSD represents a significant shift toward efficient, one-step line segment detection. By leveraging the Tri-Points representation and structural priors from segmentation, the model achieves real-time performance without sacrificing precision. This framework is a prime candidate for integration into real-time SLAM (Simultaneous Localization and Mapping) systems and 3D layout estimation for robotics and mobile AR applications.
Summary updated