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
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
task_categories:
|
| 4 |
+
- visual-question-answering
|
| 5 |
+
- reinforcement-learning
|
| 6 |
+
language:
|
| 7 |
+
- en
|
| 8 |
+
tags:
|
| 9 |
+
- vlm
|
| 10 |
+
- gymnasium
|
| 11 |
+
- benchmark
|
| 12 |
+
- multimodal
|
| 13 |
+
size_categories:
|
| 14 |
+
- 1G<n<10G
|
| 15 |
+
---
|
| 16 |
+
|
| 17 |
+
# VLM-Gym Inference Dataset
|
| 18 |
+
|
| 19 |
+
This dataset contains pre-defined test episodes and initial states for evaluating Vision-Language Models (VLMs) on the VLM-Gym benchmark.
|
| 20 |
+
|
| 21 |
+
## Dataset Structure
|
| 22 |
+
|
| 23 |
+
```
|
| 24 |
+
inference-dataset/
|
| 25 |
+
├── test_set_easy/ # Easy difficulty test episodes (JSONL)
|
| 26 |
+
├── test_set_hard/ # Hard difficulty test episodes (JSONL)
|
| 27 |
+
├── initial_states_easy/ # Initial environment states for easy episodes (JSON)
|
| 28 |
+
├── initial_states_hard/ # Initial environment states for hard episodes (JSON)
|
| 29 |
+
└── partial_datasets/ # Assets required by some environments
|
| 30 |
+
├── objaverse/ # 3D models for mental rotation tasks
|
| 31 |
+
├── counting/ # Images for counting tasks
|
| 32 |
+
├── refcoco+/ # Images for referring expression tasks
|
| 33 |
+
└── ...
|
| 34 |
+
```
|
| 35 |
+
|
| 36 |
+
## Tasks Included
|
| 37 |
+
|
| 38 |
+
| Task | Description |
|
| 39 |
+
|------|-------------|
|
| 40 |
+
| `maze_2d` | 2D maze navigation |
|
| 41 |
+
| `maze_3d` | 3D maze navigation |
|
| 42 |
+
| `mental_rotation_2d` | 2D shape rotation matching |
|
| 43 |
+
| `mental_rotation_3d_cube` | 3D cube rotation matching |
|
| 44 |
+
| `mental_rotation_3d_objaverse` | 3D object rotation matching |
|
| 45 |
+
| `jigsaw` | Jigsaw puzzle solving |
|
| 46 |
+
| `sliding_block` | Sliding block puzzle |
|
| 47 |
+
| `colorization` | Image colorization |
|
| 48 |
+
| `counting` | Object counting |
|
| 49 |
+
| `patch_reassembly` | Image patch reassembly |
|
| 50 |
+
| `matchstick_equation` | Matchstick equation solving |
|
| 51 |
+
| `matchstick_rotation` | Matchstick rotation |
|
| 52 |
+
| `video_unshuffle` | Video frame ordering |
|
| 53 |
+
| `zoom_in_puzzle` | Zoom-in puzzle solving |
|
| 54 |
+
| `fetch_reach` | Robotic reaching (easy only) |
|
| 55 |
+
| `fetch_pick_and_place` | Robotic manipulation (hard only) |
|
| 56 |
+
| `referring_dot_pointing` | Referring expression grounding (easy only) |
|
| 57 |
+
|
| 58 |
+
## Quick Start
|
| 59 |
+
|
| 60 |
+
### Installation
|
| 61 |
+
|
| 62 |
+
```bash
|
| 63 |
+
pip install huggingface_hub
|
| 64 |
+
```
|
| 65 |
+
|
| 66 |
+
### Download Full Dataset
|
| 67 |
+
|
| 68 |
+
```python
|
| 69 |
+
from huggingface_hub import snapshot_download
|
| 70 |
+
|
| 71 |
+
dataset_path = snapshot_download(
|
| 72 |
+
repo_id="VisGym/inference-dataset",
|
| 73 |
+
repo_type="dataset",
|
| 74 |
+
)
|
| 75 |
+
```
|
| 76 |
+
|
| 77 |
+
### Download Specific Subsets
|
| 78 |
+
|
| 79 |
+
```python
|
| 80 |
+
from huggingface_hub import snapshot_download
|
| 81 |
+
|
| 82 |
+
# Download only test sets (small, no large assets)
|
| 83 |
+
dataset_path = snapshot_download(
|
| 84 |
+
repo_id="VisGym/inference-dataset",
|
| 85 |
+
repo_type="dataset",
|
| 86 |
+
allow_patterns=["test_set_easy/**", "test_set_hard/**"],
|
| 87 |
+
)
|
| 88 |
+
|
| 89 |
+
# Download only easy difficulty
|
| 90 |
+
dataset_path = snapshot_download(
|
| 91 |
+
repo_id="VisGym/inference-dataset",
|
| 92 |
+
repo_type="dataset",
|
| 93 |
+
allow_patterns=["*_easy/**"],
|
| 94 |
+
)
|
| 95 |
+
```
|
| 96 |
+
|
| 97 |
+
### Using the Loader Script
|
| 98 |
+
|
| 99 |
+
```bash
|
| 100 |
+
# Download everything
|
| 101 |
+
python load_from_hf.py --output_dir ./inference_dataset
|
| 102 |
+
|
| 103 |
+
# Download only test sets (no large assets)
|
| 104 |
+
python load_from_hf.py --output_dir ./inference_dataset --subset test_sets
|
| 105 |
+
|
| 106 |
+
# Download only easy difficulty
|
| 107 |
+
python load_from_hf.py --output_dir ./inference_dataset --subset easy
|
| 108 |
+
```
|
| 109 |
+
|
| 110 |
+
## File Formats
|
| 111 |
+
|
| 112 |
+
### Test Set Files (JSONL)
|
| 113 |
+
|
| 114 |
+
Each line in the JSONL files contains an episode specification:
|
| 115 |
+
|
| 116 |
+
```json
|
| 117 |
+
{"seed": 1803372, "env_id": "maze_2d/hard", "episode_seed": 1052368083, "extra_state": null}
|
| 118 |
+
```
|
| 119 |
+
|
| 120 |
+
### Initial State Files (JSON)
|
| 121 |
+
|
| 122 |
+
JSON files containing the initial state for reproducible episode starts:
|
| 123 |
+
|
| 124 |
+
```json
|
| 125 |
+
{
|
| 126 |
+
"object_path": "000-156/fa3dad5169784cec85b96682231e3f44.glb",
|
| 127 |
+
"secret_yaw": 1.098,
|
| 128 |
+
"secret_pitch": 0.487,
|
| 129 |
+
...
|
| 130 |
+
}
|
| 131 |
+
```
|
| 132 |
+
|
| 133 |
+
## Usage with VLM-Gym
|
| 134 |
+
|
| 135 |
+
```python
|
| 136 |
+
from pathlib import Path
|
| 137 |
+
import json
|
| 138 |
+
|
| 139 |
+
# Load test episodes
|
| 140 |
+
test_file = Path(dataset_path) / "test_set_easy" / "maze_2d__easy" / "*.jsonl"
|
| 141 |
+
for jsonl_file in test_file.parent.glob("*.jsonl"):
|
| 142 |
+
with open(jsonl_file) as f:
|
| 143 |
+
for line in f:
|
| 144 |
+
episode = json.loads(line)
|
| 145 |
+
env_id = episode["env_id"]
|
| 146 |
+
seed = episode["seed"]
|
| 147 |
+
episode_seed = episode["episode_seed"]
|
| 148 |
+
# Use with VLM-Gym inference runner
|
| 149 |
+
```
|
| 150 |
+
|
| 151 |
+
## Citation
|
| 152 |
+
|
| 153 |
+
If you use this dataset, please cite:
|
| 154 |
+
|
| 155 |
+
```bibtex
|
| 156 |
+
@misc{vlmgym2024,
|
| 157 |
+
title={VLM-Gym: A Benchmark for Vision-Language Models in Interactive Environments},
|
| 158 |
+
author={VLM-Gym Team},
|
| 159 |
+
year={2024},
|
| 160 |
+
url={https://huggingface.co/datasets/VisGym/inference-dataset}
|
| 161 |
+
}
|
| 162 |
+
```
|
| 163 |
+
|
| 164 |
+
## License
|
| 165 |
+
|
| 166 |
+
MIT License
|