Previous deep learning-based line segment detection (LSD) suffers from the immense model size and high computational cost for line prediction. This constrains them from real-time inference on computationally restricted environments. In this paper, we propose a real-time and light-weight line segment detector for resource-constrained environments named Mobile LSD (M-LSD). We design an extremely efficient LSD architecture by minimizing the backbone network and removing the typical multi-module process for line prediction found in previous methods. To maintain competitive performance with a light-weight network, we present novel training schemes: Segments of Line segment (SoL) augmentation, matching and geometric loss. SoL augmentation splits a line segment into multiple subparts, which are used to provide auxiliary line data during the training process. Moreover, the matching and geometric loss allow a model to capture additional geometric cues. Compared with TP-LSD-Lite, previously the best real-time LSD method, our model (M-LSD-tiny) achieves competitive performance with 2.5% of model size and an increase of 130.5% in inference speed on GPU. Furthermore, our model runs at 56.8 FPS and 48.6 FPS on the latest Android and iPhone mobile devices, respectively. To the best of our knowledge, this is the first real-time deep LSD available on mobile devices. Our code is available.
翻译:先前的深层学习型线段检测(LSD)因巨大的模型规模和高计算成本而受到影响,因为线段预测的模型规模巨大,计算成本高,这制约了他们,因为他们在计算限制环境中的实时推断。在本文中,我们提议为资源受限制的环境(名为M-LSD(M-LSD))建立一个实时和轻量线段检测器。我们设计了一个非常高效的LSD结构,其方法是尽量减少主干网,并去除以往方法中发现的典型的多模块线预测程序。为了保持轻量网络的竞争性性能,我们提出了新的培训计划:线段的增强、匹配和几何损耗部分。 SoLSE增强将线段分成多个小段,用于在培训过程中提供辅助性线段数据。此外,匹配和几何损失使模型能够捕捉到更多的几何线线线。与TP-LSD-Lite相比,以前的最佳实时LSD方法,我们的模式(M-SD-tiny)在模型尺寸的2.5%的模型上取得竞争性性性性性性表现,在最新的FPSPSE中,在最新的FPPU上,在最先进的第48的模型上是最佳的。