Skip to content

VBVR-DataFactory/G-240_add_borders_to_unbordered_shapes_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

G-240: Add Borders To Unbordered Shapes Data Generator

Generates synthetic tasks where shapes are displayed with some having borders and others without. The task is to identify and add thin black borders to every shape that does not already have one.

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-240
Task Add Borders To Unbordered Shapes
Category Transformation
Resolution 1024×1024 px
FPS 16 fps
Duration ~6.5 seconds
Output PNG images + MP4 video

🚀 Usage

Installation

# Clone the repository
git clone https://github.com/Jiaqi-Gong/Gong_VBVR_Data.git
cd Gong_VBVR_Data/G-240_add_borders_to_unbordered_shapes_data-generator

# Install dependencies
pip install -r requirements.txt

Generate Data

# Generate 50 samples
python examples/generate.py --num-samples 50

# Generate with specific seed
python examples/generate.py --num-samples 50 --seed 42

# Generate without videos
python examples/generate.py --num-samples 50 --no-videos

# Custom output directory
python examples/generate.py --num-samples 50 --output data/my_output

Command-Line Options

Argument Type Description Default
--num-samples int Number of samples to generate 50
--seed int Random seed for reproducibility Random
--output str Output directory data/questions
--no-videos flag Skip video generation False

📖 Task Example

Prompt

Several shapes are shown; some have black borders and some do not. Add a thin black border to every shape that does not already have one. Do not change anything else.

Visual

Image Image Image
Initial Frame
Shapes with mixed border status
Animation
Borders being added to unbordered shapes
Final Frame
All shapes now have borders

📖 Task Description

Objective

Identify all shapes that lack borders and add a consistent thin black border to each of them, while preserving all other visual properties. This generator adds visual elements (borders) to existing shapes that lack them, demonstrating shape/element addition tasks.

Task Setup

  • Shape Count: 3-4 shapes per image
  • Shape Types: Triangle, square, circle, pentagon
  • Shape Colors: Randomly selected from 60-color palette
  • Shape Sizes: 80-200 pixels (radius or half-side)
  • Layouts: Row, column, grid, or scatter arrangements
  • Border Properties: 6-pixel black borders
  • Initial State: Mixed—some shapes have borders, some don't (at least one must lack a border)

Key Features

  • Non-overlapping placement with 120px minimum spacing between shapes
  • Margin enforcement: All shapes stay 100px away from image edges
  • Adaptive layouts: Automatic size adjustment to fit shapes within bounds
  • Consistent borders: All borders are 6 pixels wide and pure black
  • Deduplication: Each generated sample is unique based on shape arrangement
  • Smooth animation: Borders animate progressively around shapes (15 hold + 60 transition + 30 final frames)

📦 Data Format

data/questions/add_borders_to_unbordered_shapes_task/add_borders_to_unbordered_shapes_00000000/
├── first_frame.png      # Initial state (shapes with mixed border status)
├── final_frame.png      # Goal state (all shapes with borders)
├── prompt.txt           # Task instructions
├── ground_truth.mp4     # Solution video (16 fps)
└── question_metadata.json # Task metadata

File specifications: Images are 1024×1024 PNG. Videos are MP4 at 16 fps, approximately 6.5 seconds long (105 frames total).


🏷️ Tags

shape-recognition border-detection visual-completion object-properties spatial-reasoning


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages