unstructured commited on
Commit
05f7f85
·
verified ·
1 Parent(s): cfc9c1f

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +118 -122
README.md CHANGED
@@ -1,127 +1,123 @@
1
  ---
2
- dataset_info:
3
- - config_name: default
4
- features:
5
- - name: idx
6
- dtype: int32
7
- - name: img
8
- dtype: image
9
- - name: width
10
- dtype: int32
11
- - name: height
12
- dtype: int32
13
- - name: category
14
- dtype:
15
- class_label:
16
- names:
17
- '0': bed
18
- '1': bookcase
19
- '2': chair
20
- '3': desk
21
- '4': misc
22
- '5': sofa
23
- '6': table
24
- '7': tool
25
- '8': wardrobe
26
- - name: mask
27
- dtype: image
28
- - name: model_id
29
- dtype: string
30
- - name: img_source
31
- dtype:
32
- class_label:
33
- names:
34
- '0': ikea
35
- '1': internet
36
- '2': self-taken
37
- - name: keypoints_2d
38
- list:
39
- list:
40
- list: float32
41
- - name: bbox
42
- list: int32
43
- - name: rot_mat
44
- list:
45
- list: float32
46
- - name: trans_mat
47
- list: float32
48
- - name: cam_position
49
- list: float32
50
- - name: focal_length
51
- dtype: float32
52
- - name: inplane_rotation
53
- dtype: float32
54
- - name: truncated
55
- dtype: bool
56
- - name: occluded
57
- dtype: bool
58
- - name: slightly_occluded
59
- dtype: bool
60
- splits:
61
- - name: train
62
- num_bytes: 1469522530
63
- num_examples: 10069
64
- download_size: 3478665604
65
- dataset_size: 1469522530
66
- - config_name: models
67
- features:
68
- - name: model_id
69
- dtype: string
70
- - name: category
71
- dtype:
72
- class_label:
73
- names:
74
- '0': bed
75
- '1': bookcase
76
- '2': chair
77
- '3': desk
78
- '4': misc
79
- '5': sofa
80
- '6': table
81
- '7': tool
82
- '8': wardrobe
83
- - name: model
84
- struct:
85
- - name: bytes
86
- dtype: binary
87
- - name: path
88
- dtype: string
89
- - name: model_raw
90
- struct:
91
- - name: bytes
92
- dtype: binary
93
- - name: path
94
- dtype: string
95
- - name: model_source
96
- dtype:
97
- class_label:
98
- names:
99
- '0': ikea
100
- '1': self-scanned
101
- - name: voxel_model
102
- dtype:
103
- array3_d:
104
- shape:
105
- - 128
106
- - 128
107
- - 128
108
- dtype: uint8
109
- - name: keypoints_3d
110
- list:
111
- list: float32
112
- splits:
113
- - name: train
114
- num_bytes: 2261052746
115
- num_examples: 735
116
- download_size: 6909052692
117
- dataset_size: 2261052746
118
  configs:
119
  - config_name: default
120
- data_files:
121
- - split: train
122
- path: data/train-*
123
  - config_name: models
124
- data_files:
125
- - split: train
126
- path: models/train-*
127
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ license: cc-by-4.0
3
+ task_categories:
4
+ - image-to-3d
5
+ - image-segmentation
6
+ - keypoint-detection
7
+ tags:
8
+ - 3d
9
+ - voxel
10
+ - mesh
11
+ - pose-estimation
12
+ - computer-vision
13
+ pretty_name: Pix3D
14
+ size_categories:
15
+ - 10K<n<100K
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
  configs:
17
  - config_name: default
18
+ data_files: data/default-*
 
 
19
  - config_name: models
20
+ data_files: data/models-*
 
 
21
  ---
22
+
23
+ # Pix3D
24
+
25
+ Pix3D is a large-scale dataset of real images paired with pixel-aligned 3D shapes, released alongside
26
+ [Sun, Wu, Zhang et al., *Pix3D: Dataset and Methods for Single-Image 3D Shape Modeling* (CVPR 2018)](http://pix3d.csail.mit.edu/papers/pix3d_cvpr.pdf).
27
+ This Hub repo repackages the [official release](https://github.com/xingyuansun/pix3d) into two Hugging Face
28
+ `datasets` configs so both the image annotations and the underlying 3D assets can be loaded directly with
29
+ `load_dataset`, with no manual download/unzip step.
30
+
31
+ - **Project page:** http://pix3d.csail.mit.edu
32
+ - **Original repository:** https://github.com/xingyuansun/pix3d
33
+ - **License:** [Creative Commons Attribution 4.0 International (CC BY 4.0)](http://creativecommons.org/licenses/by/4.0/)
34
+
35
+ ## Dataset structure
36
+
37
+ The dataset is split into two configs because 10,069 image annotations reference only 735 unique physical
38
+ 3D objects (many objects were photographed multiple times). Keeping them separate avoids duplicating each
39
+ mesh/voxel grid across every image that uses it; join the two configs on `model_id` when you need both.
40
+
41
+ ```python
42
+ from datasets import load_dataset
43
+
44
+ annotations = load_dataset("unstructured/pix3d", "default") # 10,069 rows, one per image
45
+ models = load_dataset("unstructured/pix3d", "models") # 735 rows, one per unique 3D object
46
+ ```
47
+
48
+ ### `default` config — one row per annotated image
49
+
50
+ | Column | Type | Description |
51
+ |---|---|---|
52
+ | `idx` | int32 | Unique incrementing row identifier |
53
+ | `img` | Image | The photograph containing the object |
54
+ | `width`, `height` | int32 | Image dimensions (`img_size` in the original JSON) |
55
+ | `category` | ClassLabel | Object category (`bed`, `bookcase`, `chair`, `desk`, `misc`, `sofa`, `table`, `tool`, `wardrobe`) |
56
+ | `mask` | Image | Binary segmentation mask isolating the object in `img` |
57
+ | `model_id` | string | Join key into the `models` config identifying which 3D object appears in this image |
58
+ | `img_source` | ClassLabel | Image provenance: `ikea`, `internet`, or `self-taken` |
59
+ | `keypoints_2d` | list[list[list[float]]] | 2D keypoints per annotator, shape `[n_annotators, n_keypoints, 2]`, in pixel coordinates (origin top-left, `+x` right, `+y` down); `[-1, -1]` marks a keypoint an annotator judged unlabelable (e.g. occluded) |
60
+ | `bbox` | list[int] | Object bounding box `[x_from, y_from, x_to, y_to]` |
61
+ | `rot_mat`, `trans_mat` | list[float] | Rotation matrix (3x3) and translation vector applied to the object for rendering |
62
+ | `cam_position`, `inplane_rotation` | list[float] / float | Estimated camera position and in-plane rotation (object-centered), used to evaluate viewer-centered predictions against the canonical view |
63
+ | `focal_length` | float | Estimated focal length in mm (sensor width fixed at 32mm) |
64
+ | `truncated`, `occluded`, `slightly_occluded` | bool | Visibility flags for the object in the image (`occluded` and `slightly_occluded` are mutually exclusive) |
65
+
66
+ ### `models` config — one row per unique 3D object
67
+
68
+ | Column | Type | Description |
69
+ |---|---|---|
70
+ | `model_id` | string | Unique identifier for this 3D object; matches `model_id` in the `default` config |
71
+ | `category` | ClassLabel | Same category enumeration as the `default` config |
72
+ | `model` | binary (glb) | The object's textured mesh, converted from the original `.obj`/`.mtl`/texture files into a single self-contained binary glTF (`.glb`) blob via `trimesh`, analogous to how `img`/`mask` embed PNG bytes |
73
+ | `model_raw` | binary (glb) or null | Raw, unprocessed scanned mesh, same glb encoding as `model`. Only populated for objects from the full Pix3D release that includes raw scans (`self-scanned` sources); this standard release does not include raw scans, so this column is `null` for every row here |
74
+ | `model_source` | ClassLabel | 3D model provenance: `ikea` or `self-scanned` |
75
+ | `voxel_model` | Array3D (128×128×128, uint8) | Voxelized occupancy grid of the object, parsed from the original `voxel.mat` file (`1` = occupied) |
76
+ | `keypoints_3d` | list[list[float]] | 3D keypoint positions `[n_keypoints, 3]` in the model's canonical coordinate frame (`+x` left, `+y` up, `+z` inward) |
77
+
78
+ ### Coordinate conventions (from the original release)
79
+
80
+ - **2D keypoints / image pixels:** origin top-left, `+x` right, `+y` down.
81
+ - **Mesh (`model`) canonical frame:** `+x` left, `+y` up, `+z` inward.
82
+ - **Voxel (`voxel_model`) canonical frame:** `+x` left, `+y` outward, `+z` up.
83
+ - `rot_mat`/`trans_mat` are defined in camera coordinates and applied to the object for rendering; they are
84
+ not directly usable to rotate viewer-centered predictions back to canonical view. Use `cam_position` and
85
+ `inplane_rotation` instead — both are defined in the object's own coordinate frame and reproduce the
86
+ original image up to a homography, which is what the original authors used for viewpoint evaluation.
87
+
88
+ ## Category / label distribution
89
+
90
+ | Category | # images |
91
+ |---|---|
92
+ | chair | 3,839 |
93
+ | sofa | 1,947 |
94
+ | table | 1,870 |
95
+ | bed | 994 |
96
+ | desk | 700 |
97
+ | bookcase | 361 |
98
+ | wardrobe | 243 |
99
+ | misc | 68 |
100
+ | tool | 47 |
101
+
102
+ ## License and attribution
103
+
104
+ The Pix3D dataset is licensed under a
105
+ [Creative Commons Attribution 4.0 International License (CC BY 4.0)](http://creativecommons.org/licenses/by/4.0/).
106
+ You are free to share and adapt the data for any purpose, including commercially, provided you give
107
+ appropriate credit to the original authors.
108
+
109
+ If you use this dataset, please cite the original paper:
110
+
111
+ ```bibtex
112
+ @inproceedings{pix3d,
113
+ title={Pix3D: Dataset and Methods for Single-Image 3D Shape Modeling},
114
+ author={Sun, Xingyuan and Wu, Jiajun and Zhang, Xiuming and Zhang, Zhoutong and Zhang, Chengkai and Xue, Tianfan and Tenenbaum, Joshua B and Freeman, William T},
115
+ booktitle={IEEE Conference on Computer Vision and Pattern Recognition (CVPR)},
116
+ year={2018}
117
+ }
118
+ ```
119
+
120
+ For questions about the original dataset, contact Xingyuan Sun (xingyuansun.cs@gmail.com) or Jiajun Wu
121
+ (jiajunwu@mit.edu). This Hub repackaging was produced by converting the official release's `pix3d.json`
122
+ and asset folders (`img/`, `mask/`, `model/`) into the two configs described above; no annotation values
123
+ were modified, only the file layout and encoding (mesh → glb, voxel `.mat` → numpy array).