File size: 3,178 Bytes
6406f6e
514d9e3
 
 
 
 
 
 
 
 
 
 
6406f6e
514d9e3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-nc-4.0
task_categories:
  - image-segmentation
tags:
  - glass-surface-detection
  - rgb-d
  - depth-estimation
  - scene-understanding
pretty_name: RGBD-GSD (RGB-D Glass Surface Detection Dataset)
size_categories:
  - 1K<n<10K
---

# RGBD-GSD — RGB-D Glass Surface Detection Dataset

RGBD-GSD is the first large-scale **RGB-D glass surface detection** dataset, introduced in:

> **Leveraging RGB-D Data with Cross-Modal Context Mining for Glass Surface Detection**  
> Jiaying Lin\*, Yuen-Hei Yeung\*, Shuquan Ye, Rynson W. H. Lau  
> AAAI 2025  
> [arXiv](https://arxiv.org/abs/2206.11250) · [Project Page](https://jiaying.link/aaai2025-rgbdglass/)

## Dataset Summary

RGBD-GSD contains **3,009 RGB-D images** across a wide range of real-world glass surface categories, each paired with a precise binary segmentation mask and a depth map. Depth maps are captured with 3D sensors; blank (missing) regions in depth correspond to glass surfaces, providing a complementary detection cue to the RGB image.

| Split | Samples |
|-------|--------:|
| train | 2,400   |
| test  |   609   |
| **total** | **3,009** |

## Dataset Structure

Each sample has four columns:

| Column     | Type   | Description |
|------------|--------|-------------|
| `image_id` | string | Original filename stem, e.g. `00000001`. Enables round-trip fidelity. |
| `image`    | Image  | JPEG RGB image |
| `mask`     | Image  | PNG binary segmentation mask (glass = white, background = black) |
| `depth`    | Image  | PNG depth map (blank/missing regions often correspond to glass surfaces) |

The original on-disk layout is:
```
RGBD-GSD/
  train/
    images/   # {id}.jpg
    masks/    # {id}.png
    depths/   # {id}.png
  test/

```

## Loading the Dataset

```python
from datasets import load_dataset

ds = load_dataset("garrying/RGBD-GSD")
# or load a single split:
train_ds = load_dataset("garrying/RGBD-GSD", split="train")
test_ds  = load_dataset("garrying/RGBD-GSD", split="test")

sample = train_ds[0]
print(sample["image_id"])   # e.g. "00000001"
sample["image"].show()
sample["mask"].show()
sample["depth"].show()
```

## Converting Back to Raw Files

A helper script `parquet_to_raw.py` is included in this repo to restore the original directory structure:

```bash
# Download the helper
huggingface-cli download garrying/RGBD-GSD parquet_to_raw.py --repo-type dataset

# Restore all splits from HuggingFace
python parquet_to_raw.py --repo garrying/RGBD-GSD

# Restore only the test split to a custom directory
python parquet_to_raw.py --repo garrying/RGBD-GSD --splits test --out RGBD-GSD_test
```

Output structure matches the original:
```
RGBD-GSD/
  train/images/{id}.jpg  train/masks/{id}.png  train/depths/{id}.png
  test/…
```

## Citation

```bibtex
@article{aaai2025_rgbdglass,
  author    = {Lin, Jiaying and Yeung, Yuen-Hei and Ye, Shuquan and Lau, Rynson W.H.},
  title     = {Leveraging RGB-D Data with Cross-Modal Context Mining for Glass Surface Detection},
  journal   = {AAAI},
  year      = {2025},
}
```

## License

This dataset is released under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/). Non-commercial use only.