Generates synthetic datasets for training and evaluating vision models on obstacle avoidance and pathfinding tasks. Each sample contains a grid where an agent must navigate from start to end while avoiding red obstacle blocks.
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-17 |
| Task | Grid Avoid Red Block |
| 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-17_grid_avoid_red_block_data-generator.git
cd G-17_grid_avoid_red_block_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 green end square, and multiple red filled rectangles 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 green end square along the shortest path without entering any cells containing red filled rectangles.
![]() |
![]() |
![]() |
| Initial Frame Agent at blue start, red obstacles visible |
Animation Agent navigates around red blocks |
Final Frame Agent reached green end avoiding obstacles |
Navigate a 10×10 grid from blue start to green end while avoiding all red obstacle blocks, finding the shortest valid path.
- Grid: 10×10 grid of cells with black borders
- Start point: Blue filled cell with yellow agent
- End point: Green filled cell (final destination)
- Red obstacles: Multiple red filled rectangles blocking movement
- Agent: Yellow circular character
- Movement: Can move up, down, left, right to adjacent non-obstacle cells
- Background: White grid with visible cell borders
- Goal: Reach green end via shortest path while avoiding all red blocks
- Red block avoidance: cannot enter cells with red obstacles
- Shortest path finding around multiple obstacles
- Clear visual markers (blue=start, green=end, red=obstacles, yellow=agent)
- Spatial reasoning: planning route around barriers
- Grid-based movement (no diagonal)
- Variable obstacle placement for diverse scenarios
data/questions/grid_avoid_red_block_task/grid_avoid_red_block_00000000/
├── first_frame.png # Initial grid with red obstacles
├── final_frame.png # Agent at green end, obstacles unchanged
├── prompt.txt # Red block 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 constraint-satisfaction


