The Dataset Viewer has been disabled on this dataset.

Lifelong Bouncing Balls (O)

One of the five single-video-stream datasets introduced in Lifelong Learning of Video Diffusion Models From a Single Video Stream (arXiv:2406.04814). Code: https://github.com/plai-group/lifelong-vdm.

The dataset is a single continuous video of two colored balls that bounce deterministically around a 2D box, colliding with the walls and with each other. On every collision a ball changes velocity according to conservation of momentum and cycles through the color sequence red → yellow → red → green. The ball state is fully observable and the dynamics are deterministic, so future frames are perfectly predictable from a long enough history. The "(O)" version is stationary: the color palette never changes. (The companion Lifelong Bouncing Balls (C) adds a slow, non-repeating color drift.)

Train stream Test stream
Frames 1,000,000 1,000,000
Resolution 32 x 32 RGB 32 x 32 RGB
Frame rate 10 FPS (~28 h) 10 FPS (~28 h)
Chunks 1,000 x 1,000 frames 1,000 x 1,000 frames

The test stream is a continuation of the same simulation (same generator, later frames).

Files

config.json                 {"T_total": 1000000, "chunk_size": 1000, "resolution": 32, "seed": 0,
                             "num_balls": 2, "color_shift": false, "frame_dtype": "float32", ...}
train/0/0.npy … 999.npy     float32 arrays of shape (1000, 32, 32, 3), values in [0, 1], RGB
train/0/ball_positions.npy  float64 array of shape (1000000, 2, 2): ball centre coordinates
                            per frame (frame, ball, coordinate), the ground truth used for minADE
test/0/0.npy … 999.npy      same layout as train
test/0/ball_positions.npy

Chunk i holds stream frames i*1000 … i*1000+999, so frame t lives in train/0/{t // 1000}.npy[t % 1000]. Chunks are consecutive; nothing is shuffled. The 0 directory level is the generator seed used by the loaders in the code base. The frames are stored as float32.

Loading

import numpy as np
chunk = np.load("train/0/0.npy")          # (1000, 32, 32, 3) float32 in [0, 1]
frame_12345 = np.load(f"train/0/{12345 // 1000}.npy")[12345 % 1000]

To use the dataset with the paper's code (it expects the directory at datasets/ball_stn):

pip install -U huggingface_hub
hf download jason-yoo-108/lifelong-bouncing-balls-o --repo-type dataset --local-dir datasets/ball_stn
# or: python datasets/download.py ball_stn

Provenance and license

Fully synthetic; generated with datasets/ball.py (seed 0) from the code repository, which can regenerate it. Released under CC BY 4.0.

Citation

@article{yoo2024lifelong,
  title   = {Lifelong Learning of Video Diffusion Models From a Single Video Stream},
  author  = {Yoo, Jason and He, Yingchen and Naderiparizi, Saeid and Green, Dylan and van de Ven, Gido M. and Pleiss, Geoff and Wood, Frank},
  journal = {arXiv preprint arXiv:2406.04814},
  year    = {2024}
}
Downloads last month
49

Paper for jason-yoo-108/lifelong-bouncing-balls-o