niteshade.utils.rand_cmap

niteshade.utils.rand_cmap(nlabels)

Creates a random colormap to be used together with matplotlib. Useful for segmentation tasks.

Parameters

nlabels (int) – Number of labels (size of colormap)

Returns

colormap filled with nlabels random colors

Return type

random_colormap (ListedColormap)