EClassificationDataset Class
EClassificationDataset manages a dataset of images.
A dataset is a collection of images with different types of labeling: labeling for the classification of images, labeling for the segmentation of pixels, and/or labeling for the detection of objects (classification and localization).
The dataset maintains 3 sets of labels for each type of labeling:
- the classification labels that characterize an entire image;
- the segmentation labels that characterize the pixels of an image; and
- the object labels that characterize axis-aligned rectangle region of an image.
The classification and segmentation labels are entirely user defined. The set of segmentation labels will always contain at least the "Background" label representing pixels of the images that have no relevant information for your task (for example, in a defect segmentation application, the "Background" pixels would be the pixels without any defects).
For each type of labeling, an image can either be unlabeled or labeled. When an image in unlabelled for a given type of labeling, the image won't be used for training a deep learning tool that requires this type of labeling.
The image in the dataset can be stored as path to an image file or as an Open eVision image structure. Supported structures are 8-bits monochrome (EImageBW8), 16-bits monochrome (EImageBW16), and 24-bits color (EROIC24, EImageC24).
The dataset associates with each image a region of interest and a mask/don't care area. By default, the region of interest of an image is its full extent and its mask is empty.
A EClassificationDataset object is also responsible for providing tools to do data augmentation. Data augmentation is the process of generating new images on-the-fly by applying affine transformations to those already in the dataset. Data augmentation allows a deep neural network to be invariant to the applied transformation without having to capture and label real world images containing those transformations.
A dataset can contain images with different sizes (with and height of their region of interest). However, the dataset has a default resolution (see EClassificationDataset and EClassificationDataset) that is used by deep learning tools that require the same input image size such as the EClassifier. When the images have different sizes, the default resolution will be the resolution of the region of interest of the first image added to the dataset.
Namespace: Euresys::Open_eVision_2_16::EasyDeepLearning
Methods
The image can be specified by its path on the filesystem (parameter
imagePath
) or by an Open eVision mage buffer (parameter img
). By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns
By default, all the images will have no classification label and no classification. However, a label can be directly specified for all of the images.
The method returns the number of images added to the dataset.
Finally, a new EClassificationDataset object with relative paths to the images is saved into the given directory.
A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::GaussianNoiseMinimumStandardDeviation and EClassificationDataset::GaussianNoiseMaximumStandardDeviation (also called the normal distribution).
Its value must be superior or equal to
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::GaussianNoiseMinimumStandardDeviation and EClassificationDataset::GaussianNoiseMaximumStandardDeviation (also called the normal distribution).
Its value must be betwteen
The caller is responsible for clearing the memory allocated for each image.
It is represented as an angle from the vertical direction. Its value must be between
The horizontal shift will be between
The rotation angle will be between
It is represented as an angle from the horizontal direction. Its value must be between
The vertical shift will be between
The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SaltAndPepperNoiseMinimumDensity and EClassificationDataset::SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be betwteen
The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SaltAndPepperNoiseMinimumDensity and EClassificationDataset::SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be betwteen
If an image has no segmentation (EClassificationDataset::HasSegmentation), the getter will throw an excpetion.
The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
Its value must be strictly higher than EClassificationDataset::SpeckleNoiseMinimumStandardDeviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
Its value must be strictly positive and lower than EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
All the images associated with this label will be set to unlabeled (see EClassificationDataset::HasLabel).
This method sets all the pixels in the dataset assigned to this label to the background label.
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::GaussianNoiseMinimumStandardDeviation and EClassificationDataset::GaussianNoiseMaximumStandardDeviation (also called the normal distribution).
Its value must be superior or equal to
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::GaussianNoiseMinimumStandardDeviation and EClassificationDataset::GaussianNoiseMaximumStandardDeviation (also called the normal distribution).
Its value must be betwteen
It is represented as an angle from the vertical direction. Its value must be between
The horizontal shift will be between
The rotation angle will be between
It is represented as an angle from the horizontal direction. Its value must be between
The vertical shift will be between
The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SaltAndPepperNoiseMinimumDensity and EClassificationDataset::SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be betwteen
The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SaltAndPepperNoiseMinimumDensity and EClassificationDataset::SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be betwteen
If an image has no segmentation (EClassificationDataset::HasSegmentation), the getter will throw an excpetion.
The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
Its value must be strictly higher than EClassificationDataset::SpeckleNoiseMinimumStandardDeviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
Its value must be strictly positive and lower than EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
EClassificationDataset Class
EClassificationDataset manages a dataset of images.
A dataset is a collection of images with different types of labeling: labeling for the classification of images, labeling for the segmentation of pixels, and/or labeling for the detection of objects (classification and localization).
The dataset maintains 3 sets of labels for each type of labeling:
- the classification labels that characterize an entire image;
- the segmentation labels that characterize the pixels of an image; and
- the object labels that characterize axis-aligned rectangle region of an image.
The classification and segmentation labels are entirely user defined. The set of segmentation labels will always contain at least the "Background" label representing pixels of the images that have no relevant information for your task (for example, in a defect segmentation application, the "Background" pixels would be the pixels without any defects).
For each type of labeling, an image can either be unlabeled or labeled. When an image in unlabelled for a given type of labeling, the image won't be used for training a deep learning tool that requires this type of labeling.
The image in the dataset can be stored as path to an image file or as an Open eVision image structure. Supported structures are 8-bits monochrome (EImageBW8), 16-bits monochrome (EImageBW16), and 24-bits color (EROIC24, EImageC24).
The dataset associates with each image a region of interest and a mask/don't care area. By default, the region of interest of an image is its full extent and its mask is empty.
A EClassificationDataset object is also responsible for providing tools to do data augmentation. Data augmentation is the process of generating new images on-the-fly by applying affine transformations to those already in the dataset. Data augmentation allows a deep neural network to be invariant to the applied transformation without having to capture and label real world images containing those transformations.
A dataset can contain images with different sizes (with and height of their region of interest). However, the dataset has a default resolution (see EClassificationDataset and EClassificationDataset) that is used by deep learning tools that require the same input image size such as the EClassifier. When the images have different sizes, the default resolution will be the resolution of the region of interest of the first image added to the dataset.
Namespace: Euresys.Open_eVision_2_16.EasyDeepLearning
Properties
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::GaussianNoiseMinimumStandardDeviation and EClassificationDataset::GaussianNoiseMaximumStandardDeviation (also called the normal distribution).
Its value must be superior or equal to
The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::GaussianNoiseMinimumStandardDeviation and EClassificationDataset::GaussianNoiseMaximumStandardDeviation (also called the normal distribution).
Its value must be betwteen
It is represented as an angle from the vertical direction. Its value must be between
The horizontal shift will be between
The rotation angle will be between
It is represented as an angle from the horizontal direction. Its value must be between
The vertical shift will be between
The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SaltAndPepperNoiseMinimumDensity and EClassificationDataset::SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be betwteen
The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SaltAndPepperNoiseMinimumDensity and EClassificationDataset::SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.
Its value must be betwteen
The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
Its value must be strictly higher than EClassificationDataset::SpeckleNoiseMinimumStandardDeviation.
The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
Its value must be strictly positive and lower than EClassificationDataset::SpeckleNoiseMaximumStandardDeviation.
Methods
The image can be specified by its path on the filesystem (parameter
imagePath
) or by an Open eVision mage buffer (parameter img
). By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns
By default, all the images will have no classification label and no classification. However, a label can be directly specified for all of the images.
The method returns the number of images added to the dataset.
Finally, a new EClassificationDataset object with relative paths to the images is saved into the given directory.
A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.
The caller is responsible for clearing the memory allocated for each image.
If an image has no segmentation (EClassificationDataset::HasSegmentation), the getter will throw an excpetion.
All the images associated with this label will be set to unlabeled (see EClassificationDataset::HasLabel).
This method sets all the pixels in the dataset assigned to this label to the background label.
If an image has no segmentation (EClassificationDataset::HasSegmentation), the getter will throw an excpetion.