sprite-dx-data / docs /source-archive.md
Candle
Make sprite datasets browsable with typed media subsets
7677a5d
|
Raw History Blame Contribute Delete
3.94 kB

SpriteDX source archive

Counts checked against data revision 177436de2edfc620065134530409e1394d8672fd on September 11, 2026.

Directory Contents Count
data/animations/ Source animated WebP files 257
data/animations/ Human scene-boundary annotations (*.hf.json) 257
data/animations/ Historical scene summaries, raw predictions, plots, and timelines 257 of each
data/shots/ WebP shot clips 744
data/loops/ Candidate lists (*.loop.json) and generated previews (*.loop.webp) 744 of each
data/loops/ Human loop annotations (*.loop.hf.json) 248
data/expanded/ Extracted RGB frames 1,080
data/automatte/ Matte images, read as grayscale by the correction script 1,080
data/fgr/ Processed RGB foreground images 1,080
data/masked/ RGBA images with alpha applied 1,080

The four PNG directories share the same relative filenames, so images can be paired by path. Each contains 378 images under random/ and 702 across sample-000/, sample-001/, sample-037/, sample-045/, sample-100/, and sample-193/. These are related representations, not 4,320 independent examples.

Original filenames and annotations

  • sample-NNN.webp: a source animation.
  • sample-NNN-S.webp: shot S from that animation.
  • sample-NNN-S-fF.png: frame F within that shot.
  • *.hf.json: human feedback; the hf suffix here means human feedback.

Frame indices are zero-based. Scene-boundary annotations contain scene_change_indices; each index marks the last frame of a shot, with the next shot starting at the following frame.

Loop candidate files contain a list of objects with start, end, score, cos_sim, length, length_penalty, and motion_energy. The historical generator exports frames[start:end], with an exclusive end. Human loop annotations contain loop (boolean) and best_cut ([start, end]); the annotation UI previews both endpoints inclusively. Account for this difference when consuming the labels.

Of the 248 human loop annotations, 227 have loop: true and 21 have loop: false. The other 496 shot clips have no human loop annotation; missing feedback does not mean a negative label. Generated loop previews are algorithmic candidates, not necessarily human-approved loops.

Reading the source archive

The repository stores media and JSON sidecars directly. To read an animation locally, install Pillow and use its animation iterator:

python -m pip install pillow
import json
from pathlib import Path
from PIL import Image, ImageSequence

# Run from a checkout containing the actual media files.
root = Path("data")
with Image.open(root / "animations/sample-000.webp") as image:
    frames = [frame.convert("RGB").copy() for frame in ImageSequence.Iterator(image)]

annotation = json.loads(
    (root / "animations/sample-000.hf.json").read_text()
)
print(len(frames), annotation["scene_change_indices"])

For paired frame data, use the same relative path under expanded/, automatte/, fgr/, and masked/. Decode masked images as RGBA to preserve transparency.

Historical tooling and limitations

The repository retains scene detection and review scripts, shot splitting, loop candidate generation and review, frame extraction, and foreground correction utilities. These document earlier experiments and may contain hard-coded paths or sample selections.

TransNetV2 is no longer used by the project. Its code, weights, and prediction files remain as historical artifacts and are excluded from the release tables. The release builder does not run it or require it.

The historical loop generator writes length_penalty into the JSON motion_energy field. That field should not be interpreted as measured motion energy. Generated loop previews also use a fixed 40 ms frame duration, which may differ from source timing.