Skip to content

VBVR-DataFactory/G-32_undirected_graph_navigation_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

G-32: Undirected Graph Navigation Data Generator

Generates synthetic datasets for training and evaluating vision models on graph theory and pathfinding tasks. Each sample contains an undirected graph where an agent must navigate from start to end along the shortest path with bidirectional edge traversal.

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-32
Task Undirected Graph Navigation
Category Spatiality
Resolution 1024×1024 px
FPS 16 fps
Duration ~2 seconds
Output PNG images + MP4 video

🚀 Usage

Installation

# 1. Clone the repository
git clone https://github.com/VBVR-DataFactory/G-32_undirected_graph_navigation_data-generator.git
cd G-32_undirected_graph_navigation_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 network of nodes connected by undirected edges (edges without arrows) with a green starting node, a red ending node, and a purple triangular agent positioned at the green starting node. The agent can move along any edge, traversing it from one end to the other in either direction, moving from one node to an adjacent node each step. Move the purple triangular agent from the green starting node to the red ending node along the path with the minimum number of steps.

Visual

Initial Frame
Agent at green start node
Animation
Agent traverses edges bidirectionally
Final Frame
Agent reaches red end node

📖 Task Description

Objective

Navigate an undirected graph from green start node to red end node with bidirectional edge traversal, using the shortest possible path.

Task Setup

  • Graph structure: 4-8 nodes connected by undirected edges
  • Edges: No arrows, can be traversed in either direction
  • Start node: Green circular node with purple triangular agent
  • End node: Red circular node (target destination)
  • Agent: Purple triangle representing the navigator
  • Movement freedom: Can move along any edge in both directions
  • Background: White with clear graph visualization
  • Goal: Find and traverse shortest path with no directional constraints

Key Features

  • Undirected edge traversal (bidirectional movement)
  • Shortest path finding without directional restrictions
  • Graph theory reasoning (understanding bidirectional connectivity)
  • Visual graph representation with color-coded nodes
  • Simpler than directed graphs (more path options)
  • Standard BFS pathfinding in undirected graphs

📦 Data Format

data/questions/undirected_graph_navigation_task/undirected_graph_navigation_00000000/
├── first_frame.png      # Graph with agent at start node
├── final_frame.png      # Agent at end node after navigation
├── prompt.txt           # Navigation instruction emphasizing bidirectionality
├── ground_truth.mp4     # Animation of shortest undirected path
└── question_metadata.json # Task metadata

File specifications:

  • Images: 1024×1024 PNG format
  • Video: MP4 format, 16 fps
  • Duration: ~2 seconds

🏷️ Tags

graph-reasoning pathfinding undirected-graph shortest-path graph-theory spatial-reasoning


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages