compare_masks

hybrid_learning.datasets.data_visualization.compare_masks(*masks, colors=('blue', 'red', 'yellow', 'cyan'))[source]

Merge several monochrome masks in different colors into the same image.

Parameters
  • masks (Union[Tensor, Image]) – monochrome PIL images (model 'L' or '1'), RGB mode PIL images, or torch tensors; torch tensors are converted to 'L' mode PIL images

  • colors (Sequence[str]) –

Returns

image with bright part of each mask in corresponding color

Return type

Image