File size: 2,868 Bytes
77731f3
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# OB3D Re-encoding — exact procedure

## Upstream layout (input)

OB3D ships dense cubemap RGB-D-pose trajectories. Place the upstream data under `data/ob3d/` matching this layout:

```
data/ob3d/
├── <scene_name>-Egocentric/
│   ├── cubemap/
│   │   ├── px/{frame_NNNN.png, frame_NNNN_depth.npy}      # +X face
│   │   ├── nx/                                            # -X face
│   │   ├── py/, ny/, pz/, nz/                             # remaining faces
│   ├── pose/
│   │   └── pose_NNNN.json                                  # source pose convention
│   └── …
└── <scene_name>-Non-Egocentric/
    └── (same structure)
```

The exact upstream filenames depend on which OB3D distribution you use; the `pipeline.py` reads the layout from `config.yaml` so adjust `input_layout` there if needed.

## Output schema (CM-EVS unified)

```
outputs/ob3d/<scene_name>-<viewpoint>/
├── meta.json                                    # coordinate convention, first-frame center
├── panorama_0000.png                            # ERP RGB, 1600×800
├── panorama_0000_depth.npy                      # ERP range depth (m), float32
├── pose_0000.json                               # { qwc: [w,x,y,z], position: [x,y,z], camera_type: "cubemap_reencoded" }
├── panorama_0001.png
├── panorama_0001_depth.npy
├── pose_0001.json
└── …
```

## Run

```bash
cd ../../code
python scripts/reencode_outdoor.py \
    --source ob3d \
    --config ../adapters/ob3d/config.yaml
```

The script:

1. Loads `config.yaml` → resolves cubemap face size, axis conversion, ERP target resolution.
2. For each scene/viewpoint listed in `metadata/source_manifest.json`:
    - Reads the 6 cubemap faces per frame, concatenates into ERP via standard cubemap → equirectangular projection.
    - Re-projects depth: cubemap perspective `z` → ERP **range** depth (radial).
    - Reads source pose, converts axis convention to CM-EVS world frame, expresses as `q_wc` + position.
    - Writes the triple `panorama_NNNN.{png, _depth.npy}` and `pose_NNNN.json`.
3. Emits per-scene `meta.json` re-stating the coordinate convention.

## Verifying against paper

After running, compare with paper §4.3 Table 4:

- 12 scenes × 2 viewpoints = 24 instances ✓
- 200 frames each = 2,400 frames ✓
- Resolution 1600×800 ✓
- Median depth 3.88 m ✓ (sanity-check via your favorite stats script)

## Caveats

- **No curator selection**. Paper §4.2 Table 3 row "Outdoor / OB3D" notes that all v1.0 outdoor frames are full re-encoded source trajectories, not curator-selected subsets. Therefore no `metadata/per_step_log.jsonl` is emitted.
- **License**: frames produced by this adapter remain under upstream OB3D license. Do not redistribute without checking upstream terms.