CoolFace
Datasetpublic

sprited/sprite-dx-data

SpriteDX — Sprite Matting and Animation Annotations Explore sprite frames with matching mattes, foreground images, and transparent cutouts; inspect human annotations for animation loops and shot boundaries. This collection comes from experiments on the SpriteDX project by Sprited. Start with the matting subset in the viewer above. Each row shows the original frame and its three paired representations. Use the subset selector for loops or scene_boundaries. Subset Rows What… See the full description on the dataset page: https://huggingface.co/datasets/sprited/sprite-dx-data.

sourceHugging Faceupdated 10d agoView on Hugging Face
0likes386downloads
Dataset Card

SpriteDX — Sprite Matting and Animation Annotations

Explore sprite frames with matching mattes, foreground images, and transparent cutouts; inspect human annotations for animation loops and shot boundaries. This collection comes from experiments on the SpriteDX project by Sprited.

Start with the `matting` subset in the viewer above. Each row shows the original frame and its three paired representations. Use the subset selector for loops or scene_boundaries.

SubsetRowsWhat you can do with it
matting (default)1,080Inspect sprite edges, compare background removal, and experiment with compositing
loops248Explore human loopability decisions and selected frame ranges: 227 positive, 21 negative
scene_boundaries257Experiment with splitting multi-shot sprite animations using human boundary annotations

This is a small experimental collection. The mattes and processed foregrounds are pipeline outputs, not verified ground-truth masks. Human loop labels are subjective. See the limitations below before treating these as evaluation targets.

Looking for assets to use directly in a game? The separate free animated character pack on itch.io provides 77 CC0 characters, 231 animated clips, and PNG atlases. Its CC0 release does not establish a license for this older experimental dataset.

A sample

Original frameMatteTransparent cutout
[image][image][image]

Sample sample-000-0-f19. All three images come from the same source frame. The foreground column additionally contains the processed RGB colors used by the cutout.

Load a subset

bash
pip install datasets pillow
python
from datasets import load_dataset

# Streaming reads examples without downloading the entire collection first.
frames = load_dataset("sprited/sprite-dx-data", "matting", split="train", streaming=True)
row = next(iter(frames))

row["image"].save("source.png")
row["matte"].convert("L").save("matte.png")
row["cutout"].save("cutout.png")  # RGBA; keep the alpha channel

The Parquet tables embed their image and video bytes, so media columns do not depend on local file paths. For a fully downloaded dataset, omit streaming=True.

Composite a sprite

python
from PIL import Image

cutout = row["cutout"].convert("RGBA")
background = Image.new("RGBA", cutout.size, (65, 80, 105, 255))
background.alpha_composite(cutout)
background.convert("RGB").save("composite.png")

Read an annotated animation segment

python
from io import BytesIO
from urllib.request import urlopen
from PIL import Image
from datasets import Video, load_dataset

loops = load_dataset("sprited/sprite-dx-data", "loops", split="train", streaming=True)
# Read labels and the original WebP without installing a Python video decoder.
loops = loops.cast_column("video", Video(decode=False))
loop = next(row for row in loops if row["is_loop"])
with urlopen(loop["animation_url"]) as response:
    animation_bytes = response.read()
with Image.open(BytesIO(animation_bytes)) as animation:
    frames = []
    for index in range(loop["start_frame"], loop["end_frame_exclusive"]):
        animation.seek(index)
        frames.append(animation.convert("RGBA").copy())
print(loop["id"], len(frames))

The animation subsets include a playable `video` column and a static filmstrip with frame numbers. The MP4 videos are viewing copies, limited to 320 pixels on the longer side, with source frame durations preserved. H.264 does not preserve alpha; any transparency is composited onto a neutral background. animation_url links to the complete original animated WebP at a pinned source revision.

For loops, the video plays the human-selected range, including for negative examples; it is not a newly verified seamless loop. For scene_boundaries, it plays the complete source animation. To decode video tensors in Python, install the video dependencies described in the Datasets video guide; use Video(decode=False) when you only need labels or encoded bytes.

Column guide

All subsets include id and source_id. Use source_id to group examples from the same source animation.

SubsetColumnsMeaning
mattingimage, matte, foreground, cutoutEmbedded original RGB, matte, processed RGB, and RGBA images
mattingframe_id, shot_index, frame_indexIdentity and zero-based position within the source shot
mattingcollection, source_pathOriginal folder group and source-frame location
loopsis_loopHuman loopability label; false is an explicit negative label
loopsstart_frame, end_frame_exclusiveHuman-selected range within the shot, normalized to Python slice semantics
scene_boundariesscene_end_frames, num_shotsLast frame of each shot except the final shot; number of resulting shots
Both animation subsetsvideo, preview, animation_url, num_frames, annotation_pathPlayable MP4, filmstrip, original WebP URL, full animation/shot length, and original human-label file
All subsetswidth, heightFull-resolution source dimensions, not filmstrip dimensions

All frame indices are zero-based. For scene boundaries, the next shot starts at scene_end_frame + 1.

The single train split is an unsplit collection provided for loader compatibility, not a prescribed training benchmark. There is no held-out validation or test set. Split by source_id rather than by row to reduce leakage from related frames; this does not guarantee distinct character identities across splits.

Coverage and limitations

  • The 1,080 matting rows contain 1,071 distinct frame_id values. Nine frame identities occur in both a sample folder and random/. Preserve collection when examining processing variants; deduplicate by frame_id when appropriate for training.
  • Matting coverage is uneven: 378 rows are in random/, and 702 are concentrated in six source-animation folders. These are not independent scenes or a balanced sample.
  • The four image columns are paired representations of each row, not four times as many examples. Mattes are stored as RGB PNGs and can be converted to grayscale. They may contain edge errors, halos, or missing detail.
  • Only 248 of 744 shot clips have human loop annotations. The remaining 496 are excluded from loops; absence of feedback is not a negative label.
  • Loop ranges use exclusive ends in the release tables. Original *.loop.hf.json uses inclusive ends in the labeling UI; conversion adds one to that endpoint. Original labels are preserved.
  • No verified quality scores, character categories, action captions, or generation prompts are supplied. This collection does not establish broad model performance.

Source archive and reproducibility

The original media, annotations, and experimental scripts remain available in data/ and at the repository root. The viewer loads only the curated release/ tables, so incompatible historical JSON files are not mixed together.

See the source archive guide for file counts, original annotation conventions, and known issues in the old loop generator. TransNetV2 is no longer used by the project; its historical artifacts are excluded from these tables and are not needed to load or rebuild them.

Rebuild the tables from the original archive with:

Install FFmpeg (with the libx264 encoder) on your system first. It is only needed to generate or validate the viewing copies, not to browse or download the dataset.

bash
pip install -r requirements-release.txt
python scripts/build_release.py
python -m unittest discover -s tests

The builder refuses to overwrite an existing release. Run it in a source checkout without release/ to regenerate the files. release/manifest.json records row counts and SHA-256 checksums for each shard. Tests load every subset through the README configuration, decode all embedded images, and verify streaming access.

Provenance and reuse

These files were collected for SpriteDX experiments. Complete per-sample generation provenance and the exact matte-generation run are not recorded in this archive. An explicit license for this dataset has not yet been established; no CC0 or other reuse grant is asserted by this card.