Skip to content

VBVR-DataFactory/O-85_2d_object_rotation_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

O-85: 2D Object Rotation Data Generator

Generates synthetic 2D object rotation tasks. The goal is to rotate 2D objects clockwise or counterclockwise by a specified number of degrees around their respective centroids, demonstrating understanding of geometric transformations.

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-85
Task 2D Object Rotation
Category Transformation
Resolution 1024×1024 px
FPS 16 fps
Duration ~2-3 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/O-85_2d_object_rotation_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 Required
--seed int Random seed for reproducibility Random
--output str Output directory data/questions
--no-videos flag Skip video generation False

📖 Task Example

Prompt

The scene contains 4 2D object(s). Show them rotating counterclockwise by 84 degrees around their respective centroids.

Visual

Initial Frame
2D objects in initial orientation
Animation
Objects rotating around centroids
Final Frame
Objects in rotated orientation

📖 Task Description

Objective

Rotate 2D objects clockwise or counterclockwise by a specified number of degrees around their respective centroids, demonstrating understanding of geometric transformations.

Task Setup

  • Number of Objects: Variable (1 or more)
  • Rotation Direction: Clockwise or counterclockwise - this generator modifies the rotation parameter of 2D objects while keeping all other properties (shape type, color, size, position) unchanged
  • Rotation Angle: Specified degrees (e.g., 90, 180, 270)
  • Rotation Center: Around each object's centroid
  • High Resolution: 1024×1024 for detailed visualization
  • Smooth Animation: Shows gradual rotation process
  • Independent Rotation: Each object rotates around its own centroid

Key Features

  • Geometric transformation: Tests understanding of 2D rotation
  • Centroid-based rotation: Objects rotate around their centers
  • Direction awareness: Must understand clockwise vs counterclockwise
  • Angle precision: Accurate rotation by specified degrees
  • Multiple objects: Can handle multiple objects rotating independently
  • Visual clarity: High-resolution representation for precise visualization

📦 Data Format

data/questions/2d_object_rotation_task/2d_object_rotation_00000000/
├── first_frame.png      # Initial state (objects in initial orientation)
├── final_frame.png      # Goal state (objects rotated)
├── 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 2-3 seconds long.


🏷️ Tags

2d-rotation geometric-transformation object-rotation centroid-rotation transformation spatial-reasoning


About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages