mindspore.dataset.vision.RandomLighting

View Source On Gitee
class mindspore.dataset.vision.RandomLighting(alpha=0.05)[source]

Add AlexNet-style PCA-based noise to an image. The eigenvalue and eigenvectors for Alexnet’s PCA noise is calculated from the imagenet dataset.

Parameters

alpha (float, optional) – Intensity of the image, which must be non-negative. Default: 0.05.

Raises
Supported Platforms:

CPU

Examples

>>> import mindspore.dataset as ds
>>> import mindspore.dataset.vision as vision
>>>
>>> image_folder_dataset = ds.ImageFolderDataset("/path/to/image_folder_dataset_directory")
>>> transforms_list = [vision.Decode(), vision.RandomLighting(0.1)]
>>> image_folder_dataset = image_folder_dataset.map(operations=transforms_list,
...                                                 input_columns=["image"])
Tutorial Examples: