An EDataAugmentation object is responsible for storing the data augmentation parameters and generating new transformed images from existing ones. Deep learning algorithms are not invariant to the location, scale, or rotation of the elements of interest in the image. Thus, if the final application requires the deep learning algorithm to be invariant to those characteristics, the dataset must contain images covering the spectrum of those characteristics. More...


Public Member Functions | |
| EDataAugmentation () | |
| Creates an EDataAugmentation object. | |
| EDataAugmentation (eVision.EasyDeepLearning.EDataAugmentation other) | |
| Creates a copy of the EDataAugmentation object other. | |
| void | CopyTo (eVision.EasyDeepLearning.EDataAugmentation other) |
| Copies itself to the EDataAugmentation object other. | |
| void | Load (string path) |
| Loads an EDataAugmentation object. The given ESerializer must have been created for reading. | |
| void | Load (eVision.ESerializer serializer) |
| Loads an EDataAugmentation object. The given ESerializer must have been created for reading. | |
| void | Save (string path) |
| Saves an EDataAugmentation object. The given ESerializer must have been created for writing. | |
| void | Save (eVision.ESerializer serializer) |
| Saves an EDataAugmentation object. The given ESerializer must have been created for writing. | |
| bool | HasDataAugmentations () |
| Whether the EDataAugmentation object contains augmentations. | |
| eVision.EBaseROI | Generate (eVision.EBaseROI img, eVision.EasyDeepLearning.EDLDataAugmentationType type) |
| Generates a new image from a generic EBaseROI image. The caller is responsible for calling freeing the memory of the returned image by calling delete on the image. | |
| eVision.EBaseROI | Generate (eVision.EBaseROI img) |
| Generates a new image from a generic EBaseROI image. The caller is responsible for calling freeing the memory of the returned image by calling delete on the image. | |
| void | Generate (eVision.EROIBW8 source, eVision.EROIBW8 dest, eVision.EasyDeepLearning.EDLDataAugmentationType type) |
| Generates a new image. | |
| void | Generate (eVision.EROIBW8 source, eVision.EROIBW8 dest) |
| Generates a new image. | |
| void | Generate (eVision.EROIBW16 source, eVision.EROIBW16 dest, eVision.EasyDeepLearning.EDLDataAugmentationType type) |
| Generates a new image. | |
| void | Generate (eVision.EROIBW16 source, eVision.EROIBW16 dest) |
| Generates a new image. | |
| void | Generate (eVision.EROIC24 source, eVision.EROIC24 dest, eVision.EasyDeepLearning.EDLDataAugmentationType type) |
| Generates a new image. | |
| void | Generate (eVision.EROIC24 source, eVision.EROIC24 dest) |
| Generates a new image. | |
Properties | |
| int | MaxHorizontalShift [get, set] |
| Return the maximum horizontal shift allowed. | |
| int | MaxVerticalShift [get, set] |
| Return the maximum vertical shift allowed. | |
| float | MaxRotationAngle [get, set] |
| Returns the maximum rotation angle allowed. The unit of the returned angle is in the current angle unit (see Easy.AngleUnit). | |
| bool | EnableVerticalFlip [get, set] |
| Gets whether to use vertically flipped versions of input images. | |
| bool | EnableHorizontalFlip [get, set] |
| Gets whether to use horizontally flipped versions of input images. | |
| float | MinScale [get, set] |
| Gets the minimum scaling allowed. | |
| float | MaxScale [get, set] |
| Gets the maximum scaling allowed. | |
| float | MaxHorizontalShear [get, set] |
| Gets the maximum absolute horizontal shear, represented as an angle from the vertical direction. | |
| float | MaxVerticalShear [get, set] |
| Gets the maximum absolute vertical shear, represented as an angle from the horizontal direction. | |
| float | MaxBrightnessOffset [get, set] |
| Gets the maximum absolute brightness offset. | |
| float | MaxContrastGain [get, set] |
| Gets the maximum contrast gain. | |
| float | MinContrastGain [get, set] |
| Gets the minimum contrast gain. | |
| float | MinGamma [get, set] |
| Gets the minimum gamma for gamma correction. | |
| float | MaxGamma [get, set] |
| Gets the maximum gamma for gamma correction. | |
| float | MaxHueOffset [get, set] |
| Gets the maximum absolute hue offset. | |
| float | MinSaturationGain [get, set] |
| Gets the minimum saturation gain. | |
| float | MaxSaturationGain [get, set] |
| Gets the maximum saturation gain. | |
| float | GaussianNoiseMaximumStandardDeviation [get, set] |
| The Gaussian noise maximum standard deviation. | |
| float | GaussianNoiseMinimumStandardDeviation [get, set] |
| The Gaussian noise minimum standard deviation. | |
| float | SpeckleNoiseMaximumStandardDeviation [get, set] |
| The speckle noise maximum standard deviation. | |
| float | SpeckleNoiseMinimumStandardDeviation [get, set] |
| The speckle noise minimum standard deviation. | |
| float | SaltAndPepperNoiseMaximumDensity [get, set] |
| The maximum density of the salt and pepper noise. | |
| float | SaltAndPepperNoiseMinimumDensity [get, set] |
| The minimum density of the salt and pepper noise. | |
| uint | StainDisruptionMaxAnchorPoints [get, set] |
| The maximum number of anchor points to use while disrupting the ellipse. | |
| float | StainDisruptionMaxIntensity [get, set] |
| The maximum offset applied to the coordinates (x,y) of a pixel from the ellipse contour. | |
| uint | StainEllipseMinRadius [get, set] |
| The minimum radius of the ellipse used to produce the stain. | |
| uint | StainEllipseMaxRadius [get, set] |
| The maximum radius of the ellipse used to produce the stain. | |
| byte | MinStainColor [get, set] |
| The minimum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation.MinStainColor and EDataAugmentation.MaxStainColor). | |
| byte | MaxStainColor [get, set] |
| The maximum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation.MinStainColor and EDataAugmentation.MaxStainColor). | |
| uint | StainColorVariation [get, set] |
| The variation of the color used to fill in the ellipse (We use an gaussian distribution of standard mean deviation stainColorVariation). | |
| float | StainInterpolationSiteFactor [get, set] |
| The factor to compute the number of interpolation sites to use from the number of anchor points. | |
| float | StainProbability [get, set] |
| Probability of applying the stain data augmentation (default value: 0, i.e. no stain). | |
| int | StainBlur [get, set] |
| Stain blur. | |
An EDataAugmentation object is responsible for storing the data augmentation parameters and generating new transformed images from existing ones. Deep learning algorithms are not invariant to the location, scale, or rotation of the elements of interest in the image. Thus, if the final application requires the deep learning algorithm to be invariant to those characteristics, the dataset must contain images covering the spectrum of those characteristics.
Data augmentation can be used to avoid capturing in the original dataset the whole spectrum of those characteristics by automatically generating new versions of the images in the dataset that are shifted, scaled or rotated to cover this spectrum.
When generating a new image, the EDataAugmentation will randomly pick transformation value within the specified limits.
When using data augmentation, one must carefully chose the spectrum of transformations such that the element of interest are still visible in the image.
License(s): EasyClassify or EasySegment or EasyLocate
| eVision.EasyDeepLearning.EDataAugmentation.EDataAugmentation | ( | ) |
Creates an EDataAugmentation object.
| eVision.EasyDeepLearning.EDataAugmentation.EDataAugmentation | ( | eVision.EasyDeepLearning.EDataAugmentation | other | ) |
Creates a copy of the EDataAugmentation object other.
| other | The other EDataAugmentation that we will copy into this one. |
| void eVision.EasyDeepLearning.EDataAugmentation.CopyTo | ( | eVision.EasyDeepLearning.EDataAugmentation | other | ) |
Copies itself to the EDataAugmentation object other.
| other | The other EDataAugmentation that we will copy into this one. |
| eVision.EBaseROI eVision.EasyDeepLearning.EDataAugmentation.Generate | ( | eVision.EBaseROI | img | ) |
Generates a new image from a generic EBaseROI image. The caller is responsible for calling freeing the memory of the returned image by calling delete on the image.
| img | The image to transform. |
If the data augmentation fails, the method will throw an exception.
| eVision.EBaseROI eVision.EasyDeepLearning.EDataAugmentation.Generate | ( | eVision.EBaseROI | img, |
| eVision.EasyDeepLearning.EDLDataAugmentationType | type ) |
Generates a new image from a generic EBaseROI image. The caller is responsible for calling freeing the memory of the returned image by calling delete on the image.
| img | The image to transform. |
| type | The type of transformation to generate. |
If the data augmentation fails, the method will throw an exception.
| void eVision.EasyDeepLearning.EDataAugmentation.Generate | ( | eVision.EROIBW16 | source, |
| eVision.EROIBW16 | dest ) |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
If the data augmentation fails, the method will throw an exception.
| void eVision.EasyDeepLearning.EDataAugmentation.Generate | ( | eVision.EROIBW16 | source, |
| eVision.EROIBW16 | dest, | ||
| eVision.EasyDeepLearning.EDLDataAugmentationType | type ) |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
| type | The type of transformation to generate. |
If the data augmentation fails, the method will throw an exception.
| void eVision.EasyDeepLearning.EDataAugmentation.Generate | ( | eVision.EROIBW8 | source, |
| eVision.EROIBW8 | dest ) |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
If the data augmentation fails, the method will throw an exception.
| void eVision.EasyDeepLearning.EDataAugmentation.Generate | ( | eVision.EROIBW8 | source, |
| eVision.EROIBW8 | dest, | ||
| eVision.EasyDeepLearning.EDLDataAugmentationType | type ) |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
| type | The type of transformation to generate. |
If the data augmentation fails, the method will throw an exception.
| void eVision.EasyDeepLearning.EDataAugmentation.Generate | ( | eVision.EROIC24 | source, |
| eVision.EROIC24 | dest ) |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
If the data augmentation fails, the method will throw an exception.
| void eVision.EasyDeepLearning.EDataAugmentation.Generate | ( | eVision.EROIC24 | source, |
| eVision.EROIC24 | dest, | ||
| eVision.EasyDeepLearning.EDLDataAugmentationType | type ) |
Generates a new image.
| source | The image to transform. |
| dest | The transformed image. |
| type | The type of transformation to generate. |
If the data augmentation fails, the method will throw an exception.
| bool eVision.EasyDeepLearning.EDataAugmentation.HasDataAugmentations | ( | ) |
Whether the EDataAugmentation object contains augmentations.
| void eVision.EasyDeepLearning.EDataAugmentation.Load | ( | eVision.ESerializer | serializer | ) |
Loads an EDataAugmentation object. The given ESerializer must have been created for reading.
| serializer | The serializer. |
| void eVision.EasyDeepLearning.EDataAugmentation.Load | ( | string | path | ) |
Loads an EDataAugmentation object. The given ESerializer must have been created for reading.
| path | The file path. |
| void eVision.EasyDeepLearning.EDataAugmentation.Save | ( | eVision.ESerializer | serializer | ) |
Saves an EDataAugmentation object. The given ESerializer must have been created for writing.
| serializer | The ESerializer object that is written to. |
| void eVision.EasyDeepLearning.EDataAugmentation.Save | ( | string | path | ) |
Saves an EDataAugmentation object. The given ESerializer must have been created for writing.
| path | The file path. |
|
getset |
Gets whether to use horizontally flipped versions of input images.
|
getset |
Gets whether to use vertically flipped versions of input images.
|
getset |
The Gaussian noise maximum standard deviation.
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EDataAugmentation.GaussianNoiseMinimumStandardDeviation and EDataAugmentation.GaussianNoiseMaximumStandardDeviation.(also called the normal distribution).
Its value must be superior or equal to EDataAugmentation.GaussianNoiseMinimumStandardDeviation.
This noise is computed before the salt and paper noise.
|
getset |
The Gaussian noise minimum standard deviation.
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EDataAugmentation.GaussianNoiseMinimumStandardDeviation and EDataAugmentation.GaussianNoiseMaximumStandardDeviation.(also called the normal distribution).
Its value must be between 0 and EDataAugmentation.GaussianNoiseMaximumStandardDeviation.
This noise is computed before the salt and paper noise.
|
getset |
Gets the maximum absolute brightness offset.
|
getset |
Gets the maximum contrast gain.
Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EDataAugmentation.MinContrastGain and EDataAugmentation.MaxContrastGain. A contrast transformation does not change the overall brightness of an image.
|
getset |
Gets the maximum gamma for gamma correction.
Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EDataAugmentation.MinGamma and EDataAugmentation.MaxGamma.
|
getset |
Gets the maximum absolute horizontal shear, represented as an angle from the vertical direction.
|
getset |
Return the maximum horizontal shift allowed.
|
getset |
Gets the maximum absolute hue offset.
|
getset |
Returns the maximum rotation angle allowed. The unit of the returned angle is in the current angle unit (see Easy.AngleUnit).
|
getset |
Gets the maximum saturation gain.
|
getset |
Gets the maximum scaling allowed.
|
getset |
The maximum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation.MinStainColor and EDataAugmentation.MaxStainColor).
Its value must be bigger than EDataAugmentation.MinStainColor.
|
getset |
Gets the maximum absolute vertical shear, represented as an angle from the horizontal direction.
|
getset |
Return the maximum vertical shift allowed.
|
getset |
Gets the minimum contrast gain.
Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EDataAugmentation.MinContrastGain and EDataAugmentation.MaxContrastGain. A contrast transformation does not change the overall brightness of an image.
|
getset |
Gets the minimum gamma for gamma correction.
Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EDataAugmentation.MinGamma and EDataAugmentation.MaxGamma.
|
getset |
Gets the minimum saturation gain.
|
getset |
Gets the minimum scaling allowed.
|
getset |
The minimum color value from which to draw a color to fill in the stain (we use a gaussian distribution of with a mean between EDataAugmentation.MinStainColor and EDataAugmentation.MaxStainColor).
Its value must be inferior to 255 and EDataAugmentation.MaxStainColor.
|
getset |
The maximum density of the salt and pepper noise.
The salt and pepper noise sets the value of a number of randomly selected (between EDataAugmentation.SaltAndPepperNoiseMinimumDensity and EDataAugmentation.SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be between EDataAugmentation.SaltAndPepperNoiseMinimumDensity and 1.
This noise is computed after all the other noises.
|
getset |
The minimum density of the salt and pepper noise.
The salt and pepper noise sets the value of a number of randomly selected (between EDataAugmentation.SaltAndPepperNoiseMinimumDensity and EDataAugmentation.SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be between 0 and EDataAugmentation.SaltAndPepperNoiseMinimumDensity.
This noise is computed after all the other noises.
|
getset |
The speckle noise maximum standard deviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution of deviation between EDataAugmentation.SpeckleNoiseMinimumStandardDeviation and EDataAugmentation.SpeckleNoiseMaximumStandardDeviation.
Its value must be strictly higher than EDataAugmentation.SpeckleNoiseMinimumStandardDeviation.
This noise is computed before the salt and paper noise.
|
getset |
The speckle noise minimum standard deviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution of deviation between EDataAugmentation.SpeckleNoiseMinimumStandardDeviation and EDataAugmentation.SpeckleNoiseMaximumStandardDeviation.
Its value must be strictly positive and lower than EDataAugmentation.SpeckleNoiseMaximumStandardDeviation.
This noise is computed before the salt and paper noise.
|
getset |
Stain blur.
The stain blur is the half kernel size of a Gaussian filter that is applied on the stain to smooth its edges and therefore the transition between the original image and the stain.
|
getset |
The variation of the color used to fill in the ellipse (We use an gaussian distribution of standard mean deviation stainColorVariation).
|
getset |
The maximum number of anchor points to use while disrupting the ellipse.
|
getset |
The maximum offset applied to the coordinates (x,y) of a pixel from the ellipse contour.
|
getset |
The maximum radius of the ellipse used to produce the stain.
Its value must be superior to EDataAugmentation.StainEllipseMinRadius.
|
getset |
The minimum radius of the ellipse used to produce the stain.
Its value must be inferior to EDataAugmentation.StainEllipseMaxRadius.
|
getset |
The factor to compute the number of interpolation sites to use from the number of anchor points.
|
getset |
Probability of applying the stain data augmentation (default value: 0, i.e. no stain).