visualize_segmentation_data
- hybrid_learning.datasets.data_visualization.visualize_segmentation_data(dataset, save_as=None, max_num_samples=5, skip_none=True, skip_empty=True, shuffle=False)[source]
Visualize a dataset yielding tuples of the form
(input, target_mask)
.Both
input
andtarget_mask
must be images astorch.Tensor
of the same width and height.- Parameters
dataset (BaseDataset) – the dataset to visualize
save_as (Optional[str]) – file path to save the image under using
matplotlib.pyplot.savefig()
; not saved ifNone
max_num_samples (int) – the maximum number of samples to show for each
dataset
skip_none (bool) – whether to ignore when a None value in input or target is encountered
skip_empty (bool) – whether to ignore samples with all-black target masks
shuffle (bool) – whether to randomly select samples from the dataset