Nan Xue commited on
Commit
26cb13b
Β·
1 Parent(s): 4c954ae
Files changed (1) hide show
  1. README.md +12 -117
README.md CHANGED
@@ -1,117 +1,12 @@
1
- <div align="center">
2
-
3
- # ScaleLSD: Scalable Deep Line Segment Detection Streamlined
4
-
5
- <!-- <a href="https://code.alipay.com/kezeran.kzr/ScaleLSD"><img src="https://img.shields.io/static/v1?label=Project%20Page&message=Github&color=blue&logo=github-pages"></a>&ensp;<a href="https://code.alipay.com/kezeran.kzr/ScaleLSD"><img src="https://img.shields.io/badge/ArXiv-250x.xxxxx-brightgreen"></a>&ensp;<a href="https://code.alipay.com/kezeran.kzr/ScaleLSD"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Model_Card-Huggingface-orange"></a>&ensp;<a href="https://code.alipay.com/kezeran.kzr/ScaleLSD"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Gradio%20Demo-Huggingface-orange"></a> -->
6
-
7
- <a href="https://ant-research.github.io/scalelsd"><img src="https://img.shields.io/static/v1?label=Project%20Page&message=Github&color=blue&logo=github-pages"></a>&ensp;<a href="https://arxiv.org/abs/2506.09369"><img src="https://img.shields.io/badge/ArXiv-2506.09369-brightgreen"></a>&ensp;<a href="https://huggingface.co/cherubicxn/scalelsd"><img src="https://img.shields.io/badge/%F0%9F%A4%97%20Model_Card-Huggingface-orange"></a>
8
-
9
-
10
-
11
- [Zeran Ke](https://calmke.github.io/)<sup>1,2</sup>, [Bin Tan](https://icetttb.github.io/)<sup>2</sup>, [Xianwei Zheng](https://jszy.whu.edu.cn/zhengxianwei/zh_CN/index.htm)<sup>1</sup>, [Yujun Shen](https://shenyujun.github.io/)<sup>2</sup>, [Tianfu Wu](https://research.ece.ncsu.edu/ivmcl/)<sup>3</sup>, [Nan Xue](https://xuenan.net/)<sup>2†</sup>
12
-
13
- <sup>1</sup>Wuhan University &ensp;&ensp;<sup>2</sup>Ant Group&ensp;&ensp;<sup>3</sup>NC State University
14
-
15
- </div>
16
-
17
- <!-- <img src="assets/teaser.jpg" width="100%"> -->
18
-
19
- ![teaser](assets/teaser.jpg)
20
-
21
-
22
- ## βš™οΈ Installtion
23
-
24
- All codes are succefully tested on:
25
-
26
- - Ubuntu 22.04.5 LTS
27
- - CUDA 12.1
28
- - Python 3.10
29
- - Pytorch 2.5.1
30
-
31
- First clone this repo:
32
-
33
- ```bash
34
- git clone https://github.com/ant-research/scalelsd.git
35
- ```
36
-
37
- Then create the conda eviroment and install the dependencies:
38
- ```bash
39
- conda create -n scalelsd python=3.10
40
- pip install torch==2.5.1 torchvision==0.20.1 torchaudio==2.5.1 --index-url https://download.pytorch.org/whl/cu121
41
- pip install -r requirements.txt
42
- pip install -e . # Install scalelsd locally
43
- ```
44
-
45
- ## πŸ”₯πŸ” Gradio Demo
46
-
47
- ### Line Segment Detection
48
- Before you started, please download our pre-trained [models](https://huggingface.co/cherubicxn/scalelsd) and place them into the `models` folder. Then run the Gradio demo:
49
- ```bash
50
- python -m gradio_demo.inference
51
- ```
52
-
53
- ### Line Matching
54
- Because our line matching app is built on GlueStick with our ScaleLSD, you need to install [GlueStick](https://github.com/cvg/GlueStick) and download the weights of the GlueStick model. Then run the Gradio demo:
55
- ```bash
56
- pythonb -m gradio_demo.line_mat_gluestick
57
- ```
58
-
59
- ## πŸš— Inference
60
-
61
- Quickly start use our models for line segment detection by running the following command:
62
- ```bash
63
- python -m predictor.predict --img $[IMAGE_PATH_OR_FODER]
64
- ```
65
-
66
- You can also specify more params by:
67
-
68
- ```bash
69
- python -m predictor.predict \
70
- --ckpt $[MODEL_PATH] \
71
- --img $[IMAGE_PATH_OR_FODER] \
72
- --ext $[png/pdf/json] \
73
- --threshold 10 \
74
- --junction-hm 0.1 \
75
- --disable-show
76
- ```
77
-
78
- ```bash
79
- OPTIONS:
80
- --ckpt CKPT, -c CKPT
81
- Path to the checkpoint file.
82
- --img IMG, -i IMG Path to the image or folder containing images.
83
- --ext EXT, -e EXT Output file extension (png/pdf/json).
84
- --threshold THRESHOLD, -t THRESHOLD
85
- Threshold for line segment detection.
86
- --junction-hm JUNCTION_HM, -jh JUNCTION_HM
87
- Junction heatmap threshold.
88
- --num-junctions NUM_JUNCTIONS, -nj NUM_JUNCTIONS
89
- Max number of junctions to detect.
90
- --disable-show Disable showing the results.
91
- --use_lsd Use LSD-Rectifier for line segment detection.
92
- --use_nms Use Non-Maximum Suppression (NMS) for junction detection.
93
- ```
94
-
95
-
96
- ## πŸ“– Related Third-party Projects
97
-
98
- - [HAWPv3](https://github.com/cherubicXN/hawp/tree/main)
99
- - [DeepLSD](https://github.com/cvg/DeepLSD)
100
- - [Progressive-x](https://github.com/danini/progressive-x/tree/vanishing-points)
101
- - [GlueStick](https://github.com/cvg/GlueStick)
102
- - [GlueFactory](https://github.com/cvg/glue-factory)
103
- - [LiMAP](https://github.com/cvg/limap)
104
-
105
-
106
- ## πŸ“ Citation
107
-
108
- If you find our work useful in your research, please consider citing:
109
-
110
- ```bash
111
- @inproceedings{ScaleLSD,
112
- title = {ScaleLSD: Scalable Deep Line Segment Detection Streamlined},
113
- author = {Zeran Ke and Bin Tan and Xianwei Zheng and Yujun Shen and Tianfu Wu and Nan Xue},
114
- booktitle = "IEEE Conference on Computer Vision and Pattern Recognition (CVPR)",
115
- year = {2025},
116
- }
117
- ```
 
1
+ ---
2
+ title: ScaleLSD
3
+ emoji: 🌍
4
+ colorFrom: indigo
5
+ colorTo: indigo
6
+ sdk: gradio
7
+ sdk_version: 5.33.0
8
+ app_file: app.py
9
+ pinned: false
10
+ ---
11
+
12
+ Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference