pipert.utils.visualizer.colormap

An awesome colormap for really neat visualizations. Copied from Detectron, and removed gray colors.

Module Contents

Functions

colormap(rgb=False, maximum=255)

Args:

random_color(rgb=False, maximum=255)

Args:

pipert.utils.visualizer.colormap.colormap(rgb=False, maximum=255)[source]
Args:

rgb (bool): whether to return RGB colors or BGR colors. maximum (int): either 255 or 1

Returns:

ndarray: a float32 array of Nx3 colors, in range [0, 255] or [0, 1]

pipert.utils.visualizer.colormap.random_color(rgb=False, maximum=255)[source]
Args:

rgb (bool): whether to return RGB colors or BGR colors. maximum (int): either 255 or 1

Returns:

ndarray: a vector of 3 numbers