sketchkit.animation package¶
Subpackages¶
Submodules¶
sketchkit.animation.animator module¶
- class sketchkit.animation.animator.Animator(method: str = 'RIFE', device: str = 'cuda')[source]¶
Bases:
objectA class for sketch animation or inbetweening.
- method¶
The animation method that is used.
- Type:
str
- device¶
The device that is used.
- Type:
str
- 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:
objectA class for sketch animation or inbetweening.
- method¶
The animation method that is used.
- Type:
str
- device¶
The device that is used.
- Type:
str
- 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])