sketchkit.animation package

Subpackages

Submodules

sketchkit.animation.animator module

class sketchkit.animation.animator.Animator(method: str = 'RIFE', device: str = 'cuda')[source]

Bases: object

A class for sketch animation or inbetweening.

method

The animation method that is used.

Type:

str

device

The device that is used.

Type:

str

_gen_gif(all_files, save_path)[source]

Gennerate .gif for images in a folder.

run(input_0: ndarray, input_1: ndarray, inner_frames: int = 8, output_folder: str = 'animation') list[ndarray][source]

Generate sketch animation or inbetweening.

Parameters:
  • input_0 (numpy.ndarray) – an input raster image (frame 0).

  • input_1 (numpy.ndarray) – an input raster image (frame 1).

  • inner_frames (int) – number of intermediate frames.

  • output_folder (str, optional) – an output folder to store the output animation results.

Returns:

a list of image frames in size H*W*3 in [0, 255].

Return type:

img_list (list[numpy.ndarray])

Module contents

class sketchkit.animation.Animator(method: str = 'RIFE', device: str = 'cuda')[source]

Bases: object

A class for sketch animation or inbetweening.

method

The animation method that is used.

Type:

str

device

The device that is used.

Type:

str

_gen_gif(all_files, save_path)[source]

Gennerate .gif for images in a folder.

run(input_0: ndarray, input_1: ndarray, inner_frames: int = 8, output_folder: str = 'animation') list[ndarray][source]

Generate sketch animation or inbetweening.

Parameters:
  • input_0 (numpy.ndarray) – an input raster image (frame 0).

  • input_1 (numpy.ndarray) – an input raster image (frame 1).

  • inner_frames (int) – number of intermediate frames.

  • output_folder (str, optional) – an output folder to store the output animation results.

Returns:

a list of image frames in size H*W*3 in [0, 255].

Return type:

img_list (list[numpy.ndarray])