File size: 3,464 Bytes
ff22615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
30b3c9b
8a56c8f
 
 
30b3c9b
 
ff22615
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
0cd4aa7
ff22615
 
 
 
 
 
0cd4aa7
ff22615
 
 
0cd4aa7
ff22615
 
 
 
0cd4aa7
ff22615
 
 
 
 
 
 
 
 
 
 
0cd4aa7
ff22615
 
 
0cd4aa7
ff22615
 
 
 
0cd4aa7
ff22615
 
 
 
 
 
 
 
 
0cd4aa7
ff22615
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
---
datasets: lh9171338/SS360
pretty_name: SS360 Dataset
license: mit
tags:
- computer-vision
- line-segment-detection
- wireframe-parsing
- spherical image
size_categories: 1K<n<10

---

# SS360 Dataset

<p align="center">
    ✏️ <a href="https://github.com/lh9171338/ULSD-ISPRS"><b>Github</b></a>&nbsp&nbsp | &nbsp&nbsp📑 <a href="https://www.sciencedirect.com/science/article/abs/pii/S0924271621001623">Paper</a> &nbsp&nbsp | &nbsp&nbsp🖼️ <a href="https://huggingface.co/spaces/lh9171338/LineViewer">Viewer</a>
</p>


This is the SS360 dataset, designed for spherical image line segment detection.

## Summary

The SS360 dataset is constructed by manually annotating images sourced from the [SUN360 dataset](https://3dvision.princeton.edu/projects/2012/SUN360/) and the [Stanford 2D-3D-S dataset](https://sdss.redivis.com/datasets/f304-a3vhsvcaf). It is organized into JSONL files (train/metadata.jsonl, test/metadata.jsonl) along with the corresponding images.

Number of samples:
- Train: 950
- Test: 118

## Download

- Download with huggingface-hub

```shell
python3 -m pip install huggingface-hub
huggingface-cli download --repo-type dataset lh9171338/SS360 --local-dir ./
```

- Download with Git

```shell
git lfs install
git clone https://huggingface.co/datasets/lh9171338/SS360
```

## Usage

- Load the dataset from Hugging Face Hub

```python
from datasets import load_dataset

ds = load_dataset("lh9171338/SS360")
# or load from `refs/convert/parquet` for acceleration
# from datasets import load_dataset, Features, Image, Sequence, Value
# features = Features({
#     "image": Image(),
#     "image_file": Value("string"),
#     "image_size": Sequence(Value("int32")),
#     "camera_type": Value("string"),
#     "lines": Sequence(Sequence(Sequence(Value("float32")))),
# })
# ds = load_dataset("lh9171338/SS360", features=features, revision="refs/convert/parquet")
print(ds)
# DatasetDict({
#     train: Dataset({
#         features: ['image', 'image_file', 'image_size', 'camera_type', 'lines'],
#         num_rows: 950
#     })
#     test: Dataset({
#         features: ['image', 'image_file', 'image_size', 'camera_type', 'lines'],
#         num_rows: 118
#     })
# })
print(ds["test"][0].keys())
# dict_keys(['image', 'image_file', 'image_size', 'camera_type', 'lines'])
```

- Load the dataset from local

```python
from datasets import load_dataset

ds = load_dataset("imagefolder", data_dir=".")
print(ds)
# DatasetDict({
#     train: Dataset({
#         features: ['image', 'image_file', 'image_size', 'camera_type', 'lines'],
#         num_rows: 950
#     })
#     test: Dataset({
#         features: ['image', 'image_file', 'image_size', 'camera_type', 'lines'],
#         num_rows: 118
#     })
# })
print(ds["test"][0].keys())
# dict_keys(['image', 'image_file', 'image_size', 'camera_type', 'lines'])
```

- Load the dataset with jsonl files
```python
import jsonlines

with jsonlines.open("test/metadata.jsonl") as reader:
    infos = list(reader)
print(infos[0].keys())
# dict_keys(['image', 'image_file', 'image_size', 'camera_type', 'lines'])
```

## Citation

```
@article{LI2021187,
    title = {ULSD: Unified line segment detection across pinhole, fisheye, and spherical cameras},
    author = {Hao Li and Huai Yu and Jinwang Wang and Wen Yang and Lei Yu and Sebastian Scherer},
    journal = {ISPRS Journal of Photogrammetry and Remote Sensing},
    volume = {178},
    pages = {187-202},
    year = {2021},
}
```