Every9D / README.md
limpbot's picture
Dataset card: list the train split, final sizes
239901a verified
|
Raw History Blame Contribute Delete
10.5 kB
---
license: cc-by-4.0
pretty_name: Every9D
tags:
- 6d-pose-estimation
- 9d-pose-estimation
- category-level
- rgb-d
- uco3d
size_categories:
- 1M<n<10M
configs:
- config_name: frames
data_files:
- {split: train, path: "frames/train-*.parquet"}
- {split: test, path: "frames/test-*.parquet"}
- config_name: frames_meshes
data_files:
- {split: train, path: "frames_meshes/train-*.parquet"}
- {split: test, path: "frames_meshes/test-*.parquet"}
- config_name: tforms
data_files:
- {split: train, path: "tforms/train.parquet"}
- {split: test, path: "tforms/test.parquet"}
---
# Every9D
From the paper [Every9D-21M: Large-Scale Real-World 9D Canonicalization of Everyday Objects](https://arxiv.org/abs/2605.28270).
Every9D gives the videos of [uCO3D](https://github.com/facebookresearch/uco3d)
category-level 9-D object poses: rotation, translation and 3-D size, expressed in
one canonical frame per category.
| Split | Sequences | Frames in `frames` | Categories |
|-------|-----------|--------------------|------------|
| `train` | 110,543 | 1,768,255 | 894 |
| `test` | 3,651 | 58,382 | 898 |
| **Total** | **114,194** | **1,826,637** | **959** |
The `tforms` config holds one row per sequence, so 114,194 rows in total.
| Config | What it holds | Size | Needs uCO3D? |
|--------|---------------|------|--------------|
| `tforms` | One rigid transform per sequence, plus size and symmetry. Gives a pose for **every frame** of a uCO3D video | ~20 MB | yes, for images and cameras |
| `frames` | Ready-to-train RGB-D crops at 256 × 256, up to 16 frames per sequence | ~270 GB | no |
| `frames_meshes` | The `alpha500` mesh of each sequence, used for the amodal masks | ~1 GB | no |
Train and test are disjoint, and no object appears in both. The 65 categories with
a single sequence appear in test only, so they have no train object.
## Option A: use the crops
No uCO3D download is needed. Stream the data, as the full train split is about 260 GB:
```python
from datasets import load_dataset
import numpy as np, pyarrow as pa
def decode(t):
"""Decode one stored tensor into a numpy array."""
raw = t["data"]
if t["z"] == "zstd":
raw = pa.Codec("zstd").decompress(raw, decompressed_size=t["nbytes"], asbytes=True)
if t["pack"] == "bits":
n = int(np.prod(t["shape"]))
return np.unpackbits(np.frombuffer(raw, np.uint8), count=n).astype(bool).reshape(t["shape"])
if t["q"]:
a = np.frombuffer(raw, np.uint8 if t["q"] == "u8" else np.uint16).astype(np.float32)
return (a / np.float32(t["scale"])).reshape(t["shape"])
return np.frombuffer(raw, np.dtype(t["dtype"])).reshape(t["shape"])
ds = load_dataset("GenIntelLab/Every9D", "frames", split="test", streaming=True)
row = next(iter(ds))
rgb = decode(row["rgb"]) # (3, 256, 256) float32 in [0, 1]
pose = decode(row["cam_tform4x4_obj"]) # (4, 4)
```
Tensors are stored compressed, so the Hub viewer shows them as binary. Always go
through `decode`. Each row has these fields:
| Field | Shape | Meaning |
|-------|-------|---------|
| `frame_id` | str | `<category>/<sequence>/<frame_number>` |
| `object_id` | str | `<category>/<sequence>` |
| `category`, `category_id` | str, int | Every9D category |
| `rgb` | (3, 256, 256) | float32 in [0, 1] |
| `depth`, `depth_mask` | (256, 256) | depth in the sequence's units (see below), valid pixels |
| `fo_mask` | (256, 256) | visible object mask |
| `fo_mask_amodal`, `fo_mask_amodal_dt` | (256, 256) | `alpha500` mesh rendered under the pose, and its distance transform |
| `cam_intr4x4` | (4, 4) | intrinsics **of the crop** |
| `cam_tform4x4_obj` | (4, 4) | object → camera, rigid |
| `obj_ncds0c_tform4x4_obj` | (4, 4) | normalised object coordinates → object space |
| `cam_tform4x4_obj_ncds` | (4, 4) | `cam_tform4x4_obj @ obj_ncds0c_tform4x4_obj` |
| `obj_size3d` | (3,) | box side lengths along X, Y, Z |
| `obj_syms` | (3,) | per-axis symmetry code |
| `cam_bbox2d`, `cam_bbox3d` | (4,), (8, 3) | object boxes in the crop and in camera space |
## Option B: poses for every frame of a uCO3D video
Download uCO3D's `metadata.sqlite`, and any videos you need, with
[its download script](https://github.com/facebookresearch/uco3d). Then combine its
cameras with the `tforms` table:
```python
import sqlite3, struct
import numpy as np
from datasets import load_dataset
tforms = {}
for split in ("train", "test"):
for r in load_dataset("GenIntelLab/Every9D", "tforms", split=split):
tforms[r["sequence_name"]] = r
# uCO3D (PyTorch3D) camera -> Every9D camera (OpenGL: +X right, +Y up, -Z forward)
CAM = np.diag([-1.0, 1.0, -1.0, 1.0])
def cam_tform4x4_obj(R_blob, T_blob, world_tform4x4_obj):
"""Object -> camera, from uCO3D's _viewpoint_R and _viewpoint_T."""
cam_tform4x4_world = np.eye(4)
cam_tform4x4_world[:3, :3] = np.array(struct.unpack("<9f", R_blob)).reshape(3, 3).T
cam_tform4x4_world[:3, 3] = struct.unpack("<3f", T_blob)
return CAM @ cam_tform4x4_world @ world_tform4x4_obj
def cam_intr3x3(f_blob, p_blob, size_blob):
"""Pixel intrinsics of the full frame, for intrinsics format ndc_isotropic."""
(fx, fy), (px, py) = struct.unpack("<2f", f_blob), struct.unpack("<2f", p_blob)
h, w = struct.unpack("<2I", size_blob)
s = min(h, w) / 2.0
return np.array([[fx * s, 0, -px * s + w / 2], [0, fy * s, -py * s + h / 2], [0, 0, 1]])
db = sqlite3.connect("metadata.sqlite")
sequence = "109-89486-96842"
t = tforms[sequence]
world_tform4x4_obj = np.array(t["world_tform4x4_obj"]).reshape(4, 4)
poses = {}
for frame, R, T, f, p, size in db.execute(
"SELECT frame_number, _viewpoint_R, _viewpoint_T, _viewpoint_focal_length,"
" _viewpoint_principal_point, _image_size FROM frame_annots"
" WHERE sequence_name = ? ORDER BY frame_number", (sequence,)):
poses[frame] = (cam_tform4x4_obj(R, T, world_tform4x4_obj), cam_intr3x3(f, p, size))
```
### From uCO3D's camera pose to Every9D's
`cam_tform4x4_obj` above takes three steps from uCO3D's camera to the Every9D pose:
```text
cam_tform4x4_obj = CAM @ cam_tform4x4_world @ world_tform4x4_obj
```
1. **Build uCO3D's camera matrix, `cam_tform4x4_world`.** `_viewpoint_R` and
`_viewpoint_T` use PyTorch3D's row-vector convention, `x_cam = x_world R + T`. As
a matrix for column vectors, the rotation block is therefore `R.T` and the
translation is `T`. The result maps the sequence's SfM frame into uCO3D's camera,
with +X left, +Y up and +Z forward.
2. **Change the object frame with `world_tform4x4_obj`.** Multiplying on the right
replaces the arbitrary SfM frame with the Every9D object frame. This matrix
already includes the category's canonical rotation and axis order. It is rigid, so
the result stays in the sequence's SfM units.
3. **Change the camera to OpenGL with `CAM = diag(-1, 1, -1, 1)`.** Multiplying on
the left negates camera X and Z, which gives +X right, +Y up and -Z forward. For
OpenCV instead (+X right, +Y down, +Z forward), use `diag(-1, -1, 1, 1)`.
For frames that are in the `frames` config, the OpenGL result equals the stored
`cam_tform4x4_obj`. The intrinsics do not: `cam_intr3x3` gives those of the full
frame, while the stored `cam_intr4x4` belongs to the 256 × 256 crop.
### Projecting points
To project an object point `x` in object space, apply `cam_tform4x4_obj` to get
`(X, Y, Z)` with `Z < 0`, then `u = cx + fx * X / -Z` and `v = cy - fy * Y / -Z`.
Each row of `tforms` has these fields:
| Field | Meaning |
|-------|---------|
| `sequence_name` | **Join key.** Unique in uCO3D, and the same name as in `metadata.sqlite` |
| `uco3d_category` | Category as uCO3D spells it (`pug-dog`) |
| `category` | Category as Every9D spells it (`pug_dog`), as in `frame_id` |
| `split` | `train` or `test` |
| `world_tform4x4_obj` | 16 floats, row-major: rigid, Every9D object frame → uCO3D sequence (SfM) frame |
| `obj_ncds0c_tform4x4_obj` | 16 floats, row-major: normalised object coordinates → object frame |
| `obj_size3d` | Box side lengths along X, Y, Z |
| `obj_syms` | Per-axis symmetry code |
Join on `sequence_name`, not on the category: the two spellings differ for a few
categories.
## Conventions
- **Camera:** OpenGL, with +X right, +Y up and -Z forward. Objects in front of the camera have negative camera Z.
- **Object frame:** X = right, Y = top, Z = back of the category's canonical orientation.
- **Object origin:** the origin of the object frame is **not** the object's centre. For a centred pose use `cam_tform4x4_obj @ obj_ncds0c_tform4x4_obj`, which maps a normalised object, centred with its longest side spanning [-1, 1], into the camera.
- **Units:** translations, depth and `obj_size3d` are in the units of each sequence's SfM reconstruction, **not metres**. An aerosol can may be 1.4 units tall, so do not compare absolute sizes across sequences.
## Limitations
- Poses inherit uCO3D's cameras. Canonical orientations were reviewed per category, but individual sequences can still be wrong.
- `alpha500` meshes are alpha-shape reconstructions from uCO3D's segmented point clouds, not artist meshes. Thin parts can be missing, so the amodal masks are approximate.
- `frames` holds up to 16 frames per sequence, and at least 9. Use Option B to reach the rest.
- `frames_meshes` has 10 sequences stored twice (9 in train, 1 in test), as identical copies, so it has 10 more rows than there are sequences.
## License and citation
Released under [CC BY 4.0](https://creativecommons.org/licenses/by/4.0/). The images,
depth and cameras derive from uCO3D, also CC BY 4.0, so please credit both.
```bibtex
@misc{sommer2026every9d21mlargescalerealworld9d,
title={Every9D-21M: Large-Scale Real-World 9D Canonicalization of Everyday Objects},
author={Leonhard Sommer and Emil Akopyan and Adam Kortylewski},
year={2026},
eprint={2605.28270},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2605.28270},
}
@misc{liu2025uncommonobjects3d,
title={UnCommon Objects in 3D},
author={Xingchen Liu and Piyush Tayal and Jianyuan Wang and Jesus Zarzar and Tom Monnier and Konstantinos Tertikas and Jiali Duan and Antoine Toisoul and Jason Y. Zhang and Natalia Neverova and Andrea Vedaldi and Roman Shapovalov and David Novotny},
year={2025},
eprint={2501.07574},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2501.07574},
}
```