# RecGen Training Renderings

Renderings (conditioning images, depth, masks, camera poses) and precomputed
latents of 3D objects from public 3D datasets, packaged as gzipped WebDataset
tar shards (`shard-XXXXXX.tar.gz`). Used to train the two RecGen flow stages.

The data is split into two collections:

| Prefix | Stage | Per-sample latents | Views | Purpose |
|---|---|---|---|---|
| `ss/`   | 1 — sparse structure | `ss_latent.npy` | ~5  | train the sparse-structure (stereo) flow |
| `slat/` | 2 — structured latent | `slat_coords.npy` + `slat_feats.npy` (+ `ss_latent.npy`) | ~20 | train the SLAT (appearance) flow |

Both collections cover the same four source datasets and carry per-view RGB
(`cond_image_*`), depth (`cond_depth_*`), masks (`cond_mask_*`), and poses.
`slat/` additionally stores the structured-latent targets and more views per
object; `slat/` is the aesthetic-filtered subset used for stage-2 training.

## Access

Objects are publicly readable (no AWS account needed); bucket listing is
disabled, so use `INDEX.txt` (one key per line) to discover files. Shard
numbering is not contiguous, so build file lists from `INDEX.txt` rather
than assuming ranges.

Download the data once to local storage, decompress the shards, and train
from your local copy — do not stream shards from this bucket during
training.

Bulk download and decompress (no AWS account needed):
```bash
base=https://tri-ml-public.s3.amazonaws.com/github/recgen/train
curl -sfL $base/INDEX.txt | xargs -P 8 -I{} sh -c '
  mkdir -p "$(dirname {})" && curl -sfL "'$base'/{}" -o "{}" &&
  case "{}" in *.tar.gz) pigz -d "{}" || gunzip "{}";; esac'
```

To fetch only one stage, filter `INDEX.txt` to keys under `ss/` or `slat/`.

## Contents

```
ss/  , slat/
  ABO/       shard-*.tar.gz              Amazon Berkeley Objects
  HSSD/      shard-*.tar.gz              Habitat Synthetic Scenes Dataset
  Objaverse/ shard-*.tar.gz              Objaverse (Sketchfab)
  PartNeXt/  shard-*.tar.gz              PartNeXt (Objaverse-sourced models)
             manifests/shard-*.json      per-sample -> source model id + part
  <subset>/additional_metadata/          per-dataset pose stats, blacklists
ss/blacklist.txt                         stage-1 alignment blacklist (object ids)
LICENSES/                                notices + per-object attribution
```

| Source dataset | License of renderings |
|---|---|
| ABO       | CC BY 4.0 (attribution: Amazon.com) |
| HSSD      | CC BY-NC 4.0 (non-commercial only) |
| Objaverse | per-object CC — CC-BY / CC-BY-SA / CC0 only (see manifest) |
| PartNeXt  | per-object CC — Objaverse-sourced CC-BY / CC-BY-SA / CC0 only (see manifest) |

Each sample is keyed by object id; `Objaverse/` keys are Objaverse UIDs.
`PartNeXt/manifests/shard-XXXXXX.json` maps each sample in the corresponding
shard to its source model id and part index. PartNeXt is filtered to models
sourced from permissively-licensed Objaverse objects; non-permissive and
non-Objaverse-sourced (e.g. 3D-FUTURE) part models are excluded.

## Licensing

- The renderings of each object are derivative works of that object and are
  released under the same license as the source object (pass-through).
- See `LICENSES/` for per-dataset notices and per-object attribution
  manifests (license, title, author, and source URL for every Sketchfab
  object). Objaverse and PartNeXt renderings are of CC-BY, CC-BY-SA, or CC0
  objects only; CC-BY-SA renderings remain CC-BY-SA. HSSD renderings are
  CC BY-NC 4.0 (non-commercial use only).
- The renderings exclude source datasets that do not permit redistribution
  (PartNet-Mobility, PhysX-3D); those are referenced by id only in the code.
