ncalab.visualization.animation ============================== .. py:module:: ncalab.visualization.animation Attributes ---------- .. autoapisummary:: ncalab.visualization.animation.animator_style_dark ncalab.visualization.animation.animator_styles Classes ------- .. autoapisummary:: ncalab.visualization.animation.AnimatorStyle ncalab.visualization.animation.Animator Module Contents --------------- .. py:class:: AnimatorStyle(color_background, color_overlay, color_title, color_progress, underline: bool = True, progress_h: int = 3) .. py:attribute:: color_background .. py:attribute:: color_overlay .. py:attribute:: color_title .. py:attribute:: color_progress .. py:attribute:: underline :value: True .. py:attribute:: progress_h :value: 3 .. py:method:: apply(fig, ax) .. py:data:: animator_style_dark .. py:data:: animator_styles .. py:class:: Animator(nca, seed: torch.Tensor, steps: int = 100, interval: int = 100, repeat: bool = True, repeat_delay: int = 10000, overlay: bool = False, show_timestep: bool = True, hidden: bool = False, show_input: bool = False, style: str | AnimatorStyle = 'dark') Responsible for rendering NCA predictions as GIFs. :param nca: NCA model instance :type nca: ncalab.BasicNCAModel :param seed: Input image for the NCA model :type seed: torch.Tensor :param steps: Number of NCA prediction steps per sample, defaults to 100 :type steps: int, optional :param interval: Time of each frame (milliseconds), defaults to 100 :type interval: int, optional :param repeat: Whether to loop the animation, defaults to True :type repeat: bool, optional :param repeat_delay: Time after which the animation is repeated (milliseconds), defaults to 10000 :type repeat_delay: int, optional :param overlay: Whether to overlay output channel (segmentation mask), defaults to False :type overlay: bool, optional :param show_timestep: Whether to display timestep in caption, defaults to True :type show_timestep: bool, optional .. py:attribute:: animation_fig .. py:method:: save(path: str | pathlib.Path) Save generated figure as GIF :param path: Output path :type path: str | Path