mindspore.dataset.vision.py_transforms.ToPIL
- class mindspore.dataset.vision.py_transforms.ToPIL[source]
Convert the input decoded NumPy image array of RGB mode to a PIL image of RGB mode.
Examples
>>> # data is already decoded, but not in PIL image format >>> import mindspore.dataset.vision.py_transforms as py_vision >>> from mindspore.dataset.transforms.py_transforms import Compose >>> >>> Compose([py_vision.ToPIL(), py_vision.RandomHorizontalFlip(0.5), >>> py_vision.ToTensor()])