File size: 2,175 Bytes
cae9706
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
# coaf_dataset_24_25

与 `coaf_dataset` 同结构、同 5000 条 episode 划分(复用 `coaf_dataset/splits/train_5k.json`),但时间采样不同:

| 数据 | 帧数 | 采样索引 |
|------|------|----------|
| `raw/.../rgb/` | **24** | `linspace(0, T-1, 24)` |
| `raw/.../rgb_align/` | **25** | `linspace(0, T-1, 25)`,与 reason 对齐 |
| `state` / `action` | **(25, 7)** | 与 `rgb_align`、depth、pose、flow、follow **相同** `reason_indices` |
| depth / pose / flow / follow | **25** | 由 `rgb_align` 或 25 帧 state 生成 |

每条 episode 的 `manifest.json` 记录 `rgb_indices``reason_indices`,便于核对对齐。

## 目录结构(与 coaf_dataset 对齐)

```
coaf_dataset_24_25/
  raw/episode_XXXXXX/
    rgb/           # 24 帧,I2V 目标视频
    rgb_align/     # 25 帧,供 depth/flow 等 reason 输入
    state/ action/ instruction/ manifest.json
  action/action_25_for_{pose,follow,flow,depth}/
  state/state_25_for_{pose,follow,flow,depth}/
  modalities/{depth,flow,pose,follow}/
  composed/
  scripts/
```

## 流水线

```bash
# 1. 从 Bridge V2 TFDS 提取 raw(CPU,约数小时)
python scripts/preprocess_raw.py --skip-existing

# 2. 复制 state/action 到各 reason 目录
python scripts/generate_action_state_25.py

# 3. 各 reason 模态(GPU,顺序或并行提交)
python scripts/batch_depth_5k.py
python scripts/batch_flow_5k.py
python scripts/batch_pose_5k.py
python scripts/batch_follow_5k.py   # 依赖 coaf_dataset/modalities/masks

# 4. 拼接训练视频(例:depth + rgb)
python scripts/compose_all.py --version v4_depth_rgb
```

`follow` 仍使用父数据集 `coaf_dataset/modalities/masks` 中的 object mask。

## 与 coaf_dataset 的差异

| | coaf_dataset | coaf_dataset_24_25 |
|--|--------------|-------------------|
| RGB | 25 | **24** |
| reason 视频 | 多为 24(compose 时再采样) | **原生 25** |
| state/action(raw) | 24;另用 TFDS 重采样 25 给 depth | raw 直接 **25**,与 reason 同索引 |
| depth 输入 | `rgb/` 25 帧 | `rgb_align/` 25 帧 |

Compose 默认:`--cond-frames 25 --rgb-frames 24`(例如 v4:25 depth + 24 rgb = 49 帧)。