Skip to content

VBVR-DataFactory/O-45_sequence_completion_data-generator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

O-45: Sequence Completion Data Generator

Generates synthetic pattern recognition tasks where a sequence of elements follows a logical rule (arithmetic, geometric, Fibonacci, or cyclic pattern) and the missing final element must be determined. Tests understanding of mathematical sequences and repeating cycles.

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-45
Task Sequence Completion
Category Abstraction
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-45_sequence_completion_data-generator.git
cd O-45_sequence_completion_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

The scene shows a mixed sequence. Elements are arranged horizontally from left to right. The last position contains a question mark (?) indicating a missing element. Observe the pattern: both colors and shapes follow combined cyclic orders. Determine the element that should replace the question mark to complete the sequence according to the established pattern.

Visual

Initial Frame
Sequence with missing element (?)
Animation
? being replaced with answer
Final Frame
Complete sequence shown

📖 Task Description

Objective

Identify the logical pattern governing a sequence of elements and determine the missing element that completes the sequence according to that pattern.

Task Setup

  • Eight Sequence Types:
    • Type 1: Arithmetic - constant difference between consecutive numbers
    • Type 2: Geometric - constant ratio between consecutive numbers
    • Type 3: Power - squares of consecutive integers (1², 2², 3², etc.)
    • Type 4: Fibonacci - each number is sum of previous two
    • Type 5: Shape Cycle - shapes follow repeating cyclic order
    • Type 6: Color Cycle - colors follow repeating cyclic order
    • Type 7: Direction Cycle - directions follow repeating cyclic order
    • Type 8: Mixed - both colors and shapes follow combined cycles
  • Horizontal Layout: Elements arranged left to right
  • Question Mark Indicator: ? marks the missing position
  • No Video Generation: Static task, generate_videos=False by default

Key Features

  • Mathematical reasoning: Tests understanding of arithmetic, geometric, and Fibonacci sequences
  • Power sequences: Recognizes square number patterns
  • Cyclic pattern detection: Identifies repeating cycles in shapes, colors, or directions
  • Combined patterns: Handles sequences with multiple interacting rules
  • Pattern abstraction: Extracts underlying rule from limited examples
  • Logical completion: Applies discovered pattern to predict next element
  • Visual representation: Clear horizontal layout with distinctive question mark

📦 Data Format

data/questions/sequence_completion_task/sequence_completion_00000000/
├── first_frame.png      # Initial state (sequence with ?)
├── final_frame.png      # Final state (complete sequence)
├── prompt.txt           # Task instructions with pattern type
├── ground_truth.mp4     # Solution video (16 fps, if enabled)
└── question_metadata.json # Task metadata

File specifications: Images are 1024×1024 PNG. Videos are MP4 at 16 fps (if generate_videos=True).


🏷️ Tags

pattern-recognition sequence-completion mathematical-reasoning fibonacci cyclic-patterns logical-reasoning arithmetic-sequences geometric-sequences


About

This is a sequence completion data generatornerator.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages