VMD-D / README.md
garrying's picture
Upload README.md with huggingface_hub
4df0d65 verified
metadata
license: cc-by-nc-4.0
task_categories:
  - image-segmentation
tags:
  - mirror-detection
  - video-understanding
  - video-mirror-detection
  - scene-understanding
pretty_name: VMD-D (Video Mirror Detection Dataset)
size_categories:
  - 10K<n<100K

VMD-D — Video Mirror Detection Dataset

VMD-D is the first large-scale dataset for Video Mirror Detection, introduced in:

Learning to Detect Mirrors from Videos via Dual Correspondences
Jiaying Lin*, Xin Tan*, Rynson W. H. Lau
CVPR 2023
Paper · Project Page

Dataset Summary

VMD-D contains 14,987 image frames from 269 videos with corresponding manually annotated binary mirror masks. Videos are split into clips, and each clip is an independent sequence segment.

Split Clips Frames
train 144 7,836
test 127 7,151

Dataset Structure

Each sample has four columns:

Column Type Description
image_id string Original path stem: {clip_id}/{frame_id}, e.g. 056_12/0001. Enables round-trip fidelity.
clip_id string Video clip identifier, e.g. 056_12
image Image JPEG video frame
mask Image PNG binary segmentation mask (mirror = white, background = black)

The original on-disk layout is:

VMD/
  train/
    {clip_id}/
      JPEGImages/            # {frame}.jpg
      SegmentationClassPNG/  # {frame}.png
  test/
    …

Loading the Dataset

from datasets import load_dataset

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

sample = train_ds[0]
print(sample["image_id"])   # e.g. "056_12/0001"
sample["image"].show()
sample["mask"].show()

Converting Back to Raw Files

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

# Download the helper
huggingface-cli download garrying/VMD-D parquet_to_raw.py --repo-type dataset

# Restore all splits from HuggingFace
python parquet_to_raw.py --repo garrying/VMD-D

# Restore only the test split to a custom directory
python parquet_to_raw.py --repo garrying/VMD-D --splits test --out VMD_test

Output structure matches the original:

VMD/
  train/{clip_id}/JPEGImages/{frame}.jpg
  train/{clip_id}/SegmentationClassPNG/{frame}.png
  test/…

Citation

@InProceedings{Lin_2023_CVPR,
  author    = {Lin, Jiaying and Tan, Xin and Lau, Rynson W. H.},
  title     = {Learning to Detect Mirrors from Videos via Dual Correspondences},
  booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR)},
  year      = {2023},
}

License

This dataset is released under CC BY-NC 4.0. Non-commercial use only.