Datasets:

Modalities:
Image
Text
Formats:
parquet
Languages:
English
Size:
< 1K
ArXiv:
Libraries:
Datasets
pandas
License:
Dataset Viewer
Auto-converted to Parquet Duplicate
id
stringlengths
24
24
canvas_width
int64
128
228
canvas_height
int64
128
228
num_frames
int64
50
50
num_sprites
int64
2
7
matrix
sequencelengths
2
7
opacity
sequencelengths
2
7
texture
images listlengths
2
7
61c4461f079dcd9363c18427
128
128
50
3
[ [ [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, ...
[ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
61dc4be0079dcd93638a2698
128
228
50
5
[ [ [ 1.272725224494934, 0, 0.2728131413459778, 0, 1.0148907899856567, -0.012286588549613953, 0, 0, 1 ], [ 1.272725224494934, 0, 0.2728131413459778, 0, 1.0148907899856567, -0.012286588549613953, 0, 0, ...
[ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
62752f25079dcd9363e354c1
128
228
50
5
[ [ [ 3.160493850708008, 0, 0, 0, 1, 7.450580596923828e-9, 0, 0, 1 ], [ 3.160493850708008, 0, 0, 0, 1, 7.450580596923828e-9, 0, 0, 1 ], [ 3.160493850708008, 0, 0, 0, ...
[ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
627baffe079dcd936328858c
128
128
50
5
[ [ [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, ...
[ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
627e4d01079dcd936339d3a6
128
128
50
4
[ [ [ 1, 0, 0, 0, 1.003999948501587, -5.168840289115906e-8, 0, 0, 1 ], [ 1, 0, 0, 0, 1.003999948501587, -5.168840289115906e-8, 0, 0, 1 ], [ 1, 0, 0, 0, 1.003999...
[ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
627e4d48079dcd93633ca189
128
128
50
5
[ [ [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, 0, 1, 0, 0, 0, 1 ], [ 1, 0, 0, ...
[ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
627e5259079dcd936375c0cc
128
228
50
6
[ [ [ 3.160493850708008, 0, 0, 0, 1, 7.450580596923828e-9, 0, 0, 1 ], [ 3.160493850708008, 0, 0, 0, 1, 7.450580596923828e-9, 0, 0, 1 ], [ 3.160493850708008, 0, 0, 0, ...
[ [ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,...
62821517079dcd93630a0887
128
228
50
6
[[[1.0,0.0,0.0,0.0,1.0,7.450580596923828e-9,0.0,0.0,1.0],[1.0,0.0,0.0,0.0,1.0,7.450580596923828e-9,0(...TRUNCATED)
[[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.(...TRUNCATED)
[{"src":"https://datasets-server.huggingface.co/assets/cyberagent/crello-animation/--/{dataset_git_r(...TRUNCATED)
6294c2b6079dcd9363400f47
128
128
50
5
[[[1.0,0.0,0.0,0.0,1.0,-2.220446049250313e-16,0.0,0.0,1.0],[1.0,0.0,0.0,0.0,1.0,-2.220446049250313e-(...TRUNCATED)
[[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.(...TRUNCATED)
[{"src":"https://datasets-server.huggingface.co/assets/cyberagent/crello-animation/--/{dataset_git_r(...TRUNCATED)
6298dbc2079dcd936349cc0e
128
228
50
5
[[[1.0,0.0,0.0,0.0,1.0,7.450580596923828e-9,0.0,0.0,1.0],[1.0,0.0,0.0,0.0,1.0,7.450580596923828e-9,0(...TRUNCATED)
[[1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.0,1.(...TRUNCATED)
[{"src":"https://datasets-server.huggingface.co/assets/cyberagent/crello-animation/--/{dataset_git_r(...TRUNCATED)
End of preview. Expand in Data Studio

Crello Animation

Dataset Summary

The Crello Animation dataset is a collection of animated graphics. Animated graphics are videos composed of multiple sprites, with each sprite rendered by animating a texture. The textures are static images, and the animations involve time-varying affine warping and opacity. The original templates were collected from create.vista.com and converted to a low-resolution format suitable for machine learning analysis.

Usage

import datasets

dataset = datasets.load_dataset("cyberagent/crello-animation")

Supported Tasks

Sprite decomposition task is studied in Suzuki et al., "Fast Sprite Decomposition from Animated Graphics" (to be published in ECCV 2024).

Dataset Structure

Data Instances

Each instance has the following attributes.

Attribute Type Shape Description
id string () Template ID from crello.com
canvas_width int64 () Canvas pixel width
canvas_height int64 () Canvas pixel height
num_frames int64 () The number of frames
num_sprites int64 () The number of sprites
texture image (num_sprites) List of textures (256x256 RGBA images)
matrix float32 (num_sprites, num_frames, 9) List of time-varying warping matrices
opacity float32 (num_sprites, num_frames) List of time-varying opacities

NOTE:

  • The matrix is normalized to a canonical space taking coordinates in the range [-1, 1], assuming rendering with PyTorch functions (see Visualization for details).
  • Currently, the num_frames is fixed to 50, which corresponds to 5 seconds at 10 fps.
  • The first sprite in each example is the static background, and its matrix and opacity are always the identity matrix and 1, respectively.

Data Splits

The Crello Animation dataset has val and test split. Note that the dataset is primarily intended for evaluation purposes rather than training since it is not large.

Split Count
val 154
test 145

Visualization

Each example can be rendered using PyTorch functions as follows. We plan to add rendering example code using libraries other than PyTorch, such as skia-python.

import datasets
import numpy as np
import torch
from einops import rearrange, repeat
from PIL import Image


def render_layers(
    textures: torch.Tensor, matrices: torch.Tensor, opacities: torch.Tensor, canvas_height: int, canvas_width: int
):
    """Render multiple layers using PyTorch functions."""
    tex_expand = repeat(textures, "l h w c -> (l t) c h w", t=matrices.shape[1])
    grid = torch.nn.functional.affine_grid(
        torch.linalg.inv(matrices.reshape(-1, 3, 3))[:, :2],
        (tex_expand.shape[0], tex_expand.shape[1], canvas_height, canvas_width),
        align_corners=True,
    )
    tex_warped = torch.nn.functional.grid_sample(tex_expand, grid, align_corners=True)
    tex_warped = rearrange(tex_warped, "(l t) c h w -> l t h w c", l=len(textures))
    tex_warped[..., -1] = tex_warped[..., -1] * opacities[:, :, None, None]
    return tex_warped


def alpha_blend_torch(fg: torch.Tensor, bg: torch.Tensor, norm_value: float = 255.0) -> torch.Tensor:
    """Blend two images as torch.Tensor."""
    fg_alpha = fg[..., 3:4] / norm_value
    bg_alpha = bg[..., 3:4] / norm_value
    alpha = fg_alpha + bg_alpha * (1 - fg_alpha)
    fg_rgb = fg[..., :3]
    bg_rgb = bg[..., :3]
    rgb = fg_rgb * fg_alpha + bg_rgb * bg_alpha * (1 - fg_alpha)
    return torch.cat([rgb, alpha * norm_value], dim=-1)


def render(
    textures: torch.Tensor, matrices: torch.Tensor, opacities: torch.Tensor, canvas_height: int, canvas_width: int
) -> torch.Tensor:
    """Render example using PyTorch functions."""
    layers = render_layers(textures, matrices, opacities, canvas_height, canvas_width)
    backdrop = layers[0]
    for layer in layers[1:]:
        backdrop = alpha_blend_torch(layer, backdrop)
    return backdrop


ds = datasets.load_dataset("cyberagent/crello-animation")
example = ds["val"][0]

canvas_height = example["canvas_height"]
canvas_width = example["canvas_width"]
matrices_tr = torch.tensor(example["matrix"])
opacities_tr = torch.tensor(example["opacity"])
textures_tr = torch.tensor(np.array([np.array(t) for t in example["texture"]])).float()

frames_tr = render(textures_tr, matrices_tr, opacities_tr, canvas_height, canvas_width)
frames = [Image.fromarray(frame_np.astype(np.uint8)) for frame_np in frames_tr.numpy()]

Dataset Creation

Curation Rationale

The Crello Animation is created with the aim of promoting general machine-learning research on animated graphics, such as sprite decomposition.

Source Data

Initial Data Collection and Normalization

The dataset is initially scraped from the former crello.com and pre-processed to the above format.

Who are the source language producers?

While create.vista.com owns those templates, the templates seem to be originally created by a specific group of design studios.

Personal and Sensitive Information

The dataset does not contain any personal information about the creator but may contain a picture of people in the design template.

Considerations for Using the Data

Social Impact of Dataset

This dataset is constructed for general machine-learning research on animated graphics. If used effectively, it is expected to contribute to the development of technologies that support creative tasks by designers, such as sprite decomposition.

Discussion of Biases

The templates contained in the dataset reflect the biases appearing in the source data, which could present gender biases in specific design categories.

Other Known Limitations

Due to the unknown data specification of the source data, textures and animation parameters do not necessarily accurately reproduce the original design templates. The original template is accessible at the following URL if still available.

https://create.vista.com/artboard/?template=<template_id>

Additional Information

Dataset Curators

The Crello Animation dataset was developed by Tomoyuki Suzuki.

Licensing Information

The origin of the dataset is create.vista.com (formally, crello.com). The distributor ("We") do not own the copyrights of the original design templates. By using the Crello dataset, the user of this dataset ("You") must agree to the VistaCreate License Agreements.

The dataset is distributed under CDLA-Permissive-2.0 license.

NOTE: We do not re-distribute the original files as we are not allowed by terms.

Citation Information

To be published in ECCV 2024.

@inproceedings{suzuki2024fast,
  title={Fast Sprite Decomposition from Animated Graphics},
  author={Suzuki, Tomoyuki and Kikuchi, Kotaro and Yamaguchi, Kota},
  booktitle={ECCV},
  year={2024}
}

Arxiv: https://arxiv.org/abs/2408.03923

Releases

1.0.2: Fix bug in semi-transparent sprites (March 19, 2025) #5

1.0.0: v1 release (July 9, 2024)

Acknowledgments

Thanks to Kota Yamaguchi for providing the Crello dataset that served as a valuable reference for this project.

Downloads last month
84

Paper for cyberagent/crello-animation