Introduction

SL5K (short for Semantic Line 5,000) is a dataset for semantic line detection. Semantic lines are meaningful line structures that outline the conceptual structure of natural images.

pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot
Example images and annotations of SL5K dataset.

The SL5K dataset contains 5,000 images of various scenes. Each of these images is annotated by multiple skilled human annotators. The dataset is split into training and validation subsets. There are 4,000 images in the training set and 1,000 in the validation set.

Statistics of SL5K compared to the SEL[1] dataset.
Dataset Total
(#Images / #Lines)
Training
(#Images / #Lines)
Validation
(#Images / #Lines)
SEL [1] 1,715 / 2,791 1,541 / 2,493 174 / 298
SL5K (Ours) 5,000 / 9,352 4,000 / 7,451 1,000 / 1,901

Below is the category distribution of SEL [1] and SL5K datasets. Category labels are obtained by passing the images into a Places365 [2] pretrainedmodel. There are 288 (out of 365) scene labels presented in SL5K dataset, in contrast to 167 in SEL dataset. The labels of SL5K are also more fairly distributed compared to that of SEL [1].

Files and Annotations

The images and annotations are organised into a single zip file http://data.kaizhao.net/projects/deep-hough-transform/sl5k.zip. After download and decompression, the directory structure is as below:

├── train
│   ├── 1.jpg
│   ├── 1.txt
│   ├── ...
│   └── ...
└── val
    ├── 4001.jpg
    ├── 4001.txt
    ├── ...
    └── ...

where 'xxx.txt' is the annotation.

Each annotation is a single line text file with format: n x11 y11 x12 y12 ... xn1 yn1 xn2 yn2 where n is the number of lines and xn1 yn1 xn2 yn2 are the coordinates of endpoints of the n-th line.

Below is the example code to mask the line annotations to the image for visualization:

from PIL import Image, ImageDraw
im = Image.open("1.jpg")
lines = np.loadtxt("1.txt")
N = int(lines[0])
lines = np.delete(lines, 0)
lines = np.reshape(lines, (N, 4)).astype(int)
draw = ImageDraw.Draw(im)
for l in range(N):
    draw.line(lines[l, :].tolist(), fill="red", width=4)
im.save("1-visualization.jpg")

Visualizations

Training set

pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot

Validation set

pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot pressue plot

Bibliography:

@article{han2020deep,
  title={Deep Hough Transform for Semantic Line Detection},
  author={Zhao, Kai and Han, Qi and Zhang, Chang-bin and Xu, Jun and Cheng, Mingg-Ming},
  journal={arXiv preprint arXiv:2003.04676},
  year={2020}
}

References:

  1. Lee JT, Kim HU, Lee C, Kim CS. Semantic line detection and its applications. InProceedings of the IEEE International Conference on Computer Vision 2017 (pp. 3229-3237).
  2. Zhou, B., Lapedriza, A., Khosla, A., Oliva, A. and Torralba, A., 2017. Places: A 10 million image database for scene recognition. IEEE transactions on pattern analysis and machine intelligence, 40(6), pp.1452-1464.