hello.utils.colors module

hello.utils.colors.gen_palette(labels, template=None, size=80, out_file='palette.png')[source]
hello.utils.colors.get_colors(labels, template=None)[source]
hello.utils.colors.get_colors_bgr(labels, template=None)[source]
hello.utils.colors.get_colors_rgb(labels, template=None)[source]
hello.utils.colors.rgb2seg(rgb, remap)[source]

Convert color to segmentation mask.

Parameters:
  • rgb (np.ndarray) – a rgb image

  • remap (dict) – like {index: (r,g,b)}