File size: 3,921 Bytes
d070329
 
e09e5dd
d070329
fe66047
d070329
e09e5dd
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
fe66047
 
 
 
d070329
 
 
 
 
e09e5dd
 
 
 
d070329
 
fe66047
d070329
 
 
fe66047
d070329
fe66047
d070329
 
 
 
 
 
 
 
 
 
 
 
 
 
fe66047
d070329
 
 
fe66047
e09e5dd
fe66047
d070329
 
 
 
 
 
 
 
 
 
 
 
 
fe66047
d070329
 
 
 
e09e5dd
fe66047
 
d070329
fe66047
d070329
 
 
e09e5dd
 
d070329
fe66047
 
d070329
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
# switch_inference 数据格式说明

本目录包含 8 条第一视角 prompt switch 推理数据:原始数据中每个输入场景保留 1 条代表样本,共 6 条;再追加 2 条新设计样本。每条样本由一张输入图像、一个相机动作轨迹和一份包含 switch 前后 prompt 的 JSON 文件组成。

## 数据点

### 原始 6 条

原始 6 条按源数据每个 `scene_index` 的第一条 prompt-switch case 保留,来源为:

`https://huggingface.co/datasets/Andyson/lingbot/tree/main/prompt-switch/2026-05-25_magic_prompt_switch_training_free_inputs`

| case_id | 场景 | action_label |
| --- | --- | --- |
| `ps_00_act_demo0_npy_00` | 原始 scene 0 | `fireball` |
| `ps_05_act_demo1_npy_05` | 原始 scene 1 | `fireball` |
| `ps_10_act_demo2_npy_10` | 原始 scene 2 | `fireball` |
| `ps_15_act_demo0_npy_15` | 原始 scene 3 | `fireball` |
| `ps_20_act_demo1_npy_20` | 原始 scene 4 | `fireball` |
| `ps_25_act_demo2_npy_25` | 原始 scene 5 | `fireball` |

### 新增 2 条

| case_id | 场景 | switch 前 | switch 后 |
| --- | --- | --- | --- |
| `custom_00_court_present_painting` | 欧洲风格宫廷大厅 | 第一视角在宫廷中行走 | 掏出画作并双手献上 |
| `custom_01_seaside_jump_swim` | 海边面向大海 | 第一视角在海边散步 | 跳入水中并向前游泳 |

## 目录结构

```text
switch_inference/
  images/                 # 输入图像,共 8 张
  actions/                # 每个 case 一条 camera trajectory,共 8 个 .npy
  prompts/                # 每个 case 一份 prompt JSON,共 8 个
  source_metadata/        # 原始选择、图像生成 prompt、轨迹生成说明和构建摘要
  manifest.jsonl          # 逐行 JSON manifest,推荐程序读取
  manifest.csv            # CSV 版本 manifest,方便人工查看
  dataset_info.json       # 全局信息
  README.md               # 本说明文档
```

## Manifest 字段

`manifest.jsonl` 每一行对应一个 case:

| 字段 | 含义 |
| --- | --- |
| `case_id` | 样本唯一 ID |
| `image_path` | 输入图像路径,相对 `switch_inference/` |
| `action_path` | 相机动作轨迹路径,相对 `switch_inference/` |
| `prompt_path` | prompt JSON 路径,相对 `switch_inference/` |
| `action_label` | switch 后动作标签 |
| `switch_frame` | prompt 切换帧,当前为 160 |
| `prompt_before_en` / `prompt_before_zh` | switch 前 prompt |
| `prompt_after_en` / `prompt_after_zh` | switch 后 prompt |

## Prompt JSON

`prompts/<case_id>.json` 包含完整 prompt 和调度信息:

```json
{
  "case_id": "custom_00_court_present_painting",
  "image_path": "images/scene_06_court.png",
  "action_path": "actions/custom_00_court_present_painting_action.npy",
  "action_type": "camera_trajectory",
  "switch_frame": 160,
  "prompt_before": {"en": "...", "zh": "..."},
  "prompt_after": {"en": "...", "zh": "..."},
  "prompt_schedule": [
    {"frame_start": 0, "frame_end": 159, "prompt_key": "prompt_before"},
    {"frame_start": 160, "frame_end": 319, "prompt_key": "prompt_after"}
  ]
}
```

## Action 文件

`actions/*.npy` 是程序生成的第一视角相机轨迹:

- `dtype`: `float32`
- `shape`: `[321, 4, 4]`
- 含义:每帧相机位姿矩阵;321 个 pose 对应 320 帧生成视频加初始 pose。
- 原始 6 条:保留源数据对应的 camera trajectory。
- 宫廷样本:前半段平稳向前行走,后半段放慢并轻微俯视/前倾,模拟取出并献上画作。
- 海边样本:前半段向海边行走,后半段向前入水、下沉到近水面高度并带轻微游泳摆动。

数据本身不绑定 fps;如果推理配置使用 16 fps,则 320 帧约为 20 秒,`switch_frame=160` 对应约第 10 秒。

## 数据规模

- case 数量:8(原始 6 条 + 新增 2 条)
- 输入图像:8
- 图像尺寸:`1280 x 704`
- 每条目标帧数:320
- switch frame:160
- 视角:first-person POV