File size: 2,344 Bytes
2916532
73c8ae8
 
 
 
 
 
 
 
 
 
 
2916532
73c8ae8
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
---
license: cc-by-nc-4.0
task_categories:
  - image-segmentation
tags:
  - mirror-detection
  - segmentation
  - edge-detection
  - computer-vision
pretty_name: Progressive Mirror Detection (PMD)
size_categories:
  - 1K<n<10K
---

# Progressive Mirror Detection (PMD) Dataset

The **PMD** dataset is a benchmark for mirror surface detection introduced in the CVPR 2020 paper [*Progressive Mirror Detection*](https://jiaying.link/cvpr2020-pgd/).

## Dataset Statistics

| Split | Images | Mask | Edge |
|-------|-------:|:----:|:----:|
| train |  5,095 | ✓    | ✓    |
| test  |    571 | ✓    | —    |
| **total** | **5,666** | | |

## Columns

| Column | Type | Description |
|--------|------|-------------|
| `image_id` | string | Original filename stem (e.g. `000000000164`), unique within each split |
| `image` | Image (RGB JPEG) | Input scene photograph |
| `mask` | Image (grayscale PNG) | Binary mirror segmentation mask |
| `edge` | Image (grayscale PNG) | Mirror edge map (train only; `None` for test) |

## Usage

```python
from datasets import load_dataset

ds = load_dataset("garrying/PMD")

sample = ds["train"][0]
sample["image_id"]  # original filename stem, e.g. "000000000164"
sample["image"]     # PIL Image (RGB)
sample["mask"]      # PIL Image (grayscale)
sample["edge"]      # PIL Image (grayscale, None for test)
```

## Converting Back to Raw Files

A helper script [`parquet_to_raw.py`](parquet_to_raw.py) is included to restore the original folder layout:

```bash
# download the script
huggingface-cli download garrying/PMD parquet_to_raw.py --repo-type dataset --local-dir .

# convert all splits
python parquet_to_raw.py --repo garrying/PMD --out PMD
```

Output layout:
```
PMD/
  train/  image/  mask/  edge/
  test/   image/  mask/
```

## Pretrained Model

A pretrained **PMDNet** checkpoint is available at [`garrying/PMD-PMDNet`](https://huggingface.co/garrying/PMD-PMDNet).

## License

This dataset is released under [CC BY-NC 4.0](https://creativecommons.org/licenses/by-nc/4.0/).
Please cite the paper below if you use this dataset in your work.

## Citation

```bibtex
@INPROCEEDINGS{PMD:2020,
   Author    = {Jiaying Lin and Guodong Wang and Rynson W.H. Lau},
   Title     = {Progressive Mirror Detection},
   Booktitle = {Proc. CVPR},
   Year      = {2020}
}
```

## Contact

csjylin@gmail.com