jgalego commited on
Commit
ea0bbe3
·
verified ·
1 Parent(s): 3703ba8

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +15 -13
README.md CHANGED
@@ -18,13 +18,13 @@ model-index:
18
  type: vizdoom/freedoom1-e1m1
19
  metrics:
20
  - type: psnr_changed_1
21
- value: 17.86
22
  name: PSNR on changed pixels at 1 frames
23
  - type: psnr_changed_5
24
- value: 13.52
25
  name: PSNR on changed pixels at 5 frames
26
  - type: psnr_changed_15
27
- value: 12.16
28
  name: PSNR on changed pixels at 15 frames
29
  ---
30
 
@@ -51,10 +51,11 @@ import torch
51
  from doom import DEVICE, collect, load, rollout, to_float
52
 
53
  model = load("jgalego/doom-world-model")
54
- frames, _, _ = collect(4, seed=0) # four real frames to start from
 
55
  context = to_float(frames[:4])[None].to(DEVICE)
56
  moves = torch.tensor([[0, 0, 0] + [1] * 10 + [3] * 6], device=DEVICE) # FORWARD, then LEFT
57
- video = rollout(model, context, moves) # (1, 16, 3, 96, 128) in [-1, 1]
58
  ```
59
 
60
  Actions: 0 NOOP, 1 FORWARD, 2 BACKWARD, 3 LEFT (turn), 4 RIGHT (turn), 5 ATTACK, 6 USE (doors, switches). One step is 4 game tics, about 0.11 s.
@@ -64,11 +65,11 @@ Actions: 0 NOOP, 1 FORWARD, 2 BACKWARD, 3 LEFT (turn), 4 RIGHT (turn), 5 ATTACK,
64
  | | |
65
  |---|---|
66
  | Model | U-Net, channels 64, 128, 256, 256, 7.5M parameters; noise level and the last 4 actions modulate every block |
67
- | Diffusion | EDM preconditioning, σ_data 0.5, log-normal training noise; 3 Euler steps per frame from σ=5.0 |
68
  | Data | 200,000 frames (217 episodes of up to two minutes) of a random policy on Freedoom E1M1: it holds each action for 1 to 6 steps, mostly walks forward, and turns away or tries USE when the depth buffer shows a wall ahead |
69
- | Steps | 50,000, batch size 64 |
70
- | Optimizer | AdamW, lr 0.0001, gradient clipping 1.0 |
71
- | Hardware | NVIDIA A10G, 161.0 min |
72
 
73
  ## 📊 Results
74
 
@@ -76,13 +77,14 @@ Rollouts on 256 windows from episodes whose seeds never appear in training; they
76
 
77
  | Frames ahead | Model, all pixels (dB) | Repeat, all pixels (dB) | Model, changed pixels (dB) | Repeat, changed pixels (dB) |
78
  |---|---|---|---|---|
79
- | 1 | 19.15 | 21.29 | 17.86 | 16.2 |
80
- | 5 | 14.2 | 19.2 | 13.52 | 15.5 |
81
- | 15 | 12.76 | 18.16 | 12.16 | 15.09 |
82
 
83
  ## ⚠️ Limitations
84
 
85
- - This version underfits: it denoises well but predicts the next frame from context alone no better than repeating the last frame, so rollouts wash out to grey within a few frames. A fix is in progress.
 
86
  - One level, seen through random play: the model knows the parts of E1M1 a random walker reaches, not the whole map, and nothing of other levels.
87
  - Four frames of memory, under half a second: walk out of a room and back and it may not be the same room.
88
  - 128×96 frames, three denoising steps: textures blur and enemies smear, more so the longer it runs.
 
18
  type: vizdoom/freedoom1-e1m1
19
  metrics:
20
  - type: psnr_changed_1
21
+ value: 19.77
22
  name: PSNR on changed pixels at 1 frames
23
  - type: psnr_changed_5
24
+ value: 16.62
25
  name: PSNR on changed pixels at 5 frames
26
  - type: psnr_changed_15
27
+ value: 13.53
28
  name: PSNR on changed pixels at 15 frames
29
  ---
30
 
 
51
  from doom import DEVICE, collect, load, rollout, to_float
52
 
53
  model = load("jgalego/doom-world-model")
54
+ size = (model.config.width, model.config.height)
55
+ frames, _, _ = collect(4, seed=0, size=size) # four real frames to start from
56
  context = to_float(frames[:4])[None].to(DEVICE)
57
  moves = torch.tensor([[0, 0, 0] + [1] * 10 + [3] * 6], device=DEVICE) # FORWARD, then LEFT
58
+ video = rollout(model, context, moves) # (1, 16, 3, height, width) in [-1, 1]
59
  ```
60
 
61
  Actions: 0 NOOP, 1 FORWARD, 2 BACKWARD, 3 LEFT (turn), 4 RIGHT (turn), 5 ATTACK, 6 USE (doors, switches). One step is 4 game tics, about 0.11 s.
 
65
  | | |
66
  |---|---|
67
  | Model | U-Net, channels 64, 128, 256, 256, 7.5M parameters; noise level and the last 4 actions modulate every block |
68
+ | Diffusion | EDM preconditioning, σ_data 0.5, log-normal training noise (log σ mean 0.4, std 1.2); 3 Euler steps per frame from σ=5.0 |
69
  | Data | 200,000 frames (217 episodes of up to two minutes) of a random policy on Freedoom E1M1: it holds each action for 1 to 6 steps, mostly walks forward, and turns away or tries USE when the depth buffer shows a wall ahead |
70
+ | Steps | 5,000, batch size 64 |
71
+ | Optimizer | AdamW, lr 0.0001, 1000 warmup steps, cosine decay, gradient clipping 1.0; weights are an EMA with decay 0.999 |
72
+ | Hardware | NVIDIA A10G, 16.5 min |
73
 
74
  ## 📊 Results
75
 
 
77
 
78
  | Frames ahead | Model, all pixels (dB) | Repeat, all pixels (dB) | Model, changed pixels (dB) | Repeat, changed pixels (dB) |
79
  |---|---|---|---|---|
80
+ | 1 | 22.36 | 21.29 | 19.77 | 16.2 |
81
+ | 5 | 17.55 | 19.2 | 16.62 | 15.5 |
82
+ | 15 | 14.01 | 18.16 | 13.53 | 15.09 |
83
 
84
  ## ⚠️ Limitations
85
 
86
+ - **Rollouts collapse.** From four real frames, the first generated frame is already a brown haze and by the fifth only a grey wall, the gun and a breaking HUD remain (see the GIF). It still beats repeating the last frame on PSNR up to 5 frames ahead, because a grey average scores well on PSNR. The model learned to denoise frames but not to predict the next one from context.
87
+ - **Training longer makes it worse.** Held-out rollout quality peaks after about 4,000 steps and then declines while the training loss keeps falling. A 50,000-step run, an EMA of the weights, fp32 instead of bf16, warmup with cosine decay and 64×48 frames did not change that.
88
  - One level, seen through random play: the model knows the parts of E1M1 a random walker reaches, not the whole map, and nothing of other levels.
89
  - Four frames of memory, under half a second: walk out of a room and back and it may not be the same room.
90
  - 128×96 frames, three denoising steps: textures blur and enemies smear, more so the longer it runs.