ls_mlkit.util.image module

ls_mlkit.util.image.numpy_to_pil(images: ndarray) List[Image][source]

Convert a numpy image or a batch of images to a PIL image. Range of input tensor is assumed to be [0, 1].

ls_mlkit.util.image.pt_to_pil(images: Tensor) List[Image][source]

Convert a torch image to a PIL image. Range of input tensor is assumed to be [0, 1].