l5kit.visualization.gif module¶
- l5kit.visualization.gif.write_gif(output_filepath: str, images: Iterable[numpy.ndarray], resolution: Tuple[int, int], fps: float = 24.0, loop: int = 0, interpolation: int = 2) None ¶
Writes input RGB images to given output gif filepath using imageio. It resizes images if necessary using given interpolation (default=``cv2.INTER_CUBIC``).
- Parameters
output_filepath (str) – output filepath, should end in .gif
images (Iterable[np.ndarray]) – a list or other iterable of images.
resolution (Tuple[int, int]) – desired resolution, e.g. (512, 512)
- Keyword Arguments
fps (float) – Frames per second (default: {24.0})
loop (int) – 0 means loop forever, any other number loops the GIF that many times (default: {0})
interpolation (int) – Interpolation to be used when resizing (default: {cv2.INTER_CUBIC})