Contents:
Array or tensor to PIL image. Works for both grayscale and RGB images.
img (Union[ndarray, Tensor]) – [H W] or [H W C] image, dtype uint8 or float
Union
ndarray
Tensor
cmap (Optional[str]) – colormap for grayscale images
Optional
str
scale_range – if True, rescale a grayscale image to cover the full color range
Image
A PIL image.