Datasets:

File size: 6,672 Bytes
18b1fbb
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
---
license: cc-by-4.0
pretty_name: ocdit
tags:
- bop
- 6d-pose
- synthetic
- webdataset
task_categories:
- object-detection
- image-segmentation
size_categories:
- 1M<n<10M
---

# ocdit

This dataset was generated as part of the ICCV 2025 publication *Conditional Latent Diffusion Models for Zero-Shot Instance Segmentation* (see [Citation](#citation)).

Synthetic, BOP-format training data for unseen object computer vision tasks, such as 6D pose estimation, instance segmentation, and detection. Scenes are physically rendered with BlenderProc; every object
instance carries a 6D pose, amodal + visible masks, bounding boxes, and a visibility fraction.
Alongside the scenes we ship the source **meshes** (`.glb`) and precomputed
**templates** (`.h5`) so the data is self-contained for training. 

Object identity is **name-based**: the string `obj_id` in each annotation is the
object label, and it matches the mesh and template filename stems exactly
(e.g. `obj_id: "11pro_SL_TRX_FG"` ↔ `meshes/gso/11pro_SL_TRX_FG.glb` ↔
`templates/gso/11pro_SL_TRX_FG.h5`).

## Structure

```
.
β”œβ”€β”€ shards/                     # WebDataset tar shards (BOP samples)
β”‚   β”œβ”€β”€ gso.random/             # shard-NNNNNN.tar
β”‚   β”œβ”€β”€ gso.flying/
β”‚   β”œβ”€β”€ oo3d.random/
β”‚   └── oo3d.flying/
β”œβ”€β”€ meshes/                     # source geometry, one file per object
β”‚   β”œβ”€β”€ gso/<label>.glb
β”‚   └── oo3d/<label>.glb
└── templates/                  # precomputed reference views, one file per object
    β”œβ”€β”€ gso/<label>.h5
    └── oo3d/<label>.h5
```

Splits are named `<source>.<scene_type>`:

- **source** β€” `gso` or `oo3d` (the object bank).
- **scene_type** β€” `random` (objects dropped onto a plane) or `flying`
  (hdri rendered objects suspended in free space).

| split | shards | samples | size |
|-------|-------:|--------:|-----:|
| `gso.random`  | 1000 | ~1.0M | 299 GB |
| `gso.flying`  |  500 | ~0.5M | 110 GB |
| `oo3d.random` | 1000 | ~1.0M | 288 GB |
| `oo3d.flying` |  490 | ~0.49M | 102 GB |

| assets | gso | oo3d |
|--------|----:|-----:|
| meshes (`.glb`) | 1029 | 5672 |
| templates (`.h5`) | 1029 | 5672 |

Each shard holds 1000 samples (RGB frames). Sample keys are
`{scene_id:06d}_{frame_id:06d}` and are globally unique within a split.
Per sample, a shard contains:

| file | content |
|------|---------|
| `<key>.rgb.jpg`        | RGB image, 640Γ—480 |
| `<key>.depth.png`      | 16-bit depth (see `depth_scale` in the camera file) |
| `<key>.camera.json`    | `cam_K`, `cam_R_w2c`, `cam_t_w2c`, `depth_scale` |
| `<key>.gt.json`        | per-instance `cam_R_m2c`, `cam_t_m2c` (mm), string `obj_id` |
| `<key>.gt_info.json`   | per-instance `bbox_obj`, `bbox_visib`, `px_count_*`, `visib_fract` |
| `<key>.mask.json`      | amodal masks (RLE) |
| `<key>.mask_visib.json`| visible masks (RLE) |

This is the BOP `train_pbr` schema, packed as WebDataset. Translations are in
millimeters; `cam_K` is the 3Γ—3 intrinsics in row-major order.

> **Note β€” pixel-accurate visible masks.** `mask_visib` (and the derived `visib_fract`) are computed directly from Blender's native instance segmentation rather than BlenderProc's BopWriterUtility default depth-thresholding, which can assign a pixel to multiple objects and leaves artifacts where foreground depth changes sharply. This dataset was rendered with the fix from BlenderProc PR [#1229](https://github.com/DLR-RM/BlenderProc/pull/1229) (see issue [#1228](https://github.com/DLR-RM/BlenderProc/issues/1228)); the PR was not yet merged upstream at publication time.

## Loading the shards

Shards decode with the BOP toolkit's WebDataset helper. Iterate the tars with
[`webdataset`](https://github.com/webdataset/webdataset) and decode each sample
with `bop_toolkit_lib.dataset.bop_webdataset.decode_sample` (RGB is JPEG, so
pass `rgb_suffix=".jpg"`):

```python
import glob
import webdataset as wds
from bop_toolkit_lib.dataset import bop_webdataset

shards = sorted(glob.glob("shards/gso.random/shard-*.tar"))
ds = wds.WebDataset(shards, shardshuffle=True)

for sample in ds:
    data = bop_webdataset.decode_sample(
        sample,
        decode_camera=True,
        decode_rgb=True,
        decode_depth=True,
        decode_gt=True,
        decode_gt_info=True,
        decode_mask=True,
        decode_mask_visib=True,
        rgb_suffix=".jpg",
    )
    scene_id, view_id = str(sample["__key__"]).split("_")
    rgb = data["im_rgb"]                 # (H, W, 3) uint8
    labels = [ann["obj_id"] for ann in data["gt"]]          # string object names
    poses = [(ann["cam_R_m2c"], ann["cam_t_m2c"]) for ann in data["gt"]]
    visib = [i["visib_fract"] for i in data["gt_info"]]
```

## Loading the templates

Each `templates/<source>/<label>.h5` holds a single `images` dataset: rows of
**JPEG-encoded bytes**, one per reference view. Rows are ordered
`[0, 42)` = 42 icosphere views (canonical viewpoints on a sphere) followed by
`[42, 512)` = in-the-wild crops. Decode a row with PIL:

```python
import io
import h5py
import numpy as np
from PIL import Image

with h5py.File("templates/gso/11pro_SL_TRX_FG.h5", "r") as f:
    images = f["images"]                # (N,) variable-length JPEG bytes
    icosphere = [np.array(Image.open(io.BytesIO(images[i]))) for i in range(42)]
    wild      = [np.array(Image.open(io.BytesIO(images[i]))) for i in range(42, images.shape[0])]
```

`h5py` does not support fancy indexing, so read with sorted integer indices or a
contiguous slice.

## Loading the meshes

`meshes/<source>/<label>.glb` is the source geometry for object `<label>`, in
glTF binary. Load with any glTF reader, e.g.:

```python
import trimesh
mesh = trimesh.load("meshes/gso/11pro_SL_TRX_FG.glb")
```

Pose annotations (`cam_R_m2c`, `cam_t_m2c`) map this mesh's model coordinates
into the camera frame; translations are in millimeters.

## Citation
```bibtex
@inproceedings{ulmer2025conditional,
  title={Conditional Latent Diffusion Models for Zero-Shot Instance Segmentation},
  author={Ulmer, Maximilian and Boerdijk, Wout and Triebel, Rudolph and Durner, Maximilian},
  booktitle={Proceedings of the IEEE/CVF International Conference on Computer Vision},
  pages={24360--24369},
  year={2025}
}
```

## License
This dataset is released under the [`CC BY 4.0`](https://creativecommons.org/licenses/by/4.0/). This subset bundles two upstream object banks, each retaining its own license:

| source | upstream | license |
|--------|----------|---------|
| `gso`  | Google Scanned Objects | CC-BY-4.0 |
| `oo3d` | OmniObject3D | CC BY 4.0 |

By using this data you agree to the terms of the respective upstream datasets.