Skip to content

VBVR-DataFactory/O-17_color_subtraction_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

O-17: Color Subtraction Data Generator

Generates synthetic visual reasoning tasks demonstrating subtractive color mixing through animated ball collision and merging. Two colored balls move toward each other, overlap with subtractive color mixing, and merge completely at their midpoint.

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 O-17
Task Color Subtraction
Category Perception
Resolution 1024×1024 px
FPS 16 fps
Duration varies
Output PNG images + MP4 video

🚀 Usage

Installation

# Clone the repository
git clone https://github.com/VBVR-DataFactory/O-17_color_subtraction_data-generator.git
cd O-17_color_subtraction_data-generator

# Install dependencies
pip install -r requirements.txt

Generate Data

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

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

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

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

Command-Line Options

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

📖 Task Example

Prompt

Two colored balls start at different positions. Animate them moving toward each other at equal speeds until they merge. When overlapping, show subtractive color mixing in the overlap region. Stop when fully merged at the midpoint.

Visual

Initial Frame
Two colored balls at starting positions
Animation
Balls move, overlap with subtractive mixing, merge
Final Frame
Single merged ball with subtractive color

📖 Task Description

Objective

Animate two colored balls moving toward each other at equal speeds, demonstrating subtractive color mixing during overlap, and stopping when fully merged into a single ball at the midpoint. This generator involves color calculations and modifications through subtractive color mixing, demonstrating understanding of subtractive color theory and RGB color space operations.

Task Setup

  • Two Colored Balls: Each ball has a distinct color (e.g., cyan and yellow)
  • Starting Positions: Balls begin at different locations with sufficient separation
  • Equal Speed Movement: Both balls move toward each other at identical velocities
  • Subtractive Mixing: Overlapping regions display subtractive color mixing (RGB addition normalized, then subtracted from 255)
  • Stopping Condition: Animation ends when balls completely merge at their midpoint

Key Features

  • Subtractive color theory: Tests understanding of subtractive color mixing (pigment/paint model)
  • Smooth animation: Balls move continuously in straight lines toward each other
  • Partial overlap visualization: During movement, only overlapping regions show mixed color
  • Color preservation: Non-overlapping portions retain original colors during partial overlap
  • Midpoint convergence: Balls meet and merge at the mathematical midpoint of their starting positions
  • Final merged state: Result is a single ball displaying the correct subtractive mixture of both original colors
  • Physics simulation: Equal speed movement creates symmetric collision and merging

📦 Data Format

data/questions/color_subtraction_task/color_subtraction_00000000/
├── first_frame.png      # Initial state (two separated colored balls)
├── final_frame.png      # Final state (single merged ball)
├── 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, duration varies based on initial separation.


🏷️ Tags

color-mixing subtractive-color animation collision merging color-theory physics-simulation


About

Subtractive color mixing (ball merging) data generator

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages