Home

Awesome

LSDNet: Trainable Modification of LSD Algorithm for Real-Time Line Segment Detection

Official implementation of "LSDNet: Trainable Modification of LSD Algorithm for Real-Time Line Segment Detection." by Teplyakov, Lev, Leonid Erlygin, and Evgeny Shvets. IEEE Access 10 (2022): 45256-45265.

links to the paper: IEEE Access, arXiv.org

Quantitative Results

<img src=".github/table1.png" height="200"> <img src=".github/visual_comp_2.png" height="200">

Qualitative Results

Video demo

Images from Wireframe dataset of varying number of salient line segments

<img src=".github/origs.jpg" height="200">

LSD detector

<img src=".github/lsds.jpg" height="200">

HAWP detector

<img src=".github/tinys.jpg" height="200">

M-LSD-tidy detector

<img src=".github/hawps.jpg" height="200">

LSDNet, the proposed detector

<img src=".github/lsdnets.jpg" height="200">

Setting up LSDNet Project

WARNING: all the scripts run in docker container without GPU support. We preferred plug-and-play demo with low FPS to top performance with hardcore NVIDIA-docker installation.

Installation

cd devops
sh build_image.sh

it takes about 10 min, it will download all the requirements and compile OpenCV the way we need it.

Launch Interactive Demo

The Interactive Demo allows you to play with LSDNet on single images.

To launch the demo server (based on Gradio) run

cd devops
sh launch_web_vis.sh

This commad will launch a web server and print its address. The interface should look like this.

<img src=".github/gradio_gui.png" height="400">

Running on Your Images

To make predictions on your images, specify in devops/detect_lines.sh the following variables:

As a container mounts to the repo's root directory, paths above must be:

Then make predictions on your images with

cd devops
sh detect_lines.sh