Generates synthetic datasets for training and evaluating vision models on obstacle avoidance and spatial navigation tasks. Each sample contains a grid with obstacles that the agent must navigate around to reach the goal.
Each sample pairs a task (first frame + prompt describing what needs to happen) with its ground truth solution (final frame showing the result + video demonstrating how to achieve it). This structure enables both model evaluation and training.
| Property | Value |
|---|---|
| Task ID | G-15 |
| Task | Grid Avoid Obstacles |
| Category | Spatiality |
| Resolution | 1024×1024 px |
| FPS | 16 fps |
| Duration | ~3 seconds |
| Output | PNG images + MP4 video |
# 1. Clone the repository
git clone https://github.com/VBVR-DataFactory/G-15_grid_avoid_obstacles_data-generator.git
cd G-15_grid_avoid_obstacles_data-generator
# 2. Create and activate virtual environment
python3 -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
# 3. Install dependencies
pip install --upgrade pip
pip install -r requirements.txt
pip install -e .# Generate 50 samples
python examples/generate.py --num-samples 50
# Custom output directory
python examples/generate.py --num-samples 100 --output data/my_dataset
# Reproducible generation with seed
python examples/generate.py --num-samples 50 --seed 42
# Without videos (faster)
python examples/generate.py --num-samples 50 --no-videos| Argument | Description |
|---|---|
--num-samples |
Number of tasks to generate (required) |
--output |
Output directory (default: data/questions) |
--seed |
Random seed for reproducibility |
--no-videos |
Skip video generation (images only) |
The scene shows a 10x10 grid with a blue start square (containing a yellow circular agent), a red end square, and multiple black X marks indicating obstacles. Starting from the blue start square, the agent can move to adjacent cells (up, down, left, right). The goal is to move the agent to the red end square along the shortest path without entering any cells marked with black X obstacles.
![]() |
![]() |
![]() |
| Initial Frame Agent at start, obstacles visible |
Animation Agent navigates around obstacles |
Final Frame Agent reached end avoiding obstacles |
Navigate a grid from start to end point while avoiding obstacles, finding the shortest valid path.
- Grid: 10×10 grid of cells
- Start point: Green filled cell (agent starts here)
- End point: Red filled cell (final destination)
- Obstacles: Dark gray cells that block movement
- Agent: Orange circular character
- Movement: Can move up, down, left, right to adjacent non-obstacle cells
- Background: White grid with black borders
- Goal: Reach end point via shortest path while avoiding all obstacles
- Obstacle avoidance: cannot pass through gray obstacle cells
- Shortest path finding around obstacles
- Clear visual markers (green=start, red=end, gray=obstacles, orange=agent)
- Spatial reasoning: planning route around barriers
- Grid-based movement (no diagonal)
- Variable obstacle placement for diverse scenarios
data/questions/grid_avoid_obstacles_task/grid_avoid_obstacles_00000000/
├── first_frame.png # Initial grid with obstacles
├── final_frame.png # Agent at end, obstacles unchanged
├── prompt.txt # Obstacle avoidance navigation instruction
├── ground_truth.mp4 # Animation of path around obstacles
└── question_metadata.json # Task metadata
File specifications:
- Images: 1024×1024 PNG format
- Video: MP4 format, 16 fps
- Duration: ~3 seconds
spatiality obstacle-avoidance path-planning spatial-reasoning grid-navigation


