Skip to main content

vame.analysis.gif_creator

Variational Animal Motion Embedding 1.0-alpha Toolbox © K. Luxem & P. Bauer, Department of Cellular Neuroscience Leibniz Institute for Neurobiology, Magdeburg, Germany

https://github.com/LINCellularNeuroscience/VAME Licensed under GNU General Public License v3.0

create_video

def create_video(path_to_file: str, file: str, embed: np.ndarray,
clabel: np.ndarray, frames: List[np.ndarray], start: int,
length: int, max_lag: int, num_points: int) -> None

Create video frames for the given embedding.

Arguments:

  • path_to_file str - Path to the file.
  • file str - File name.
  • embed np.ndarray - Embedding array.
  • clabel np.ndarray - Cluster labels.
  • frames List[np.ndarray] - List of frames.
  • start int - Starting index.
  • length int - Length of the video.
  • max_lag int - Maximum lag.
  • num_points int - Number of points.

Returns:

None

gif

def gif(
config: str,
pose_ref_index: int,
parametrization: Parametrizations,
subtract_background: bool = True,
start: int | None = None,
length: int = 500,
max_lag: int = 30,
label: str = 'community',
file_format: str = '.mp4',
crop_size: Tuple[int, int] = (300, 300)) -> None

Create a GIF from the given configuration.

Arguments:

  • config str - Path to the configuration file.
  • pose_ref_index int - Pose reference index.
  • subtract_background bool, optional - Whether to subtract background. Defaults to True.
  • start int, optional - Starting index. Defaults to None.
  • length int, optional - Length of the video. Defaults to 500.
  • max_lag int, optional - Maximum lag. Defaults to 30.
  • label str, optional - Label type [None, community, motif]. Defaults to 'community'.
  • file_format str, optional - File format. Defaults to '.mp4'.
  • crop_size Tuple[int, int], optional - Crop size. Defaults to (300,300).

Returns:

None