eVision C++ API 26.10.0-beta.2.dev
Loading...
Searching...
No Matches
eVision::EasyDeepLearning::EClassificationDataset Class Reference

EClassificationDataset manages a dataset of images. More...

#include <eVision/EasyDeepLearning/EClassificationDataset.h>

Inheritance diagram for eVision::EasyDeepLearning::EClassificationDataset:
Collaboration diagram for eVision::EasyDeepLearning::EClassificationDataset:

Public Member Functions

 EClassificationDataset ()
 Constructs a EClassificationDataset object.
 EClassificationDataset (const eVision::EasyDeepLearning::EClassificationDataset &other)
 Copy constructor of a EClassificationDataset object.
 EClassificationDataset (const eVision::EasyDeepLearning::EDataset &other)
 Copy constructor of a EClassificationDataset object from a EDataset object.
virtual ~EClassificationDataset () throw ()
eVision::EasyDeepLearning::EClassificationDataset & operator= (const eVision::EasyDeepLearning::EClassificationDataset &other)
 Assignment operator.
virtual void Clear ()
 Clears the dataset.
std::vector< eVision::EBaseROI * > GetImages () const
 Gets a copy of all images in the dataset. If data augmentation is enabled, the returned images will be augmented versions of the ones in the dataset.
std::vector< eVision::EBaseROI * > GetImages (const std::string &label) const
 Gets all the images associated with the given label.
std::unique_ptr< eVision::EBaseROI > GetImageCopyWithDataAugmentation (int index, eVision::EasyDeepLearning::EDLDataAugmentationType generationType) const
 Generates a new image from the i-th image of the dataset. For the variant where a pointer is returned, the user is responsible for clearing the memory of the returned pointer.
std::unique_ptr< eVision::EBaseROI > GetImageCopyWithDataAugmentation (int index) const
 Generates a new image from the i-th image of the dataset. For the variant where a pointer is returned, the user is responsible for clearing the memory of the returned pointer.
void GetImageCopyWithDataAugmentation (int index, eVision::EBaseROI &img, eVision::EasyDeepLearning::EDLDataAugmentationType generationType)
 Generates a new image from the i-th image of the dataset. For the variant where a pointer is returned, the user is responsible for clearing the memory of the returned pointer.
void GetImageCopyWithDataAugmentation (int index, eVision::EBaseROI &img)
 Generates a new image from the i-th image of the dataset. For the variant where a pointer is returned, the user is responsible for clearing the memory of the returned pointer.
void SetEnableDataAugmentation (bool enable)
 Enable data augmentation.
bool GetEnableDataAugmentation () const
 Enable data augmentation.
void SetMaxHorizontalShift (int32_t maxShift)
 Maximum horizontal shift for data augmentation.
int32_t GetMaxHorizontalShift () const
 Maximum horizontal shift for data augmentation.
void SetMaxVerticalShift (int32_t maxShift)
 Maximum vertical shift for data augmentation.
int32_t GetMaxVerticalShift () const
 Maximum vertical shift for data augmentation.
void SetMaxRotationAngle (float maxAngle)
 Maximum rotation angle for data augmentation.
float GetMaxRotationAngle () const
 Maximum rotation angle for data augmentation.
void SetEnableVerticalFlip (bool enable)
 Enable vertical flipping in data augmentation.
bool GetEnableVerticalFlip () const
 Enable vertical flipping in data augmentation.
void SetEnableHorizontalFlip (bool enable)
 Enable horizontal flipping in data augmentation.
bool GetEnableHorizontalFlip () const
 Enable horizontal flipping in data augmentation.
void SetMinScale (float minScale)
 Minimum scaling allowed for data augmentation.
float GetMinScale () const
 Minimum scaling allowed for data augmentation.
void SetMaxScale (float maxScale)
 Maximum scaling allowed for data augmentation.
float GetMaxScale () const
 Maximum scaling allowed for data augmentation.
void SetMaxHorizontalShear (float hShear)
 Maximum absolute horizontal shear.
float GetMaxHorizontalShear () const
 Maximum absolute horizontal shear.
void SetMaxVerticalShear (float vShear)
 Maximum absolute vertical shear.
float GetMaxVerticalShear () const
 Maximum absolute vertical shear.
void SetMaxBrightnessOffset (float offset)
 Maximum absolute brightness offset. Its value must be between 0 and 1.
float GetMaxBrightnessOffset () const
 Maximum absolute brightness offset. Its value must be between 0 and 1.
void SetMaxContrastGain (float val)
 Maximum contrast gain. Its value must be strictly positive and over EClassificationDataset::SetMinContrastGain.
float GetMaxContrastGain () const
 Maximum contrast gain. Its value must be strictly positive and over EClassificationDataset::SetMinContrastGain.
void SetMinContrastGain (float val)
 Minimum contrast gain. Its value must be strictly positive and below EClassificationDataset::SetMaxContrastGain.
float GetMinContrastGain () const
 Minimum contrast gain. Its value must be strictly positive and below EClassificationDataset::SetMaxContrastGain.
void SetMinGamma (float gamma)
 Minimum gamma for gamma correction. Its value must be strictly positive and below EClassificationDataset::SetMaxGamma.
float GetMinGamma () const
 Minimum gamma for gamma correction. Its value must be strictly positive and below EClassificationDataset::SetMaxGamma.
void SetMaxGamma (float gamma)
 Maximum gamma for gamma correction. Its value must be higher than EClassificationDataset::SetMinGamma.
float GetMaxGamma () const
 Maximum gamma for gamma correction. Its value must be higher than EClassificationDataset::SetMinGamma.
void SetMaxHueOffset (float hueOffset)
 Maximum absolute hue offset. Its value must be between 0 and 180 degrees.
float GetMaxHueOffset () const
 Maximum absolute hue offset. Its value must be between 0 and 180 degrees.
void SetMinSaturationGain (float saturationGain)
 Minimum saturation gain. Its value must be strictly positive.
float GetMinSaturationGain () const
 Minimum saturation gain. Its value must be strictly positive.
void SetMaxSaturationGain (float saturationGain)
 Maximum saturation gain. Its value must be over or equal to EClassificationDataset::SetMinSaturationGain.
float GetMaxSaturationGain () const
 Maximum saturation gain. Its value must be over or equal to EClassificationDataset::SetMinSaturationGain.
void SetGaussianNoiseMaximumStandardDeviation (float gaussianMaximumDeviation)
 The Gaussian noise maximum standard deviation.
float GetGaussianNoiseMaximumStandardDeviation () const
 The Gaussian noise maximum standard deviation.
void SetGaussianNoiseMinimumStandardDeviation (float gaussianMinimumDeviation)
 The Gaussian noise minimum standard deviation.
float GetGaussianNoiseMinimumStandardDeviation () const
 The Gaussian noise minimum standard deviation.
void SetSpeckleNoiseMaximumStandardDeviation (float speckleMaximumDeviation)
 The speckle noise maximum standard deviation.
float GetSpeckleNoiseMaximumStandardDeviation () const
 The speckle noise maximum standard deviation.
void SetSpeckleNoiseMinimumStandardDeviation (float speckleMinimumDeviation)
 The speckle noise minimum standard deviation.
float GetSpeckleNoiseMinimumStandardDeviation () const
 The speckle noise minimum standard deviation.
void SetSaltAndPepperNoiseMaximumDensity (float saltAndPepperMaximumDensity)
 The maximum density of the salt and pepper noise.
float GetSaltAndPepperNoiseMaximumDensity () const
 The maximum density of the salt and pepper noise.
void SetSaltAndPepperNoiseMinimumDensity (float saltAndPepperMinimumDensity)
 The minimum density of the salt and pepper noise.
float GetSaltAndPepperNoiseMinimumDensity () const
 The minimum density of the salt and pepper noise.
void SplitDataset (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2, float proportion, bool random) const
 Splits the dataset in two parts to be used for training and validation respectively.
void SplitDataset (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2, float proportion) const
 Splits the dataset in two parts to be used for training and validation respectively.
void SplitDataset (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2) const
 Splits the dataset in two parts to be used for training and validation respectively.
void SplitDatasetForSegmentation (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2, float proportion, bool random) const
 Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
void SplitDatasetForSegmentation (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2, float proportion) const
 Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
void SplitDatasetForSegmentation (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2) const
 Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
void SplitDatasetForLocator (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2, float proportion, bool random) const
 Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
void SplitDatasetForLocator (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2, float proportion) const
 Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
void SplitDatasetForLocator (eVision::EasyDeepLearning::EClassificationDataset &d1, eVision::EasyDeepLearning::EClassificationDataset &d2) const
 Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
eVision::EasyDeepLearning::EClassificationDataset ExtractSplit (const eVision::EasyDeepLearning::EDatasetSplit &split, eVision::EasyDeepLearning::EDatasetType type) const
 Creates a new EClassificationDataset containing only the images of the given split type.
 EClassificationDataset (CppWrapperInternal::InternalConstructor)
Public Member Functions inherited from eVision::EasyDeepLearning::EDataset
 EDataset ()
 Constructs a EDataset object.
 EDataset (const eVision::EasyDeepLearning::EDataset &other)
 Copy constructor of a EDataset object.
virtual ~EDataset () throw ()
eVision::EasyDeepLearning::EDataset & operator= (const eVision::EasyDeepLearning::EDataset &other)
 Assignment operator.
void Load (const std::string &path)
 Loads a classification dataset from disk.
void Load (eVision::ESerializer *serializer)
 Loads a classification dataset from disk.
void Save (const std::string &path)
 Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label.
void Save (eVision::ESerializer *serializer)
 Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label.
void SaveWithRelativePath (const std::string &path)
 Saves the dataset with image paths relative to the directory in which the dataset file is saved.
void SetBasePath (const std::string &basePath)
 Sets the base path for the images specified with a relative path.
void Export (const std::string &directory, eVision::EImageFileType fileType, int quality) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, eVision::EImageFileType fileType) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, bool keepFilename, eVision::EImageFileType fileType, int quality) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, bool keepFilename, eVision::EImageFileType fileType) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, bool keepFilename) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, int width, int height, int channels, eVision::EImageFileType fileType, int quality) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, int width, int height, int channels, eVision::EImageFileType fileType) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, int width, int height, int channels) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, int width, int height, int channels, bool keepFilename, eVision::EImageFileType fileType, int quality) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, int width, int height, int channels, bool keepFilename, eVision::EImageFileType fileType) const
 Exports the dataset and its images to the given directory.
void Export (const std::string &directory, int width, int height, int channels, bool keepFilename) const
 Exports the dataset and its images to the given directory.
uint32_t GetWidth () const
 Width of the region of interest of the first image added to the dataset.
uint32_t GetHeight () const
 Height of the region of interest of the first image added to the dataset.
uint32_t GetChannels () const
 Number of channels of the first image added to the dataset.
eVision::EasyDeepLearning::EImageAnnotationFormat GetAvailableImageAnnotationFormat (const std::string &imageFile) const
 Image annotation file formats that are available next to the image file.
eVision::EasyDeepLearning::EImageAnnotationFormat GetAvailableImageAnnotationFormat (int imgId) const
 Image annotation file formats that are available next to the image file.
void ImportYOLOTXTAnnotations (int imgId, const std::string &labelFile)
 Imports YOLO TXT annotations (for EasyLocate Bounding Box).
void ImportYOLOTXTAnnotations (const std::string &labelFile)
 Imports YOLO TXT annotations (for EasyLocate Bounding Box).
void ImportPascalVOCXMLAnnotations (int imgId)
 Imports Pascal VOC XML annotations (for EasyLocate Bounding Box).
void ImportPascalVOCXMLAnnotations ()
 Imports Pascal VOC XML annotations (for EasyLocate Bounding Box).
int AddImage (const std::string &imagePath)
 Adds an image to the dataset.
int AddImage (const std::string &imagePath, const std::string &label)
 Adds an image to the dataset.
int AddImage (const std::string &imagePath, int originX, int originY, int width, int height, const eVision::ERegion &mask)
 Adds an image to the dataset.
int AddImage (const std::string &imagePath, int originX, int originY, int width, int height, const eVision::ERegion &mask, const std::string &label)
 Adds an image to the dataset.
int AddImage (const eVision::EBaseROI &img)
 Adds an image to the dataset.
int AddImage (const eVision::EBaseROI &img, const std::string &label)
 Adds an image to the dataset.
int AddImage (const eVision::EBaseROI &img, int originX, int originY, int width, int height, const eVision::ERegion &mask)
 Adds an image to the dataset.
int AddImage (const eVision::EBaseROI &img, int originX, int originY, int width, int height, const eVision::ERegion &mask, const std::string &label)
 Adds an image to the dataset.
int AddImages (const std::string &filter)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImages (const std::string &filter, const std::string &label)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImages (const std::string &filter, int originX, int originY, int width, int height, const eVision::ERegion &mask)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImages (const std::string &filter, int originX, int originY, int width, int height, const eVision::ERegion &mask, const std::string &label)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImagesFromCSV (const std::string &csvFile, int imageColumn, int labelColumn, int skipLines, const std::string &separator)
 Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
int AddImagesFromCSV (const std::string &csvFile, int imageColumn, int labelColumn, int skipLines)
 Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
int AddImagesFromCSV (const std::string &csvFile, int imageColumn, int labelColumn)
 Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
int AddImagesFromCSV (const std::string &csvFile, int imageColumn)
 Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
int AddImagesFromCSV (const std::string &csvFile)
 Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
void RemoveImage (int imgId)
 Removes the image at the given index. All annotations (label, segmentation, objects) will be lost.
int GetNumImages () const
 Number of images in the dataset.
int GetNumImageFiles () const
 Number of different image files contained in the dataset.
int GetNumImagesForFile (const std::string &filePath) const
 Get the number of images in the dataset that are associated with the given image file.
std::unique_ptr< eVision::EBaseROI > GetImageCopy (int index) const
 Gets a copy of the i-th image of the dataset.
void GetImageCopy (int index, eVision::EBaseROI &img) const
 Gets a copy of the i-th image of the dataset.
std::string GetImagePath (int index) const
 Gets the path of the i-th image of the dataset. If the image was not given using a path, the method will throw an exception.
bool IsImageFile (int index) const
 Whether the image is stored as a file path towards an image.
bool IsEmbeddedImage (int index) const
 Whether the image is embedded into the dataset and is not a reference towards an image file.
std::string GetImageLabel (int index) const
 Gets the label of the i-th image of the dataset. An exception is thrown if the image has no classification label.
void SetImageLabel (int index, const std::string &label)
 Sets the label of images in the dataset.
void SetImageLabel (const std::string &filter, const std::string &label)
 Sets the label of images in the dataset.
void UnsetImageLabel (int index)
 Unset the label of the given image of the dataset. After this operation, the given image will have no classification labels.
bool HasLabel (int index) const
 Whether an image has a classification label.
int GetNumLabeledImages () const
 Number of images that have a classification label.
int GetNumUnlabeledImages () const
 Number of images that doesn't have any classification label.
std::vector< uint32_t > GetImagesIndexesWithLabel (const std::string &label) const
 Gets a list of index corresponding to the images associated with the given label.
std::vector< uint32_t > GetImagesIndexesWithLabel (int labelIndex) const
 Gets a list of index corresponding to the images associated with the given label.
std::vector< int > GetLabeledImagesIndexes () const
 Gets a list of index corresponding to the images that have a classification label.
std::vector< int > GetTextLabeledImagesIndexes () const
 Gets a list of index corresponding to the images that have a text only label.
std::vector< int > GetImagesIndexesWithNoLabel () const
 Gets a list of index corresponding to the images with no classification labels.
int GetNumLabels () const
 Number of labels in the dataset.
void AddLabel (const std::string &label)
 Adds a label to the dataset.
std::string GetLabel (int i) const
 Gets the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1).
void SetLabel (int index, const std::string &label)
 Sets the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1). This operation does not add a new label to the dataset but simply renames an existing label.
float GetLabelWeight (int index) const
 Gets the weight associated to the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1).
void SetLabelWeight (int index, const float &weight)
 Sets the weight associated to the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1). This operation does not add a new label.
void SetLabelColor (int index, const eVision::ERGBColor &color)
 Sets the label color for a classification label.
eVision::ERGBColor GetLabelColor (int index) const
 Gets the label color for a classification label.
void SetLabelOpacity (int index, const uint8_t opacity)
 Sets the label opacity for a classification label.
uint8_t GetLabelOpacity (int index) const
 Gets the label opacity for a classification label.
void RemoveLabel (const std::string &label)
 Removes a label from the dataset.
void RemoveLabel (int labelId)
 Removes a label from the dataset.
void SetSegmentationMap (int imageIndex, const eVision::EROIBW16 &segmentationMap)
 Sets the segmentation map of an image. The segmentation map is a 16-bit EROIBW16 image where the value of each pixel is equal to the corresponding segmentation label index (see EDataset::GetSegmentationLabel).
eVision::EImageBW16 GetSegmentationMap (int imageIndex) const
 Gets the segmentation map of an image. The segmentation map is a 16-bit EROIBW16 image where the value of each pixel is equal to the corresponding segmentation label index (see EDataset::GetSegmentationLabel).
void UnsetSegmentation (int imageIndex)
 Unsets the segmentation of an image. After this operation, the image will have no segmentation.
void ResetSegmentation (int imageIndex)
 Resets the segmentation of an image by setting all pixels to background.
void AddRegionToSegment (int imageIndex, int segmentationLabelIndex, const eVision::ERegion &region)
 Adds a region (see ERegion) to the given segment of an image. If, before this call, the image had no segmentation, the pixels not in the given region will be set to the background segmentation label.
void AddRegionToSegment (int imageIndex, const std::string &label, const eVision::ERegion &region)
 Adds a region (see ERegion) to the given segment of an image. If, before this call, the image had no segmentation, the pixels not in the given region will be set to the background segmentation label.
eVision::ERegion GetRegionForSegment (int imageIndex, int segmentationLabelIndex)
 Gets a region corresponding to the pixels of the given segment.
eVision::ERegion GetRegionForSegment (int imageIndex, const std::string &segmentationLabel)
 Gets a region corresponding to the pixels of the given segment.
int GetNumSegmentationLabels () const
 Number of segmentation labels. A dataset has always at least one segmentation label: "background".
int GetNumImagesForSegmentationLabel (int labelId) const
 Number of images containing the given segmentation label.
int GetNumImagesForSegmentationLabel (const std::string &label) const
 Number of images containing the given segmentation label.
uint64_t GetNumPixelsForSegmentationLabel (int labelId) const
 Number of pixels assigned to the given segmentation label.
uint64_t GetNumPixelsForSegmentationLabel (const std::string &label) const
 Number of pixels assigned to the given segmentation label.
bool HasSegmentation (int imageId) const
 Whether the image has a segmentation.
bool HasForegroundSegments (int imageId) const
 Whether the image segmentation contains segments that are not background. If the image has no segmentation, this method throws an exception.
int GetNumSegmentedBlobs (int imageId) const
 Number of segmented blobs in the image for all non-background labels or for a specific label.
int GetNumSegmentedBlobs (int imageId, const std::string &label) const
 Number of segmented blobs in the image for all non-background labels or for a specific label.
int GetNumSegmentedBlobs (int imageId, int labelId) const
 Number of segmented blobs in the image for all non-background labels or for a specific label.
std::string GetSegmentationLabel (int index) const
 Gets the segmentation label.
void SetSegmentationLabel (int index, const std::string &label)
 Sets the segmentation labels.
int AddSegmentationLabel (const std::string &label, float labelWeight)
 Adds a segmentation label. The index of the new segmentation labels is returned by the method.
int AddSegmentationLabel (const std::string &label)
 Adds a segmentation label. The index of the new segmentation labels is returned by the method.
void RemoveSegmentationLabel (const std::string &label)
 Remove a segmentation label.
void RemoveSegmentationLabel (int index)
 Remove a segmentation label.
float GetSegmentationLabelWeight (int index) const
 Gets the segmentation label weights.
float GetSegmentationLabelWeight (const std::string &label) const
 Gets the segmentation label weights.
void SetSegmentationLabelWeight (int index, float weight)
 Sets the segmentation label weight.
void SetSegmentationLabelWeight (const std::string &label, float weight)
 Sets the segmentation label weight.
void SetSegmentationLabelColor (int index, const eVision::ERGBColor &color)
 Sets the label color for a segmentation label.
eVision::ERGBColor GetSegmentationLabelColor (int index) const
 Gets the label color for a segmentation label.
void SetSegmentationLabelOpacity (int index, const uint8_t opacity)
 Sets the label opacity for a segmentation label.
uint8_t GetSegmentationLabelOpacity (int index) const
 Gets the label opacity for a segmentation label.
int GetNumImagesWithSegmentation () const
 Number of images that have a ground truth segmentation.
int GetNumImagesWithoutSegmentation () const
 Number of images that doesn't have a ground truth segmentation.
int GetNumImagesWithoutForegroundSegments () const
 Number of images that have a ground truth segmentation that has no foreground segments and is thus entirely composed of background pixels.
int GetNumImagesWithForegroundSegments () const
 Number of images that have a ground truth segmentation that has foreground segments and is this not entirely composed of background pixels.
void ResetImageObjectLabeling (int imageIndex)
 Resets the object labeling for the specified image. This sets the image as having been labeled for object detection with no object present in the image.
void UnsetImageObjectLabeling (int imageIndex)
 Unsets the object labeling for the specified image. This sets the image as not having been labeled for object detection. This image won't be use for training with a ELocator tool.
std::vector< eVision::EasyDeepLearning::ELocatorObject > GetImageObjects (int imageIndex) const
 Gets all the objects of the specified image.
int GetImageNumObjects (int imageIndex) const
 Number of objects for the specified image.
eVision::EasyDeepLearning::ELocatorObject GetImageObject (int imageIndex, int objectIndex) const
 Gets the specified object for the given image.
void SetImageObject (int imageIndex, int objectIndex, const eVision::EasyDeepLearning::ELocatorObject &obj)
 Sets the specified object for the given image.
void SetImageObject (int imageIndex, int objectIndex, const std::string &label)
 Sets the specified object for the given image.
void SetImageObject (int imageIndex, int objectIndex, const eVision::ERectangleRegion &region)
 Sets the specified object for the given image.
void AddImageObject (int imageIndex, const eVision::EasyDeepLearning::ELocatorObject &obj)
 Adds an object to the image.
void AddImageObject (int imageIndex, const std::string &label, const eVision::ERectangleRegion &box)
 Adds an object to the image.
void RemoveImageObject (int imageIndex, int objectIndex)
 Removes an object from an image.
int GetNumObjectLabels () const
 Number of object labels.
std::string GetObjectLabel (int labelIndex) const
 Object label.
void SetObjectLabel (int labelIndex, const std::string &newLabel)
 Sets an object label.
void SetObjectLabel (const std::string &oldLabel, const std::string &newLabel)
 Sets an object label.
void AddObjectLabel (const std::string &label, float weight)
 Adds an object label.
void AddObjectLabel (const std::string &label)
 Adds an object label.
void RemoveObjectLabel (int labelIndex)
 Removes an object label.
void RemoveObjectLabel (const std::string &label)
 Removes an object label.
void SetObjectLabelWeight (int labelIndex, float weight)
 Sets the weight of an object label.
void SetObjectLabelWeight (const std::string &label, float weight)
 Sets the weight of an object label.
float GetObjectLabelWeight (int labelIndex) const
 Gets the weight of an object label.
float GetObjectLabelWeight (const std::string &label) const
 Gets the weight of an object label.
void SetObjectLabelColor (int index, const eVision::ERGBColor &color)
 Sets the label color for an object label.
eVision::ERGBColor GetObjectLabelColor (int index) const
 Gets the label color for an object label.
void SetObjectLabelOpacity (int index, const uint8_t opacity)
 Sets the label opacity for an object label.
uint8_t GetObjectLabelOpacity (int index) const
 Gets the label opacity for an object label.
bool HasObjectLabeling (int imageIndex) const
 Whether the image is labeled for object detection and use with ELocator.
int GetNumImagesWithObjectLabeling () const
 Number of images in the dataset that are labeled for object detection.
int GetNumImagesWithoutObjectLabeling () const
 Number of images in the dataset that are not labeled for object detection.
int GetNumImagesWithoutObjects () const
 Number of images in the dataset that are labeled for object detection but have been associated with no object.
int GetNumImagesWithObjects () const
 Number of images in the dataset that are labeled for object detection and have 1 or more objects.
int GetNumImagesWithObjectLabel (int labelIdx) const
 Number of images that contain an object with the given label.
int GetNumImagesWithObjectLabel (const std::string &label) const
 Number of images that contain an object with the given label.
uint64_t GetNumObjectsWithLabel (int labelIdx) const
 Number of objects with the given label.
uint64_t GetNumObjectsWithLabel (const std::string &label) const
 Number of objects with the given label.
float GetSameLabelMaxOverlap () const
 Maximum overlap between objects with the same label in the dataset.
float GetAbsoluteMaxOverlap () const
 Absolute maximum overlap between objects in the dataset.
int GetMaxNumObjectPerImage () const
 Maximum number of objects for an image in the dataset. If no images has object labeling (see EDataset::HasObjectLabeling), the method returns -1.
void SetObjectSize (int objectSize)
 Object size for EasyLocate Interest point.
int GetObjectSize () const
 Object size for EasyLocate Interest point.
bool HasOCRAnnotations (int imgId) const
 Whether the specified image has OCR annotations.
void UnsetOCRAnnotations (int imgId)
 Unsets the OCR labeling for the specified image.
std::vector< eVision::EasyDeepOCR::ETextLine > GetOCRAnnotations (int imgId) const
 Ground truth text lines for the specified image.
void SetOCRAnnotations (int imgId, const std::vector< eVision::EasyDeepOCR::ETextLine > &texts)
 Sets the ground truth text lines for the specified image.
int GetNumImagesWithOCR () const
 Number of images with OCR annotations.
int GetNumImagesWithoutOCR () const
 Number of images without OCR annotations.
int GetNumTexts () const
 Number of annotated texts in the dataset.
eVision::EasyDeepLearning::EDataset GetTextDataset () const
 Transforms the current dataset to have only subwindow containing the actual text to read.
eVision::EasyDeepLearning::EDataset GetTextOrientationDataset () const
 Transforms the current text dataset to duplicate it with half image flipped, adding corresponding ground truth.
void SplitDataset (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion, bool random) const
 Splits the dataset in two parts to be used for training and validation respectively.
void SplitDataset (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion) const
 Splits the dataset in two parts to be used for training and validation respectively.
void SplitDataset (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2) const
 Splits the dataset in two parts to be used for training and validation respectively.
void SplitDatasetForSegmentation (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion, bool random) const
 Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
void SplitDatasetForSegmentation (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion) const
 Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
void SplitDatasetForSegmentation (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2) const
 Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
void SplitDatasetForLocator (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion, bool random) const
 Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
void SplitDatasetForLocator (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion) const
 Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
void SplitDatasetForLocator (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2) const
 Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
eVision::EasyDeepLearning::EDatasetSplit GetSplit (float trainingProportion, float validationPropotion, eVision::EasyDeepLearning::EDeepLearningToolType toolType, const std::string &goodLabel) const
 Generates a split.
eVision::EasyDeepLearning::EDatasetSplit GetSplit (float trainingProportion, float validationPropotion, eVision::EasyDeepLearning::EDeepLearningToolType toolType, const std::string &goodLabel, uint32_t seed) const
 Generates a split.
eVision::EasyDeepLearning::EDatasetSplit GetSplit (int numTrainingImages, int numValidationImages, eVision::EasyDeepLearning::EDeepLearningToolType toolType, const std::string &goodLabel) const
 Generates a split.
eVision::EasyDeepLearning::EDatasetSplit GetSplit (int numTrainingImages, int numValidationImages, eVision::EasyDeepLearning::EDeepLearningToolType toolType, const std::string &goodLabel, uint32_t seed) const
 Generates a split.
eVision::EasyDeepLearning::EDataset ExtractSplit (const eVision::EasyDeepLearning::EDatasetSplit &split, eVision::EasyDeepLearning::EDatasetType type) const
 Creates a new EDataset containing only the images of the given split type.
void SetRegionOfInterest (int imageIndex, int xOrg, int yOrg, int width, int height)
 Sets the region of interest for the specified image.
int GetRegionOfInterestOriginX (int imageIndex) const
 Region of interest origin abscissa for the specified image.
int GetRegionOfInterestOriginY (int imageIndex) const
 Region of interest origin ordinate for the specified image.
int GetRegionOfInterestWidth (int imageIndex) const
 Region of interest width for the specified image.
int GetRegionOfInterestHeight (int imageIndex) const
 Region of interest height for the specified image.
eVision::ERegion GetMask (int imageIndex) const
 Gets the mask region/don't care area for the given image. The mask is defined with respect to the region of interest of the image.
void SetMask (int imageIndex, const eVision::ERegion &mask)
 Sets the mask region/don't care area for the given image. The mask is defined with respect to the region of interest of the image.
 EDataset (CppWrapperInternal::InternalConstructor)

Additional Inherited Members

Public Attributes inherited from eVision::EasyDeepLearning::EDataset
CppWrapperInternal::WrappedClass wrappedClass_

Detailed Description

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 unlabeled 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 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 EDataset::GetWidth and EDataset::GetHeight) 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.

License(s): BasicTypes

Deprecated
Deprecated in version 26.10. Scheduled to be removed in version 27.10.

Constructor & Destructor Documentation

◆ EClassificationDataset() [1/4]

eVision::EasyDeepLearning::EClassificationDataset::EClassificationDataset ( )

Constructs a EClassificationDataset object.

◆ EClassificationDataset() [2/4]

eVision::EasyDeepLearning::EClassificationDataset::EClassificationDataset ( const eVision::EasyDeepLearning::EClassificationDataset & other)

Copy constructor of a EClassificationDataset object.

Parameters
otherReference to the EClassificationDataset object that should be copied

◆ EClassificationDataset() [3/4]

eVision::EasyDeepLearning::EClassificationDataset::EClassificationDataset ( const eVision::EasyDeepLearning::EDataset & other)

Copy constructor of a EClassificationDataset object from a EDataset object.

Parameters
otherReference to the EDataset object that should be copied

◆ ~EClassificationDataset()

eVision::EasyDeepLearning::EClassificationDataset::~EClassificationDataset ( )
throw ( )
virtual

◆ EClassificationDataset() [4/4]

eVision::EasyDeepLearning::EClassificationDataset::EClassificationDataset ( CppWrapperInternal::InternalConstructor )

Member Function Documentation

◆ Clear()

void eVision::EasyDeepLearning::EClassificationDataset::Clear ( )
virtual

Clears the dataset.

Reimplemented from eVision::EasyDeepLearning::EDataset.

◆ ExtractSplit()

eVision::EasyDeepLearning::EClassificationDataset eVision::EasyDeepLearning::EClassificationDataset::ExtractSplit ( const eVision::EasyDeepLearning::EDatasetSplit & split,
eVision::EasyDeepLearning::EDatasetType type ) const

Creates a new EClassificationDataset containing only the images of the given split type.

Parameters
splitSplit
typeType of the split to extract

◆ GetEnableDataAugmentation()

bool eVision::EasyDeepLearning::EClassificationDataset::GetEnableDataAugmentation ( ) const

Enable data augmentation.

◆ GetEnableHorizontalFlip()

bool eVision::EasyDeepLearning::EClassificationDataset::GetEnableHorizontalFlip ( ) const

Enable horizontal flipping in data augmentation.

◆ GetEnableVerticalFlip()

bool eVision::EasyDeepLearning::EClassificationDataset::GetEnableVerticalFlip ( ) const

Enable vertical flipping in data augmentation.

◆ GetGaussianNoiseMaximumStandardDeviation()

float eVision::EasyDeepLearning::EClassificationDataset::GetGaussianNoiseMaximumStandardDeviation ( ) const

The Gaussian noise maximum standard deviation.

The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::SetGaussianNoiseMinimumStandardDeviation and EClassificationDataset::SetGaussianNoiseMaximumStandardDeviation (also called the normal distribution).

Its value must be superior or equal to EClassificationDataset::SetGaussianNoiseMinimumStandardDeviation.

This noise is computed before the salt and paper noise.

◆ GetGaussianNoiseMinimumStandardDeviation()

float eVision::EasyDeepLearning::EClassificationDataset::GetGaussianNoiseMinimumStandardDeviation ( ) const

The Gaussian noise minimum standard deviation.

The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::SetGaussianNoiseMinimumStandardDeviation and EClassificationDataset::SetGaussianNoiseMaximumStandardDeviation (also called the normal distribution).

Its value must be between 0 and EClassificationDataset::SetGaussianNoiseMaximumStandardDeviation.

This noise is computed before the salt and paper noise.

◆ GetImageCopyWithDataAugmentation() [1/4]

std::unique_ptr< eVision::EBaseROI > eVision::EasyDeepLearning::EClassificationDataset::GetImageCopyWithDataAugmentation ( int index) const

Generates a new image from the i-th image of the dataset. For the variant where a pointer is returned, the user is responsible for clearing the memory of the returned pointer.

Parameters
indexThe index of the image.

If the data augmentation fails, the method will throw an exception.

◆ GetImageCopyWithDataAugmentation() [2/4]

std::unique_ptr< eVision::EBaseROI > eVision::EasyDeepLearning::EClassificationDataset::GetImageCopyWithDataAugmentation ( int index,
eVision::EasyDeepLearning::EDLDataAugmentationType generationType ) const

Generates a new image from the i-th image of the dataset. For the variant where a pointer is returned, the user is responsible for clearing the memory of the returned pointer.

Parameters
indexThe index of the image.
generationTypeThe type of transformation to generate (default: random).

If the data augmentation fails, the method will throw an exception.

◆ GetImageCopyWithDataAugmentation() [3/4]

void eVision::EasyDeepLearning::EClassificationDataset::GetImageCopyWithDataAugmentation ( int index,
eVision::EBaseROI & img )

Generates a new image from the i-th image of the dataset. For the variant where a pointer is returned, the user is responsible for clearing the memory of the returned pointer.

Parameters
indexThe index of the image.
imgImage object to copy the image into.

If the data augmentation fails, the method will throw an exception.

◆ GetImageCopyWithDataAugmentation() [4/4]

void eVision::EasyDeepLearning::EClassificationDataset::GetImageCopyWithDataAugmentation ( int index,
eVision::EBaseROI & img,
eVision::EasyDeepLearning::EDLDataAugmentationType generationType )

Generates a new image from the i-th image of the dataset. For the variant where a pointer is returned, the user is responsible for clearing the memory of the returned pointer.

Parameters
indexThe index of the image.
imgImage object to copy the image into.
generationTypeThe type of transformation to generate (default: random).

If the data augmentation fails, the method will throw an exception.

◆ GetImages() [1/2]

std::vector< eVision::EBaseROI * > eVision::EasyDeepLearning::EClassificationDataset::GetImages ( ) const

Gets a copy of all images in the dataset. If data augmentation is enabled, the returned images will be augmented versions of the ones in the dataset.

The caller is responsible for clearing the memory allocated for each image.

The method will load images from their given path when necessary.

Deprecated
Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ GetImages() [2/2]

std::vector< eVision::EBaseROI * > eVision::EasyDeepLearning::EClassificationDataset::GetImages ( const std::string & label) const

Gets all the images associated with the given label.

If the parameter is empty, all the images are returned. If data augmentation is enabled, the returned images will be augmented versions of the ones in the dataset.

The caller is responsible for clearing the memory allocated for each image.

Parameters
labelThe label.

The method will load images from their given path when necessary.

Deprecated
Deprecated in version 24.6. Scheduled to be removed in version 27.6.

◆ GetMaxBrightnessOffset()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxBrightnessOffset ( ) const

Maximum absolute brightness offset. Its value must be between 0 and 1.

Brightness transformation is performed by adding a value taken between -EClassificationDataset::SetMaxBrightnessOffset and +EClassificationDataset::SetMaxBrightnessOffset to each pixel of the normalized image.

◆ GetMaxContrastGain()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxContrastGain ( ) const

Maximum contrast gain. Its value must be strictly positive and over EClassificationDataset::SetMinContrastGain.

Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EClassificationDataset::SetMinContrastGain and EClassificationDataset::SetMaxContrastGain. A contrast transformation does not change the overall brightness of an image.

◆ GetMaxGamma()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxGamma ( ) const

Maximum gamma for gamma correction. Its value must be higher than EClassificationDataset::SetMinGamma.

Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EClassificationDataset::SetMinGamma and EClassificationDataset::SetMaxGamma.

◆ GetMaxHorizontalShear()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxHorizontalShear ( ) const

Maximum absolute horizontal shear.

It is represented as an angle from the vertical direction. Its value must be between 0 and 90 degrees.

◆ GetMaxHorizontalShift()

int32_t eVision::EasyDeepLearning::EClassificationDataset::GetMaxHorizontalShift ( ) const

Maximum horizontal shift for data augmentation.

The horizontal shift will be between -EClassificationDataset::SetMaxHorizontalShift and +EClassificationDataset::SetMaxHorizontalShift.

◆ GetMaxHueOffset()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxHueOffset ( ) const

Maximum absolute hue offset. Its value must be between 0 and 180 degrees.

The hue is represented as an angle between 0 and 360 degrees. The hue transformation is performed by rotating the hue of each pixel by a value between -EClassificationDataset::SetMaxHueOffset and +EClassificationDataset::SetMaxHueOffset. This transformation only works for color images.

◆ GetMaxRotationAngle()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxRotationAngle ( ) const

Maximum rotation angle for data augmentation.

The rotation angle will be between -EClassificationDataset::SetMaxRotationAngle and +EClassificationDataset::SetMaxRotationAngle.

◆ GetMaxSaturationGain()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxSaturationGain ( ) const

Maximum saturation gain. Its value must be over or equal to EClassificationDataset::SetMinSaturationGain.

The saturation transformation is performed by multiplying the saturation of each pixel by a value between EClassificationDataset::SetMinSaturationGain and EClassificationDataset::SetMaxSaturationGain.

◆ GetMaxScale()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxScale ( ) const

Maximum scaling allowed for data augmentation.

◆ GetMaxVerticalShear()

float eVision::EasyDeepLearning::EClassificationDataset::GetMaxVerticalShear ( ) const

Maximum absolute vertical shear.

It is represented as an angle from the horizontal direction. Its value must be between 0 and 90 degrees.

◆ GetMaxVerticalShift()

int32_t eVision::EasyDeepLearning::EClassificationDataset::GetMaxVerticalShift ( ) const

Maximum vertical shift for data augmentation.

The vertical shift will be between -EClassificationDataset::SetMaxHorizontalShift and +EClassificationDataset::SetMaxHorizontalShift.

◆ GetMinContrastGain()

float eVision::EasyDeepLearning::EClassificationDataset::GetMinContrastGain ( ) const

Minimum contrast gain. Its value must be strictly positive and below EClassificationDataset::SetMaxContrastGain.

Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EClassificationDataset::SetMinContrastGain and EClassificationDataset::SetMaxContrastGain. A contrast transformation does not change the overall brightness of an image.

◆ GetMinGamma()

float eVision::EasyDeepLearning::EClassificationDataset::GetMinGamma ( ) const

Minimum gamma for gamma correction. Its value must be strictly positive and below EClassificationDataset::SetMaxGamma.

Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EClassificationDataset::SetMinGamma and

◆ GetMinSaturationGain()

float eVision::EasyDeepLearning::EClassificationDataset::GetMinSaturationGain ( ) const

Minimum saturation gain. Its value must be strictly positive.

The saturation transformation is performed by multiplying the saturation of each pixel by a value between EClassificationDataset::SetMinSaturationGain and EClassificationDataset::SetMaxSaturationGain.

◆ GetMinScale()

float eVision::EasyDeepLearning::EClassificationDataset::GetMinScale ( ) const

Minimum scaling allowed for data augmentation.

◆ GetSaltAndPepperNoiseMaximumDensity()

float eVision::EasyDeepLearning::EClassificationDataset::GetSaltAndPepperNoiseMaximumDensity ( ) const

The maximum density of the salt and pepper noise.

The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SetSaltAndPepperNoiseMinimumDensity and EClassificationDataset::SetSaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.

Its value must be between EClassificationDataset::SetSaltAndPepperNoiseMinimumDensity and 1.

This noise is computed after all the other noises.

◆ GetSaltAndPepperNoiseMinimumDensity()

float eVision::EasyDeepLearning::EClassificationDataset::GetSaltAndPepperNoiseMinimumDensity ( ) const

The minimum density of the salt and pepper noise.

The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SetSaltAndPepperNoiseMinimumDensity and EClassificationDataset::SetSaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.

Its value must be between 0 and EClassificationDataset::SetSaltAndPepperNoiseMaximumDensity.

This noise is computed after all the other noises.

◆ GetSpeckleNoiseMaximumStandardDeviation()

float eVision::EasyDeepLearning::EClassificationDataset::GetSpeckleNoiseMaximumStandardDeviation ( ) const

The speckle noise maximum standard deviation.

The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SetSpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SetSpeckleNoiseMaximumStandardDeviation.

Its value must be strictly higher than EClassificationDataset::SetSpeckleNoiseMinimumStandardDeviation.

This noise is computed before the salt and paper noise.

◆ GetSpeckleNoiseMinimumStandardDeviation()

float eVision::EasyDeepLearning::EClassificationDataset::GetSpeckleNoiseMinimumStandardDeviation ( ) const

The speckle noise minimum standard deviation.

The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SetSpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SetSpeckleNoiseMaximumStandardDeviation.

Its value must be strictly positive and lower than EClassificationDataset::SetSpeckleNoiseMaximumStandardDeviation.

This noise is computed before the salt and paper noise.

◆ operator=()

eVision::EasyDeepLearning::EClassificationDataset & eVision::EasyDeepLearning::EClassificationDataset::operator= ( const eVision::EasyDeepLearning::EClassificationDataset & other)

Assignment operator.

Parameters
otherReference to the EClassificationDataset object used for the assignment

◆ SetEnableDataAugmentation()

void eVision::EasyDeepLearning::EClassificationDataset::SetEnableDataAugmentation ( bool enable)

Enable data augmentation.

◆ SetEnableHorizontalFlip()

void eVision::EasyDeepLearning::EClassificationDataset::SetEnableHorizontalFlip ( bool enable)

Enable horizontal flipping in data augmentation.

◆ SetEnableVerticalFlip()

void eVision::EasyDeepLearning::EClassificationDataset::SetEnableVerticalFlip ( bool enable)

Enable vertical flipping in data augmentation.

◆ SetGaussianNoiseMaximumStandardDeviation()

void eVision::EasyDeepLearning::EClassificationDataset::SetGaussianNoiseMaximumStandardDeviation ( float gaussianMaximumDeviation)

The Gaussian noise maximum standard deviation.

The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::SetGaussianNoiseMinimumStandardDeviation and EClassificationDataset::SetGaussianNoiseMaximumStandardDeviation (also called the normal distribution).

Its value must be superior or equal to EClassificationDataset::SetGaussianNoiseMinimumStandardDeviation.

Parameters
gaussianMaximumDeviationThe maximum standard deviation of the gaussian distribution expressed in percentage of the image type max intensity

This noise is computed before the salt and paper noise.

◆ SetGaussianNoiseMinimumStandardDeviation()

void eVision::EasyDeepLearning::EClassificationDataset::SetGaussianNoiseMinimumStandardDeviation ( float gaussianMinimumDeviation)

The Gaussian noise minimum standard deviation.

The Gaussian noise is an additive noise sampled from a Gaussian distribution of deviation between EClassificationDataset::SetGaussianNoiseMinimumStandardDeviation and EClassificationDataset::SetGaussianNoiseMaximumStandardDeviation (also called the normal distribution).

Its value must be between 0 and EClassificationDataset::SetGaussianNoiseMaximumStandardDeviation.

Parameters
gaussianMinimumDeviationThe minimum standard deviation of the gaussian distribution expressed in percentage of the image type max intensity

This noise is computed before the salt and paper noise.

◆ SetMaxBrightnessOffset()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxBrightnessOffset ( float offset)

Maximum absolute brightness offset. Its value must be between 0 and 1.

Brightness transformation is performed by adding a value taken between -EClassificationDataset::SetMaxBrightnessOffset and +EClassificationDataset::SetMaxBrightnessOffset to each pixel of the normalized image.

◆ SetMaxContrastGain()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxContrastGain ( float val)

Maximum contrast gain. Its value must be strictly positive and over EClassificationDataset::SetMinContrastGain.

Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EClassificationDataset::SetMinContrastGain and EClassificationDataset::SetMaxContrastGain. A contrast transformation does not change the overall brightness of an image.

◆ SetMaxGamma()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxGamma ( float gamma)

Maximum gamma for gamma correction. Its value must be higher than EClassificationDataset::SetMinGamma.

Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EClassificationDataset::SetMinGamma and EClassificationDataset::SetMaxGamma.

◆ SetMaxHorizontalShear()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxHorizontalShear ( float hShear)

Maximum absolute horizontal shear.

It is represented as an angle from the vertical direction. Its value must be between 0 and 90 degrees.

◆ SetMaxHorizontalShift()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxHorizontalShift ( int32_t maxShift)

Maximum horizontal shift for data augmentation.

The horizontal shift will be between -EClassificationDataset::SetMaxHorizontalShift and +EClassificationDataset::SetMaxHorizontalShift.

◆ SetMaxHueOffset()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxHueOffset ( float hueOffset)

Maximum absolute hue offset. Its value must be between 0 and 180 degrees.

The hue is represented as an angle between 0 and 360 degrees. The hue transformation is performed by rotating the hue of each pixel by a value between -EClassificationDataset::SetMaxHueOffset and +EClassificationDataset::SetMaxHueOffset. This transformation only works for color images.

◆ SetMaxRotationAngle()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxRotationAngle ( float maxAngle)

Maximum rotation angle for data augmentation.

The rotation angle will be between -EClassificationDataset::SetMaxRotationAngle and +EClassificationDataset::SetMaxRotationAngle.

◆ SetMaxSaturationGain()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxSaturationGain ( float saturationGain)

Maximum saturation gain. Its value must be over or equal to EClassificationDataset::SetMinSaturationGain.

The saturation transformation is performed by multiplying the saturation of each pixel by a value between EClassificationDataset::SetMinSaturationGain and EClassificationDataset::SetMaxSaturationGain.

◆ SetMaxScale()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxScale ( float maxScale)

Maximum scaling allowed for data augmentation.

◆ SetMaxVerticalShear()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxVerticalShear ( float vShear)

Maximum absolute vertical shear.

It is represented as an angle from the horizontal direction. Its value must be between 0 and 90 degrees.

◆ SetMaxVerticalShift()

void eVision::EasyDeepLearning::EClassificationDataset::SetMaxVerticalShift ( int32_t maxShift)

Maximum vertical shift for data augmentation.

The vertical shift will be between -EClassificationDataset::SetMaxHorizontalShift and +EClassificationDataset::SetMaxHorizontalShift.

◆ SetMinContrastGain()

void eVision::EasyDeepLearning::EClassificationDataset::SetMinContrastGain ( float val)

Minimum contrast gain. Its value must be strictly positive and below EClassificationDataset::SetMaxContrastGain.

Contrast transformation is performed by multiplying each mean-centered pixel value by a gain value taken between EClassificationDataset::SetMinContrastGain and EClassificationDataset::SetMaxContrastGain. A contrast transformation does not change the overall brightness of an image.

◆ SetMinGamma()

void eVision::EasyDeepLearning::EClassificationDataset::SetMinGamma ( float gamma)

Minimum gamma for gamma correction. Its value must be strictly positive and below EClassificationDataset::SetMaxGamma.

Gamma correction transformation is performed by raising each normalized pixel value to the power of gamma with gamma taken between EClassificationDataset::SetMinGamma and

◆ SetMinSaturationGain()

void eVision::EasyDeepLearning::EClassificationDataset::SetMinSaturationGain ( float saturationGain)

Minimum saturation gain. Its value must be strictly positive.

The saturation transformation is performed by multiplying the saturation of each pixel by a value between EClassificationDataset::SetMinSaturationGain and EClassificationDataset::SetMaxSaturationGain.

◆ SetMinScale()

void eVision::EasyDeepLearning::EClassificationDataset::SetMinScale ( float minScale)

Minimum scaling allowed for data augmentation.

◆ SetSaltAndPepperNoiseMaximumDensity()

void eVision::EasyDeepLearning::EClassificationDataset::SetSaltAndPepperNoiseMaximumDensity ( float saltAndPepperMaximumDensity)

The maximum density of the salt and pepper noise.

The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SetSaltAndPepperNoiseMinimumDensity and EClassificationDataset::SetSaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.

Its value must be between EClassificationDataset::SetSaltAndPepperNoiseMinimumDensity and 1.

Parameters
saltAndPepperMaximumDensityThe maximum density of the salt and pepper noise expressed in percentage of the total number of pixels of the image

This noise is computed after all the other noises.

◆ SetSaltAndPepperNoiseMinimumDensity()

void eVision::EasyDeepLearning::EClassificationDataset::SetSaltAndPepperNoiseMinimumDensity ( float saltAndPepperMinimumDensity)

The minimum density of the salt and pepper noise.

The salt and pepper noise sets the value of a number of randomly selected (between EClassificationDataset::SetSaltAndPepperNoiseMinimumDensity and EClassificationDataset::SetSaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.

Its value must be between 0 and EClassificationDataset::SetSaltAndPepperNoiseMaximumDensity.

Parameters
saltAndPepperMinimumDensityThe minimum density of the salt and pepper noise expressed in percentage of the total number of pixels of the image

This noise is computed after all the other noises.

◆ SetSpeckleNoiseMaximumStandardDeviation()

void eVision::EasyDeepLearning::EClassificationDataset::SetSpeckleNoiseMaximumStandardDeviation ( float speckleMaximumDeviation)

The speckle noise maximum standard deviation.

The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SetSpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SetSpeckleNoiseMaximumStandardDeviation.

Its value must be strictly higher than EClassificationDataset::SetSpeckleNoiseMinimumStandardDeviation.

Parameters
speckleMaximumDeviationThe standard maximum deviation of the gamma distribution

This noise is computed before the salt and paper noise.

◆ SetSpeckleNoiseMinimumStandardDeviation()

void eVision::EasyDeepLearning::EClassificationDataset::SetSpeckleNoiseMinimumStandardDeviation ( float speckleMinimumDeviation)

The speckle noise minimum standard deviation.

The speckle noise is a multiplicative noise sampled from a Gamma distribution with a mean of 1 and with its standard deviation between EClassificationDataset::SetSpeckleNoiseMinimumStandardDeviation and EClassificationDataset::SetSpeckleNoiseMaximumStandardDeviation.

Its value must be strictly positive and lower than EClassificationDataset::SetSpeckleNoiseMaximumStandardDeviation.

Parameters
speckleMinimumDeviationThe standard minimum deviation of the gamma distribution

This noise is computed before the salt and paper noise.

◆ SplitDataset() [1/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDataset ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2 ) const

Splits the dataset in two parts to be used for training and validation respectively.

Parameters
d1First part of the dataset
d2Second part of the dataset

◆ SplitDataset() [2/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDataset ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2,
float proportion ) const

Splits the dataset in two parts to be used for training and validation respectively.

Parameters
d1First part of the dataset
d2Second part of the dataset
proportionProportion of image of each class to put into the first part. The remaining images are put in d2

◆ SplitDataset() [3/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDataset ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2,
float proportion,
bool random ) const

Splits the dataset in two parts to be used for training and validation respectively.

Parameters
d1First part of the dataset
d2Second part of the dataset
proportionProportion of image of each class to put into the first part. The remaining images are put in d2
randomRandomly sample the images.

◆ SplitDatasetForLocator() [1/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDatasetForLocator ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2 ) const

Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.

Parameters
d1First part of the dataset
d2Second part of the dataset

The method ensures that all the object labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.

◆ SplitDatasetForLocator() [2/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDatasetForLocator ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2,
float proportion ) const

Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.

Parameters
d1First part of the dataset
d2Second part of the dataset
proportionProportion of image of each class to put into the first part. The remaining images are put in d2

The method ensures that all the object labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.

◆ SplitDatasetForLocator() [3/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDatasetForLocator ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2,
float proportion,
bool random ) const

Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.

Parameters
d1First part of the dataset
d2Second part of the dataset
proportionProportion of image of each class to put into the first part. The remaining images are put in d2
randomRandomly sample the images.

The method ensures that all the object labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.

◆ SplitDatasetForSegmentation() [1/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDatasetForSegmentation ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2 ) const

Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.

Parameters
d1First part of the dataset
d2Second part of the dataset

The method ensures that all the segmentation labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.

◆ SplitDatasetForSegmentation() [2/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDatasetForSegmentation ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2,
float proportion ) const

Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.

Parameters
d1First part of the dataset
d2Second part of the dataset
proportionProportion of image of each class to put into the first part. The remaining images are put in d2

The method ensures that all the segmentation labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.

◆ SplitDatasetForSegmentation() [3/3]

void eVision::EasyDeepLearning::EClassificationDataset::SplitDatasetForSegmentation ( eVision::EasyDeepLearning::EClassificationDataset & d1,
eVision::EasyDeepLearning::EClassificationDataset & d2,
float proportion,
bool random ) const

Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.

Parameters
d1First part of the dataset
d2Second part of the dataset
proportionProportion of image of each class to put into the first part. The remaining images are put in d2
randomRandomly sample the images.

The method ensures that all the segmentation labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.