Datasets:
Improve dataset card and add preview config
Browse files
README.md
CHANGED
|
@@ -1,6 +1,17 @@
|
|
| 1 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 2 |
configs:
|
| 3 |
-
- config_name:
|
|
|
|
|
|
|
|
|
|
|
|
|
| 4 |
data_files:
|
| 5 |
- split: train
|
| 6 |
path: data/train-*.tar
|
|
@@ -8,7 +19,124 @@ configs:
|
|
| 8 |
|
| 9 |
# DoomFrameDataset
|
| 10 |
|
| 11 |
-
ViZDoom frame
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
the policy action, reward, episode, step, and source frame path.
|
|
|
|
| 1 |
---
|
| 2 |
+
pretty_name: Doom Frame Dataset
|
| 3 |
+
tags:
|
| 4 |
+
- doom
|
| 5 |
+
- vizdoom
|
| 6 |
+
- reinforcement-learning
|
| 7 |
+
- imitation-learning
|
| 8 |
+
- webdataset
|
| 9 |
configs:
|
| 10 |
+
- config_name: preview
|
| 11 |
+
data_files:
|
| 12 |
+
- split: train
|
| 13 |
+
path: data/train-000000.tar
|
| 14 |
+
- config_name: full
|
| 15 |
data_files:
|
| 16 |
- split: train
|
| 17 |
path: data/train-*.tar
|
|
|
|
| 19 |
|
| 20 |
# DoomFrameDataset
|
| 21 |
|
| 22 |
+
DoomFrameDataset is a ViZDoom frame-action dataset generated from policy rollouts. It is packaged as WebDataset tar shards for streaming training, imitation learning, behavior cloning, and offline reinforcement-learning experiments.
|
| 23 |
+
|
| 24 |
+
The dataset contains RGB game frames paired with the action selected by the rollout policy and per-step metadata such as reward, episode id, step id, terminal flag, and value estimate.
|
| 25 |
+
|
| 26 |
+
## Dataset Size
|
| 27 |
+
|
| 28 |
+
| Config | Files | Samples | Intended use |
|
| 29 |
+
| --- | ---: | ---: | --- |
|
| 30 |
+
| `preview` | 1 shard | ~79k | Hugging Face preview and quick sanity checks |
|
| 31 |
+
| `full` | 31 shards | 2,398,745 | Training and full streaming reads |
|
| 32 |
+
|
| 33 |
+
The packaged dataset is about 68 GB.
|
| 34 |
+
|
| 35 |
+
## Files
|
| 36 |
+
|
| 37 |
+
```text
|
| 38 |
+
data/
|
| 39 |
+
train-000000.tar
|
| 40 |
+
train-000001.tar
|
| 41 |
+
...
|
| 42 |
+
train-000030.tar
|
| 43 |
+
action_map.json
|
| 44 |
+
README.md
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
Each tar shard contains paired files with the same numeric key:
|
| 48 |
+
|
| 49 |
+
```text
|
| 50 |
+
000000000000.png
|
| 51 |
+
000000000000.json
|
| 52 |
+
000000000001.png
|
| 53 |
+
000000000001.json
|
| 54 |
+
...
|
| 55 |
+
```
|
| 56 |
+
|
| 57 |
+
The PNG is the game frame. The JSON is the metadata for that frame.
|
| 58 |
+
|
| 59 |
+
## Sample Metadata
|
| 60 |
+
|
| 61 |
+
```json
|
| 62 |
+
{
|
| 63 |
+
"action_id": 1,
|
| 64 |
+
"action_name": "TURN_RIGHT",
|
| 65 |
+
"action_vector": [0.0, 0.0, 0.0, 0.0, 1.0, 0.0],
|
| 66 |
+
"curriculum_level": 1,
|
| 67 |
+
"done": false,
|
| 68 |
+
"episode": 1,
|
| 69 |
+
"frame_path": "frames/episode_001/step_000000.png",
|
| 70 |
+
"global_step": 0,
|
| 71 |
+
"reward": 0.0,
|
| 72 |
+
"source_frame_path": "frames/episode_001/step_000000.png",
|
| 73 |
+
"step": 0,
|
| 74 |
+
"value": 1.7968196868896484,
|
| 75 |
+
"webdataset_key": "000000000000"
|
| 76 |
+
}
|
| 77 |
+
```
|
| 78 |
+
|
| 79 |
+
See `action_map.json` for the full action id, action name, and action vector mapping.
|
| 80 |
+
|
| 81 |
+
## Load The Preview Config
|
| 82 |
+
|
| 83 |
+
Use `preview` when you only want to verify the dataset or inspect examples in the Hugging Face Dataset Viewer.
|
| 84 |
+
|
| 85 |
+
```python
|
| 86 |
+
from datasets import load_dataset
|
| 87 |
+
|
| 88 |
+
ds = load_dataset(
|
| 89 |
+
"brahmandam/DoomFrameDataset",
|
| 90 |
+
"preview",
|
| 91 |
+
split="train",
|
| 92 |
+
streaming=True,
|
| 93 |
+
)
|
| 94 |
+
|
| 95 |
+
sample = next(iter(ds))
|
| 96 |
+
print(sample.keys())
|
| 97 |
+
print(sample["json"])
|
| 98 |
+
image = sample["png"]
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
## Stream The Full Dataset
|
| 102 |
+
|
| 103 |
+
Use `full` for training.
|
| 104 |
+
|
| 105 |
+
```python
|
| 106 |
+
from datasets import load_dataset
|
| 107 |
+
|
| 108 |
+
ds = load_dataset(
|
| 109 |
+
"brahmandam/DoomFrameDataset",
|
| 110 |
+
"full",
|
| 111 |
+
split="train",
|
| 112 |
+
streaming=True,
|
| 113 |
+
)
|
| 114 |
+
|
| 115 |
+
for sample in ds:
|
| 116 |
+
image = sample["png"]
|
| 117 |
+
metadata = sample["json"]
|
| 118 |
+
action_id = metadata["action_id"]
|
| 119 |
+
break
|
| 120 |
+
```
|
| 121 |
+
|
| 122 |
+
You can also read the shards directly with WebDataset:
|
| 123 |
+
|
| 124 |
+
```python
|
| 125 |
+
import webdataset as wds
|
| 126 |
+
|
| 127 |
+
urls = "https://huggingface.co/datasets/brahmandam/DoomFrameDataset/resolve/main/data/train-{000000..000030}.tar"
|
| 128 |
+
|
| 129 |
+
dataset = (
|
| 130 |
+
wds.WebDataset(urls)
|
| 131 |
+
.decode("pil")
|
| 132 |
+
.to_tuple("png", "json")
|
| 133 |
+
)
|
| 134 |
+
|
| 135 |
+
image, metadata = next(iter(dataset))
|
| 136 |
+
```
|
| 137 |
+
|
| 138 |
+
## Notes
|
| 139 |
+
|
| 140 |
+
The `preview` config intentionally points to a single shard so the Hub can inspect a small part of the dataset without processing the full 68 GB. For training, use the `full` config.
|
| 141 |
|
| 142 |
+
This dataset was generated from automated ViZDoom policy rollouts. It should be treated as gameplay observation/action data, not human demonstrations.
|
|
|