Datasets:

ArXiv:
zzuxzt commited on
Commit
d46530b
·
verified ·
1 Parent(s): 4e02fa8

Upload semantic2d dataset

Browse files
dataset/README.md CHANGED
@@ -1,2 +1,334 @@
1
- # Semantic2D: Enabling Semantic Scene Understanding with 2D Lidar Alone
2
- The Semantic2D Dataset and its raw rosbag data can be downloaded at: https://doi.org/10.5281/zenodo.13730200.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # Semantic2D Dataset
2
+
3
+ A 2D lidar semantic segmentation dataset for mobile robotics applications. This is the first publicly available 2D lidar semantic segmentation dataset, featuring point-wise annotations for nine indoor object categories across twelve distinct environments.
4
+
5
+ **Associated Paper:** *Semantic2D: Enabling Semantic Scene Understanding with 2D Lidar Alone*
6
+ **Authors:** Zhanteng Xie, Yipeng Pan, Yinqiang Zhang, Jia Pan, Philip Dames
7
+ **Institutions:** The University of Hong Kong, Temple University
8
+
9
+ **Video:** https://youtu.be/P1Hsvj6WUSY
10
+ **GitHub:** https://github.com/TempleRAIL/semantic2d
11
+
12
+ ---
13
+
14
+ ## Dataset Overview
15
+
16
+ | Property | Value |
17
+ |----------|-------|
18
+ | Total Data Tuples | ~188,007 |
19
+ | Recording Rate | 20 Hz |
20
+ | Total Duration | ~131 minutes |
21
+ | Environments | 12 indoor environments |
22
+ | Buildings | 7 buildings (4 at Temple, 3 at HKU) |
23
+ | LiDAR Sensors | 3 types |
24
+ | Semantic Classes | 9 + background |
25
+
26
+ ### Semantic Classes
27
+
28
+ | ID | Class | Description |
29
+ |----|-------|-------------|
30
+ | 0 | Background/Other | Unclassified objects |
31
+ | 1 | Chair | Chairs and seating |
32
+ | 2 | Door | Doors and doorways |
33
+ | 3 | Elevator | Elevator doors |
34
+ | 4 | Person | Dynamic pedestrians |
35
+ | 5 | Pillar | Structural pillars |
36
+ | 6 | Sofa | Sofas and couches |
37
+ | 7 | Table | Tables |
38
+ | 8 | Trash bin | Trash cans |
39
+ | 9 | Wall | Walls and partitions |
40
+
41
+ ### LiDAR Sensors
42
+
43
+ | Sensor | Robot | Location | Range (m) | FOV (deg) | Angular Res. (deg) | Points |
44
+ |--------|-------|----------|-----------|-----------|-------------------|--------|
45
+ | Hokuyo UTM-30LX-EW | Jackal | Temple | [0.1, 60] | 270 | 0.25 | 1,081 |
46
+ | WLR-716 | Customized | HKU | [0.15, 25] | 270 | 0.33 | 811 |
47
+ | RPLIDAR-S2 | Customized | HKU | [0.2, 30] | 360 | 0.18 | 1,972 |
48
+
49
+ ---
50
+
51
+ ## Directory Structure
52
+
53
+ ```
54
+ semantic2d_dataset_2025/
55
+ ├── README.md
56
+
57
+ ├── rosbags/ # Original ROS bag files, only used for reference or to extract other data, such as RGB, depth, goal, etc.
58
+ │ ├── 2024-04-04-12-16-41.bag # Temple Engineering Lobby
59
+ │ ├── 2024-04-04-13-48-45.bag # Temple Engineering 6th floor
60
+ │ ├── 2024-04-04-14-18-32.bag # Temple Engineering 9th floor
61
+ │ ├── 2024-04-04-14-50-01.bag # Temple Engineering 8th floor
62
+ │ ├── 2024-04-11-14-37-14.bag # Temple Engineering 4th floor
63
+ │ ├── 2024-04-11-15-24-29.bag # Temple Engineering Corridor
64
+ │ ├── 2025-07-08-13-32-08.bag # Temple SERC Lobby
65
+ │ ├── 2025-07-08-14-22-44.bag # Temple Gladfelter Lobby
66
+ │ ├── 2025-07-18-17-43-11.bag # Temple Mazur Lobby
67
+ │ ├── 2025-11-10-15-53-51.bag # HKU Chow Yei Ching 4th floor
68
+ │ ├── 2025-11-11-21-27-17.bag # HKU Centennial Campus Lobby
69
+ │ └── 2025-11-18-22-13-37.bag # HKU Jockey Club 3rd floor
70
+
71
+ └── semantic2d_data/ # Semantic2D Segmentation Data files
72
+ ├── dataset.txt # dataset index for each folder
73
+ ├── 2024-04-04-12-16-41/ # Temple Engineering Lobby # Temple environments (Hokuyo)
74
+ ├── 2024-04-04-13-48-45/ # Temple Engineering 6th floor
75
+ ├── 2024-04-04-14-18-32/ # Temple Engineering 9th floor
76
+ ├── 2024-04-04-14-50-01/ # Temple Engineering 8th floor
77
+ ├── 2024-04-11-14-37-14/ # Temple Engineering 4th floor
78
+ ├── 2024-04-11-15-24-29/ # Temple Engineering Corridor
79
+ ├── 2025-07-08-13-32-08/ # Temple SERC Lobby
80
+ ├── 2025-07-08-14-22-44/ # Temple Gladfelter Lobby
81
+ ├── 2025-07-18-17-43-11/ # Temple Mazur Lobby
82
+ ├── 2025-11-10-15-53-51/ # HKU Chow Yei Ching 4th floor # HKU environments (WLR-716 + RPLIDAR)
83
+ ├── 2025-11-11-21-27-17/ # HKU Centennial Campus Lobby
84
+ └── 2025-11-18-22-13-37/ # HKU Jockey Club 3rd floo
85
+ ```
86
+
87
+ ---
88
+
89
+ ## Semantic2D Segmentation Data Folder Structure
90
+
91
+ ### Temple University Environments (Hokuyo UTM-30LX-EW)
92
+
93
+ Folders: `2024-04-04-*` and `2024-04-11-*` (6 environments)
94
+
95
+ ```
96
+ 2024-04-04-12-16-41/ # Engineering Lobby
97
+ ├── train.txt # Training split filenames (70%)
98
+ ├── dev.txt # Validation split filenames (10%)
99
+ ├── test.txt # Test split filenames (20%)
100
+
101
+ ├── scans_lidar/ # LiDAR range data
102
+ │ └── *.npy # Shape: (1081,) - range values in meters
103
+
104
+ ├── intensities_lidar/ # LiDAR intensity data
105
+ │ └── *.npy # Shape: (1081,) - intensity values
106
+
107
+ ├── line_segments/ # Extracted line features
108
+ │ └── *.npy # Line segments [x1,y1,x2,y2] per line
109
+
110
+ ├── positions/ # Robot poses
111
+ │ └── *.npy # Shape: (3,) - [x, y, yaw] in map frame
112
+
113
+ ├── velocities/ # Velocity commands
114
+ │ └── *.npy # Shape: (2,) - [linear_x, angular_z]
115
+
116
+ ├── semantic_label/ # Point-wise semantic labels
117
+ │ └── *.npy # Shape: (1081,) - class ID per point
118
+
119
+ ├── semantic_scan/ # Semantic scan visualization data
120
+ │ └── *.npy
121
+
122
+ ├── final_goals_local/ # Navigation final goals
123
+ │ └── *.npy # Goal positions in local frame
124
+
125
+ ├── sub_goals_local/ # Navigation sub-goals
126
+ │ └── *.npy # Sub-goal waypoints
127
+
128
+ └── 202404041210_eng_lobby_map/ # Environment map
129
+ ├── 202404041210_eng_lobby.pgm # Occupancy grid map (PGM format)
130
+ ├── 202404041210_eng_lobby.yaml # Map configuration
131
+ └── map_labelme/ # Semantic labeled map
132
+ ├── img.png # Original map image
133
+ ├── label.png # Semantic label image
134
+ ├── label_viz.png # Colored visualization
135
+ ├── label_names.txt # Class name list
136
+ └── map_labelme.json # LabelMe annotation file
137
+ ```
138
+
139
+ ### HKU Environments (WLR-716 + RPLIDAR-S2)
140
+
141
+ Folders: `2025-11-*` (3 environments)
142
+
143
+ ```
144
+ 2025-11-10-15-53-51/ # Chow Yei Ching 4th floor
145
+ ├── train.txt # Training split (70%)
146
+ ├── dev.txt # Validation split (10%)
147
+ ├── test.txt # Test split (20%)
148
+
149
+ ├── # WLR-716 LiDAR data (811 points, 270 deg FOV)
150
+ ├── scans_lidar_wlr716/ # Range data
151
+ │ └── *.npy # Shape: (811,)
152
+ ├── intensities_lidar_wlr716/ # Intensity data
153
+ │ └── *.npy # Shape: (811,)
154
+ ├── line_segments_wlr716/ # Line segments
155
+ │ └── *.npy
156
+ ├── semantic_label_wlr716/ # Semantic labels
157
+ │ └── *.npy # Shape: (811,)
158
+
159
+ ├── # RPLIDAR-S2 data (1972 points, 360 deg FOV)
160
+ ├── scans_lidar_rplidar/ # Range data
161
+ │ └── *.npy # Shape: (1972,)
162
+ ├── intensities_lidar_rplidar/ # Intensity data
163
+ │ └── *.npy # Shape: (1972,)
164
+ ├── line_segments_rplidar/ # Line segments
165
+ │ └── *.npy
166
+ ├── semantic_label_rplidar/ # Semantic labels
167
+ │ └── *.npy # Shape: (1972,)
168
+
169
+ ├── # Shared data (same for both sensors)
170
+ ├── positions/ # Robot poses [x, y, yaw]
171
+ │ └── *.npy # Shape: (3,)
172
+ ├── velocities/ # Velocity commands [vx, wz]
173
+ │ └── *.npy # Shape: (2,)
174
+
175
+ └── 202511101415_cyc_4th_map/ # Environment map
176
+ ├── *.pgm # Occupancy grid
177
+ ├── *.yaml # Map configuration
178
+ └── map_labelme/ # Semantic labels
179
+ └── ...
180
+ ```
181
+
182
+ ---
183
+
184
+ ## Data Format Details
185
+
186
+ ### LiDAR Scan Data (`.npy`)
187
+
188
+ ```python
189
+ import numpy as np
190
+
191
+ # Load range data
192
+ scan = np.load('scans_lidar/0000001.npy') # Shape: (N,) where N = num_points
193
+
194
+ # Hokuyo: N=1081, angle_min=-135°, angle_max=135°
195
+ # WLR-716: N=811, angle_min=-135°, angle_max=135°
196
+ # RPLIDAR-S2: N=1972, angle_min=-180°, angle_max=180°
197
+
198
+ # Convert to Cartesian coordinates
199
+ angles = np.linspace(angle_min, angle_max, num=N)
200
+ x = scan * np.cos(angles)
201
+ y = scan * np.sin(angles)
202
+ ```
203
+
204
+ ### Semantic Labels (`.npy`)
205
+
206
+ ```python
207
+ # Load semantic labels
208
+ labels = np.load('semantic_label/0000001.npy') # Shape: (N,)
209
+
210
+ # Each value is a class ID (0-9):
211
+ # 0: Background, 1: Chair, 2: Door, 3: Elevator, 4: Person,
212
+ # 5: Pillar, 6: Sofa, 7: Table, 8: Trash bin, 9: Wall
213
+ ```
214
+
215
+ ### Robot Pose (`.npy`)
216
+
217
+ ```python
218
+ # Load robot pose
219
+ pose = np.load('positions/0000001.npy') # Shape: (3,)
220
+ x, y, yaw = pose[0], pose[1], pose[2] # Position and orientation in map frame
221
+ ```
222
+
223
+ ### Dataset Splits (`train.txt`, `dev.txt`, `test.txt`)
224
+
225
+ ```
226
+ # Each line contains a .npy filename
227
+ 0001680.npy
228
+ 0007568.npy
229
+ 0009269.npy
230
+ ...
231
+ ```
232
+
233
+ ---
234
+
235
+ ## Semantic2D labeling:
236
+
237
+ ### 1. Data Collection (`dataset_collection.py`)
238
+
239
+ ROS node for collecting data from the robot during teleoperation.
240
+
241
+ **Key Features:**
242
+ - Subscribes to LiDAR scans (`/scan, /wj716_base/scan`, `/rplidar_base/scan`)
243
+ - Records range, intensity, line segments, positions, velocities
244
+ - Saves data at 20 Hz as `.npy` files
245
+
246
+
247
+ ### 2. Semi-Automated Labeling Framework (SALSA)
248
+
249
+ **Algorithm:**
250
+ 1. Load pre-labeled semantic map (from LabelMe)
251
+ 2. For each LiDAR scan:
252
+ - Extract line features for robust alignment
253
+ - Apply ICP to refine robot pose
254
+ - Project LiDAR points to map frame
255
+ - Match points to semantic labels via pixel lookup
256
+ - Points in free space labeled as "Person" (dynamic objects)
257
+
258
+ **Configuration (modify in script):**
259
+ ```python
260
+ DATASET_ODIR = "/path/to/raw/data"
261
+ MAP_ORIGIN = np.array([-82.0, -71.6, 0.0]) # From map YAML
262
+ MAP_RESOLUTION = 0.025
263
+ POINTS = 811 # Number of LiDAR points
264
+ AGNLE_MIN = -2.356 # Min angle (radians)
265
+ AGNLE_MAX = 2.356 # Max angle (radians)
266
+ ```
267
+
268
+ ---
269
+
270
+ ## Environments Summary
271
+
272
+ | Environment | Location | Folder | LiDAR |
273
+ |-------------|----------|--------|-------|
274
+ | Engineering Lobby | Temple | `2024-04-04-12-16-41` | Hokuyo |
275
+ | Engineering 6th Floor | Temple | `2024-04-04-13-48-45` | Hokuyo |
276
+ | Engineering 9th Floor | Temple | `2024-04-04-14-18-32` | Hokuyo |
277
+ | Engineering 8th Floor | Temple | `2024-04-04-14-50-01` | Hokuyo |
278
+ | Engineering 4th Floor | Temple | `2024-04-11-14-37-14` | Hokuyo |
279
+ | Engineering Corridor | Temple | `2024-04-11-15-24-29` | Hokuyo |
280
+ | SERC Lobby | Temple | `2025-07-08-13-32-08` | Hokuyo |
281
+ | Gladfelter Lobby | Temple | `2025-07-08-14-22-44` | Hokuyo |
282
+ | Mazur Lobby | Temple | `2025-07-18-17-43-11` | Hokuyo |
283
+ | Chow Yei Ching 4th Floor | HKU | `2025-11-10-15-53-51` | WLR-716/RPLIDAR |
284
+ | Centennial Campus Lobby | HKU | `2025-11-11-21-27-17` | WLR-716/RPLIDAR |
285
+ | Jockey Club 3rd Floor | HKU | `2025-11-18-22-13-37` | WLR-716/RPLIDAR |
286
+
287
+ ---
288
+
289
+ ## ROS Bag Contents
290
+
291
+ The original ROS bags in `rosbags/` contain:
292
+
293
+ | Topic | Message Type | Description |
294
+ |-------|--------------|-------------|
295
+ | `/scan` or `/*/scan` | `sensor_msgs/LaserScan` | LiDAR scans |
296
+ | `/robot_pose` | `geometry_msgs/PoseStamped` | Robot pose |
297
+ | `/cmd_vel` | `geometry_msgs/Twist` | Velocity commands |
298
+ | `/tf` | `tf2_msgs/TFMessage` | Transforms |
299
+ | `/map` | `nav_msgs/OccupancyGrid` | Occupancy map |
300
+ | `/camera/*` | `sensor_msgs/Image` | RGB/Depth images |
301
+ | `/odom` | `nav_msgs/Odometry` | Odometry |
302
+
303
+ ---
304
+
305
+ ## Related Resources
306
+
307
+ - **SALSA (Dataset and Labeling Framework):** https://github.com/TempleRAIL/semantic2d
308
+ - **S3-Net (Segmentation Algorithm):** https://github.com/TempleRAIL/s3_net
309
+ - **Semantic CNN Navigation:** https://github.com/TempleRAIL/semantic_cnn_nav
310
+ - **Dataset Zenodo:** DOI: 10.5281/zenodo.18350696
311
+
312
+ ---
313
+
314
+ ## Citation
315
+
316
+ ```bibtex
317
+ @article{xie2026semantic2d,
318
+ title={Semantic2D: Enabling Semantic Scene Understanding with 2D Lidar Alone},
319
+ author={Xie, Zhanteng and Pan, Yipeng and Zhang, Yinqiang and Pan, Jia and Dames, Philip},
320
+ journal={arXiv preprint arXiv:2409.09899},
321
+ year={2026}
322
+ }
323
+ ```
324
+
325
+ ---
326
+
327
+ ## License
328
+
329
+ Please refer to the associated paper and GitHub repository for licensing information.
330
+
331
+ ## Contact
332
+
333
+ - Zhanteng Xie: zhanteng@hku.hk
334
+
dataset/rosbags.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:99e9b1c1211e0bde265cb78db973df823815aa760813af28cee0a931971556ba
3
+ size 14326517368
dataset/semantic2d_data.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2322818ddbebebe371f8937961b13ac227abd03ffb029ae3dc21625f6b0f856d
3
+ size 1445584162