mani_skill.utils.visualization.misc#

Attributes#

Functions#

images_to_video(images, output_dir, video_name[, fps, ...])

Calls imageio to run FFMPEG on a list of images. For more info on

put_info_on_image(image, info[, extras, overlay])

put_text_on_image(image, lines)

tile_images(images[, nrows])

Tile multiple images to a single image comprised of nrows and an appropriate number of columns to fit all the images.

Module Contents#

mani_skill.utils.visualization.misc.images_to_video(images, output_dir, video_name, fps=10, quality=5, verbose=True, **kwargs)[source]#

Calls imageio to run FFMPEG on a list of images. For more info on parameters, see https://imageio.readthedocs.io/en/stable/format_ffmpeg.html :param images: The list of images. Images should be HxWx3 in RGB order. :param output_dir: The folder to put the video in. :param video_name: The name for the video. :param fps: Frames per second for the video. Not all values work with FFMPEG,

use at your own risk.

Parameters:
  • quality (Optional[float]) – Default is 5. Uses variable bit rate. Highest quality is 10, lowest is 0. Set to None to prevent variable bitrate flags to FFMPEG so you can manually specify them using output_params instead. Specifying a fixed bitrate using ‘bitrate’ disables this parameter.

  • images (list[mani_skill.utils.structs.types.Array]) –

  • output_dir (str) –

  • video_name (str) –

  • fps (int) –

  • verbose (bool) –

References

facebookresearch/habitat-lab

mani_skill.utils.visualization.misc.put_info_on_image(image, info, extras=None, overlay=True)[source]#
Parameters:

info (dict[str, float]) –

mani_skill.utils.visualization.misc.put_text_on_image(image, lines)[source]#
Parameters:
  • image (numpy.ndarray) –

  • lines (list[str]) –

mani_skill.utils.visualization.misc.tile_images(images, nrows=1)[source]#

Tile multiple images to a single image comprised of nrows and an appropriate number of columns to fit all the images. The images can also be batched (e.g. of shape (B, H, W, C)), but give images must all have the same batch size.

if nrows is 1, images can be of different sizes. If nrows > 1, they must all be the same size.

Parameters:

images (list[mani_skill.utils.structs.types.Array]) –

Return type:

mani_skill.utils.structs.types.Array

mani_skill.utils.visualization.misc.TEXT_FONT = None[source]#