NYUv2 / README.md
dronefreak's picture
Add dataset card and animated banner (#2)
2b4471d
|
Raw History Blame Contribute Delete
7.68 kB
metadata
language:
  - en
license: other
size_categories:
  - 1K<n<10K
task_categories:
  - depth-estimation
  - image-segmentation
pretty_name: NYU Depth v2 (labeled)
license_name: nyu-depth-v2-no-license-specified
license_link: https://cs.nyu.edu/~fergus/datasets/nyu_depth_v2.html
tags:
  - rgb-d
  - indoor
  - kinect
  - semantic-segmentation
  - instance-segmentation
  - monocular-depth
  - computer-vision
dataset_info:
  features:
    - name: image
      dtype: image
    - name: depth
      dtype: image
    - name: raw_depth
      dtype: image
    - name: label894
      dtype: image
    - name: label40
      dtype: image
    - name: label13
      dtype: image
    - name: instance
      dtype: image
    - name: index
      dtype: int32
    - name: scene
      dtype: string
    - name: scene_type
      dtype: string
    - name: raw_rgb_filename
      dtype: string
  splits:
    - name: train
      num_bytes: 580957321
      num_examples: 795
    - name: test
      num_bytes: 476731920
      num_examples: 654
  download_size: 1057841240
  dataset_size: 1057689241
configs:
  - config_name: default
    data_files:
      - split: train
        path: data/train-*
      - split: test
        path: data/test-*

NYU Depth v2: Densely Labeled Indoor RGB-D Frames

Task Dataset Format Classes Splits License

Unofficial redistribution of the NYU Depth v2 labeled subset (1,449 frames) as viewer-ready Parquet: RGB, filled and raw depth, the original 894-class labels, the standard 40- and 13-class labels, instance masks, and scene names, with the official 795 / 654 split.

Dataset Description

Disclaimer

This repository is not an official release of NYU Depth v2.

NYU Depth v2 was created by Nathan Silberman, Derek Hoiem, Pushmeet Kohli and Rob Fergus (New York University), who retain all copyright and intellectual property rights. This repository does not claim ownership of any images, annotations, or metadata.

No license was specified by the original authors. The project page only asks users to cite the paper below. This copy is an unofficial redistribution for research purposes, with full attribution. If you are an author or rights holder and want this repository removed or changed, please open a discussion on this repository and it will be addressed promptly.

The 40-class mapping (Gupta et al., CVPR 2013) and 13-class mapping (as used by Couprie et al. and SceneNet) are taken from Ankur Handa's nyuv2-meta-data (no license specified).


Dataset Overview

NYU Depth v2 contains video sequences of 464 indoor scenes recorded with a Microsoft Kinect in three US cities. The labeled subset (this repository) has 1,449 RGB-D frames (640x480) with dense per-pixel labels and instance masks. It is one of the most widely used benchmarks for monocular depth estimation and indoor semantic segmentation.


Changes from the Official Release

  • Converted the official nyu_depth_v2_labeled.mat (MATLAB v7.3) into Parquet (one row per frame), so the Dataset Viewer and datasets work without MATLAB or h5py.
  • Depth (depth, raw_depth): stored as 16-bit PNG in millimetres (round(meters * 1000)), so the maximum quantization error is 0.5 mm. Divide by 1000 to get meters.
  • Labels: label894 is the official label map, unchanged (16-bit PNG). label40 and label13 are derived from it with the standard mappings. Both were checked during the build against Handa's published versions on all 1,449 frames: the 40-class maps match labels40.mat exactly (0 differing pixels), and the 13-class maps match his PNGs 100%.
  • Official 795 / 654 train/test split from splits.mat.
  • Not included: the raw video sequences (~428 GB), accelerometer data, and the toolbox.
  • No images were added, removed, or modified. No labels were changed.

Dataset Structure

Column Content
image RGB, 640x480 PNG
depth filled (in-painted) depth, 16-bit PNG, millimetres
raw_depth raw Kinect depth (with holes = 0), 16-bit PNG, millimetres
label894 original class labels, 0 = unlabeled, 1..894 (names in the official .mat)
label40 40-class labels (0 = unlabeled), Gupta et al. mapping
label13 13-class labels (0 = unlabeled)
instance instance ids within each class
index 1-based frame index in the official .mat
scene scene name, e.g. kitchen_0023
scene_type scene category, e.g. kitchen
raw_rgb_filename matching frame in the raw video dump

Splits: train 795 · test 654 (1,449 total).

Many depth benchmarks evaluate on the valid region [45:471, 41:601] (rows, columns), which excludes the projection border.

Classes

40-class (label40, 1..40): wall, floor, cabinet, bed, chair, sofa, table, door, window, bookshelf, picture, counter, blinds, desk, shelves, curtain, dresser, pillow, mirror, floor mat, clothes, ceiling, books, refridgerator, television, paper, towel, shower curtain, box, whiteboard, person, night stand, toilet, sink, lamp, bathtub, bag, otherstructure, otherfurniture, otherprop

13-class (label13, 1..13): bed, books, ceiling, chair, floor, furniture, objects, picture, sofa, table, tv, wall, window

Usage

import numpy as np
from datasets import load_dataset

ds = load_dataset("dronefreak/NYUv2")
row = ds["train"][0]
rgb = row["image"]
depth_m = np.asarray(row["depth"], dtype=np.float32) / 1000.0   # meters
labels40 = np.asarray(row["label40"])

Dataset Sources

Citation

@inproceedings{silberman2012indoor,
  title     = {Indoor Segmentation and Support Inference from RGBD Images},
  author    = {Silberman, Nathan and Hoiem, Derek and Kohli, Pushmeet and Fergus, Rob},
  booktitle = {ECCV},
  year      = {2012}
}

If you use the 40-class labels, also cite: Gupta, Arbelaez, Malik, Perceptual Organization and Recognition of Indoor Scenes from RGB-D Images, CVPR 2013.


License

The original authors have not specified a license for NYU Depth v2; the project page only requires citation of the paper above. This repository therefore uses license: other and redistributes the data unofficially for research purposes, with attribution. Users are responsible for ensuring their use complies with any terms the original authors may set. Rights holders can request removal by opening a discussion on this repository.