Skip to content

VBVR-DataFactory/G-15_grid_avoid_obstacles_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

32 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

G-15: Grid Avoid Obstacles Data Generator

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.


📌 Basic Information

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

🚀 Usage

Installation

# 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 Data

# 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

Command-Line Options

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)

📖 Task Example

Prompt

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.

Visual

Initial Frame
Agent at start, obstacles visible
Animation
Agent navigates around obstacles
Final Frame
Agent reached end avoiding obstacles

📖 Task Description

Objective

Navigate a grid from start to end point while avoiding obstacles, finding the shortest valid path.

Task Setup

  • 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

Key Features

  • 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 Format

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

🏷️ Tags

spatiality obstacle-avoidance path-planning spatial-reasoning grid-navigation


About

This is the data generator for grid: avoid obstacles task

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages