15y6u87 commited on
Commit
3b33e31
·
verified ·
1 Parent(s): 4c0e6e5

MaLiang dataset card

Browse files
Files changed (1) hide show
  1. README.md +283 -0
README.md ADDED
@@ -0,0 +1,283 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pretty_name: MaLiang training data (GameCrafter v10 recordings)
3
+ license: other
4
+ license_name: research-only
5
+ size_categories:
6
+ - 1M<n<10M
7
+ tags:
8
+ - world-model
9
+ - video-generation
10
+ - action-conditioned
11
+ - semantic-map
12
+ - unreal-engine
13
+ - game
14
+ - action-rpg
15
+ configs:
16
+ - config_name: default
17
+ data_files:
18
+ - split: train
19
+ path: "data/*/*/*/frames-*.tar"
20
+ - config_name: v10_real
21
+ data_files:
22
+ - split: train
23
+ path: "data/v10_real/*/*/frames-*.tar"
24
+ - config_name: v9_stylized
25
+ data_files:
26
+ - split: train
27
+ path: "data/v9_stylized/*/*/frames-*.tar"
28
+ ---
29
+
30
+ # MaLiang: training data
31
+
32
+ **MaLiang: Painting Playable Game Worlds from Numbers**
33
+
34
+ [Project page](https://yeyinglab.github.io/MaLiang/) · [Code](https://github.com/YeyingLab/MaLiang) · [Weights](https://huggingface.co/15y6u87/MaLiang)
35
+
36
+ The raw game recordings MaLiang is trained on. The code repository turns them into the training cache
37
+ (`code/gc25d/prep_v10.py`: VAE latents, integer class maps and metadata per 81-frame clip); the released
38
+ checkpoints are in [`15y6u87/MaLiang`](https://huggingface.co/15y6u87/MaLiang). The data were captured as
39
+ **GameCrafter v10 Paired Data (capsule characters)**, described below.
40
+
41
+
42
+ Paired training data for an action-conditioned 2.5D game world model whose control signal is a **per-pixel numeric semantic map**. It follows GameCrafter-Data-v8 (an earlier release that is no longer hosted) and contains every production run captured since the player and the boss are drawn as **articulated capsule whiteboxes** in the labels:
43
+
44
+ | Subset | What it is | Runs | Frames | Game time | 81-frame clips |
45
+ |---|---|---|---|---|---|
46
+ | `v10_real` | photoreal outdoor biomes, telephoto camera ("realistic cinematic") | 116 | 556,800 | 9.67 h | 5,800 |
47
+ | `v9_stylized` | the 10 game scenes as v8 cross-scene worlds, with a random rendering style per camera variant | 140 | 672,000 | 11.67 h | 7,000 |
48
+ | **total** | | **256** | **1,228,800** | **21.33 h** | **12,800** |
49
+
50
+ Each frame stores the rendered RGB, a pixel-aligned semantic id map, a structural whitebox render, a ready-made **condition image** (semantic palette + code-drawn capsule characters), the player's 5-dim action (W, A, S, D, attack) and per-frame camera / actor / capsule metadata. Size: 482 GB.
51
+
52
+ ## What changed since v8
53
+
54
+ 1. **Capsule characters in the labels (v9).** In `ids.png` the player (class 10) and the boss (class 11), with their weapons, are drawn as the articulated capsule proxies of the whitebox pass, not as mesh silhouettes. Every frame's json also stores the capsule segments (world cm, `v9.characters`), so the character condition can be redrawn by code without Unreal. `cond.png` is that condition, written for every frame: the semantic palette with the player / boss capsules shaded per role.
55
+ 2. **Clips on a cut grid (v9).** Looks, cameras and episodes only change between frame `96k+80` and the next, and every run has exactly 50 clips of 81 frames starting at multiples of 96 (`clips_81.json`). **No clip contains a style, camera or episode change.** The 15 frames between two clips are not part of any clip (the first frame after a switch can still show unstreamed textures).
56
+ 3. **Closer camera.** The frame is 900–1600 cm wide at the player (12% of views 2000–3000 cm). In `v10_real` the player always stays in the centre of the image and the boss may leave the frame; in `v9_stylized` the camera eases towards the player–boss midpoint during fights, and `clips_81.json` marks the clips whose camera never left the player (`centered`).
57
+ 4. **`v9_stylized`: a new look per camera variant.** On top of the v8 cross-scene worlds, every camera variant (6–12 per run, always on the cut grid) gets a random RGB look (labels and whitebox unchanged): post-process style, material randomisation, render tier, texture mip bias, colour grade and outline.
58
+ 5. **`v10_real`: photoreal biomes.** The authored set dressing is hidden and every look (one per clip, every 6 s of game time) re-scatters CC0 photo-scanned assets (Poly Haven) on the scene's walkable ground in one of 12 biome variants, with matching photo-scanned ground / slope materials, foliage season tint, snow / moss / dust / sand cover on the models, wetness and a light preset (including night and storm). The camera is a perspective telephoto (FOV 22–40°) with the same framing as the 2.5D camera.
59
+
60
+ ## At a glance
61
+
62
+ | | `v10_real` | `v9_stylized` |
63
+ |---|---|---|
64
+ | Runs | 116 × 5 min (4,800 frames) | 140 × 5 min (4,800 frames) |
65
+ | Frames / game time | 556,800 / 9.67 h | 672,000 / 11.67 h |
66
+ | 81-frame clips (frames inside clips) | 5,800 (8.16 h) | 7,000 (9.84 h) |
67
+ | Camera | perspective telephoto, FOV 22–40° | isometric orthographic |
68
+ | Looks | a new biome / light / camera every 6 s (one per clip) | 6–12 per run, one per camera variant |
69
+ | Dynamic events | none | 6,096 (spawn / replace / delete) |
70
+ | Clips with the player centred on every frame | 5,800 | 4,305 |
71
+ | Episodes | 925 | 1,124 |
72
+ | Label check | 0 invalid semantic pixels | 0 invalid semantic pixels |
73
+ | Resolution | 1280 × 704 | 1280 × 704 |
74
+
75
+ Previews: `previews/v10_real_preview.mp4` and `previews/v9_stylized_preview.mp4` show two clips of one run per scene (RGB | condition).
76
+
77
+ ## Per-frame contents
78
+
79
+ Each frame is one WebDataset sample inside a tar shard; the key is the 6-digit frame index within its run.
80
+
81
+ | File in tar | Content |
82
+ |---|---|
83
+ | `{frame}.jpg` | RGB, 1280×704, JPEG (rendered at 2× and downsampled) |
84
+ | `{frame}.ids.png` | Semantic id map, single-channel uint8, lossless, pixel-aligned with the RGB; player / boss as capsules |
85
+ | `{frame}.whitebox.jpg` | Whitebox render: structural scene geometry plus the articulated character capsules |
86
+ | `{frame}.cond.png` | Condition image: semantic palette for the scene classes + player (blue) / boss (red) capsules shaded from the capsule segments |
87
+ | `{frame}.json` | Per-frame metadata: camera pose, `world_to_view`, `projection`, `world_to_clip`, `fov_x_deg` / `ortho_width_cm`, actors (role, state, health, position, velocity, bones with pixel positions), `action`, `episode`, `camera_variant`, `v9` (look, capsules) |
88
+
89
+ ### Semantic classes
90
+
91
+ | id | class | id | class | id | class |
92
+ |---|---|---|---|---|---|
93
+ | 0 | sky / background | 3 | architecture | 6 | prop |
94
+ | 1 | terrain (incl. grass, debris) | 4 | rock | 10 | player |
95
+ | 2 | paving (roads, floors) | 5 | vegetation (plants, trees, logs) | 11 | boss |
96
+
97
+ Pixel share (6 frames per run):
98
+
99
+ | Class | `v9_stylized` | `v10_real` |
100
+ |---|---|---|
101
+ | terrain | 18.9% | 92.3% |
102
+ | paving | 37.0% | 0.0% |
103
+ | architecture | 22.2% | 0.0% |
104
+ | vegetation | 14.1% | 3.8% |
105
+ | rock | 3.1% | 1.8% |
106
+ | prop | 3.0% | 0.0% |
107
+ | boss | 0.9% | 1.1% |
108
+ | player | 0.7% | 0.9% |
109
+
110
+ ## Index files per run
111
+
112
+ ```
113
+ data/<subset>/<scene>/<run>/frames-000000.tar frames 0–1599 (WebDataset shard)
114
+ data/<subset>/<scene>/<run>/frames-001600.tar frames 1600–3199
115
+ data/<subset>/<scene>/<run>/frames-003200.tar frames 3200–4799
116
+ data/<subset>/<scene>/<run>/index/
117
+ actions.npy (N,5) uint8 [w,a,s,d,attack]; row i = keys held from frame i to i+1
118
+ actions_block_0.25s.npy (N/4,5) one action prompt per 0.25 s (keys never change inside a block)
119
+ episodes.npy (N,) episode id
120
+ actions.csv per-frame actions, bot mode, player / boss state and HP, character model and scale
121
+ frames.jsonl compact per-frame metadata
122
+ clips_81.json the 50 cut-grid clips: start, end (exclusive), episode, camera_variant, look, look_name, events
123
+ clips_81_v9.json the capture's own clip list (end inclusive)
124
+ events.json dynamic events of the run (v9_stylized only)
125
+ meta.json run statistics (looks, behaviour, characters, v10 biome variants)
126
+ capture_result.json capture settings and the per-look log
127
+ scene_actors.json static-mesh inventory of the host scene
128
+ summary_v10.csv / summary_v10.json every run and the totals of both subsets
129
+ previews/ thumbs/ code/ preview reels, one thumbnail per run (RGB | semantic | condition), capture and post code
130
+ ```
131
+
132
+ ## Loading a clip
133
+
134
+ ```python
135
+ import io, json, tarfile
136
+ import numpy as np
137
+ from PIL import Image
138
+ from huggingface_hub import hf_hub_download
139
+
140
+ REPO = "15y6u87/MaLiang-Data"
141
+ subset, scene, run = "v10_real", "05_Japanese_Spring_Sanctuary", "R10_s5501"
142
+ get = lambda p: hf_hub_download(REPO, f"data/{subset}/{scene}/{run}/{p}", repo_type="dataset")
143
+
144
+ clips = json.load(open(get("index/clips_81.json")))
145
+ blocks = np.load(get("index/actions_block_0.25s.npy"))
146
+ c = clips[10]; s, e = c["start"], c["end"] # 81 frames, one look (c["look_name"])
147
+
148
+ def frames(lo, hi): # frames [lo, hi) from the 1,600-frame shards
149
+ out = {}
150
+ for shard in range(lo // 1600 * 1600, hi, 1600):
151
+ with tarfile.open(get(f"frames-{shard:06d}.tar")) as tf:
152
+ for m in tf:
153
+ key, ext = m.name.split(".", 1)
154
+ if lo <= int(key) < hi: out.setdefault(int(key), {})[ext] = tf.extractfile(m).read()
155
+ return [out[i] for i in range(lo, hi)]
156
+
157
+ clip = frames(s, e)
158
+ rgb = np.stack([np.asarray(Image.open(io.BytesIO(f["jpg"]))) for f in clip]) # (81,704,1280,3)
159
+ cond = np.stack([np.asarray(Image.open(io.BytesIO(f["cond.png"]))) for f in clip]) # condition images
160
+ ids = np.stack([np.asarray(Image.open(io.BytesIO(f["ids.png"]))) for f in clip]) # (81,704,1280) uint8 class ids
161
+ act = blocks[s // 4 : s // 4 + 20] # (20,5) one prompt per 0.25 s
162
+ ```
163
+
164
+ ## `v10_real`: biomes and light
165
+
166
+ Every clip has its own biome variant and light preset (`look_name` = `photo|<light>|<biome>|pbr|no`).
167
+
168
+ | Biome variant | Clips | Share |
169
+ |---|---|---|
170
+ | `rain_wetland` | 500 | 8.6% |
171
+ | `dry_savanna` | 495 | 8.5% |
172
+ | `rocky_coast` | 495 | 8.5% |
173
+ | `sand_beach` | 487 | 8.4% |
174
+ | `snow_alpine` | 486 | 8.4% |
175
+ | `spring_meadow` | 485 | 8.4% |
176
+ | `semi_desert` | 480 | 8.3% |
177
+ | `red_canyon` | 479 | 8.3% |
178
+ | `conifer_forest` | 474 | 8.2% |
179
+ | `rock_badlands` | 474 | 8.2% |
180
+ | `autumn_wood` | 473 | 8.2% |
181
+ | `mossy_oldwood` | 472 | 8.1% |
182
+
183
+ | Light preset | Clips | Share |
184
+ |---|---|---|
185
+ | `overcast` | 997 | 17.2% |
186
+ | `golden` | 989 | 17.1% |
187
+ | `dusk` | 840 | 14.5% |
188
+ | `backlit` | 821 | 14.2% |
189
+ | `noon` | 777 | 13.4% |
190
+ | `mist` | 761 | 13.1% |
191
+ | `storm` | 396 | 6.8% |
192
+ | `night` | 219 | 3.8% |
193
+
194
+ ## `v9_stylized`: looks
195
+
196
+ `look_name` = `<post style>|<materials>|<render tier>|<mip bias>|<outline>`.
197
+
198
+ | Post-process style | Clips | Share |
199
+ |---|---|---|
200
+ | `none` | 2,565 | 36.6% |
201
+ | `sketch` | 578 | 8.3% |
202
+ | `pixel` | 564 | 8.1% |
203
+ | `comic` | 520 | 7.4% |
204
+ | `toon` | 508 | 7.3% |
205
+ | `duotone` | 487 | 7.0% |
206
+ | `soft` | 477 | 6.8% |
207
+ | `paint` | 466 | 6.7% |
208
+ | `dither` | 419 | 6.0% |
209
+ | `hue` | 416 | 5.9% |
210
+
211
+ | Materials | Clips | Share |
212
+ |---|---|---|
213
+ | `orig` | 3,331 | 47.6% |
214
+ | `tex` | 1,261 | 18.0% |
215
+ | `flat` | 876 | 12.5% |
216
+ | `mixed` | 838 | 12.0% |
217
+ | `shuffle` | 694 | 9.9% |
218
+
219
+ | Render tier | Clips | Share |
220
+ |---|---|---|
221
+ | `full` | 4,239 | 60.6% |
222
+ | `nogi` | 1,312 | 18.7% |
223
+ | `unlit` | 737 | 10.5% |
224
+ | `noshadow` | 712 | 10.2% |
225
+
226
+ ## Behaviour
227
+
228
+ Share of frames by bot mode:
229
+
230
+ | Bot mode | `v9_stylized` | `v10_real` |
231
+ |---|---|---|
232
+ | explore | 36.3% | 43.2% |
233
+ | fight | 15.9% | 18.4% |
234
+ | seek_boss | 13.1% | 9.1% |
235
+ | dead | 9.1% | 10.0% |
236
+ | pause | 5.3% | 5.5% |
237
+ | unstick | 6.3% | 1.6% |
238
+ | detour | 3.8% | 4.0% |
239
+ | retreat | 3.3% | 4.0% |
240
+ | backtrack | 2.8% | 2.7% |
241
+ | wallhug | 2.0% | 0.2% |
242
+ | disengage | 0.9% | 1.3% |
243
+ | push_obstacle | 1.0% | 0.1% |
244
+
245
+ Frames with no key held: 22.5% (`v9_stylized`), 24.2% (`v10_real`).
246
+
247
+ | Scene | `v9` runs | `v9` clips | `v10_real` runs | `v10_real` clips | `v10_real` fight share* |
248
+ |---|---|---|---|---|---|
249
+ | 01 Sunlit Mediterranean Courtyard | 15 | 750 | 12 | 600 | 17.1% |
250
+ | 02 Autumn Woodland Shrine | 15 | 750 | 12 | 600 | 17.5% |
251
+ | 03 Desert Caravanserai | 14 | 700 | 12 | 600 | 42.9% |
252
+ | 04 Snowbound Mountain Outpost | 14 | 700 | 12 | 600 | 19.8% |
253
+ | 05 Japanese Spring Sanctuary | 14 | 700 | 12 | 600 | 16.2% |
254
+ | 06 Overgrown Tropical Water Temple | 14 | 700 | 12 | 600 | 21.9% |
255
+ | 07 Steampunk Foundry District | 14 | 700 | 11 | 550 | 17.4% |
256
+ | 08 Gothic Cathedral Quarter | 14 | 700 | 11 | 550 | 13.6% |
257
+ | 09 Dense Cyberpunk Neon District | 14 | 700 | 11 | 550 | 28.5% |
258
+ | 10 Underwater Research Habitat | 12 | 600 | 11 | 550 | 28.1% |
259
+
260
+ \* Share of frames in which the bot is fighting or retreating.
261
+
262
+ ## Capture details
263
+
264
+ - Unreal Engine 5.8, the 10 GameCrafter scenes. Offline fixed-timestep simulation at 48 Hz, every 3rd step saved: 16 fps of game time independent of wall-clock speed.
265
+ - The bot plays through the player's own input path (WASD + attack), explores, seeks and fights the boss, dies and respawns (a new episode). Decisions are made every 4 frames.
266
+ - `v9_stylized` was captured on 2026-10-20, `v10_real` on 2026-10-22 (after a fix of the moss cover material; two earlier runs with a flat moss colour are not included).
267
+
268
+ ## Known limitations
269
+
270
+ - **Same 10 host scenes and layouts.** `v10_real` replaces the set dressing and materials but keeps each scene's walkable ground and routes.
271
+ - **`v10_real` has no dynamic events**, and its semantic maps are dominated by terrain.
272
+ - **RGB-only stylisation in `v9_stylized`.** Styles, outlines and material swaps exist only in the RGB; the labels, whitebox and condition show the plain scene.
273
+ - **Frames between clips.** The 15 frames after each clip may contain a look switch; use `clips_81.json` instead of slicing runs freely.
274
+
275
+ ## Licence and attribution
276
+
277
+ Research use only.
278
+
279
+ - Recorded in Unreal Engine from scenes we assembled ourselves; the rights to third-party engine content and
280
+ assets used in those scenes remain with their owners.
281
+ - `v10_real` set dressing, ground materials and HDR lighting use Poly Haven assets (CC0).
282
+
283
+ If you are a rights holder and want something removed, please open a discussion on this repository.