eVision .NET API
Loading...
Searching...
No Matches
eVision.EasyDeepLearning.EClassificationDataset Class Reference

EClassificationDataset manages a dataset of images. More...

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

Public Member Functions

 EClassificationDataset ()
 Constructs a EClassificationDataset object.
 EClassificationDataset (eVision.EasyDeepLearning.EClassificationDataset other)
 Copy constructor of a EClassificationDataset object.
 EClassificationDataset (eVision.EasyDeepLearning.EDataset other)
 Copy constructor of a EClassificationDataset object from a EDataset object.
override void Clear ()
 Clears the dataset.
eVision.EBaseROI[] GetImages ()
 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.
eVision.EBaseROI[] GetImages (string label)
 Gets all the images associated with the given label.
eVision.EBaseROI GetImageCopyWithDataAugmentation (int index, 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.
eVision.EBaseROI GetImageCopyWithDataAugmentation (int index)
 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 SplitDataset (eVision.EasyDeepLearning.EClassificationDataset d1, eVision.EasyDeepLearning.EClassificationDataset d2, float proportion, bool random)
 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)
 Splits the dataset in two parts to be used for training and validation respectively.
void SplitDataset (eVision.EasyDeepLearning.EClassificationDataset d1, eVision.EasyDeepLearning.EClassificationDataset d2)
 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)
 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)
 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)
 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)
 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)
 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)
 Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
new eVision.EasyDeepLearning.EClassificationDataset ExtractSplit (eVision.EasyDeepLearning.EDatasetSplit split, eVision.EasyDeepLearning.EDatasetType type)
 Creates a new EClassificationDataset containing only the images of the given split type.
Public Member Functions inherited from eVision.EasyDeepLearning.EDataset
 EDataset ()
 Constructs a EDataset object.
 EDataset (eVision.EasyDeepLearning.EDataset other)
 Copy constructor of a EDataset object.
void Load (string path)
 Loads a classification dataset from disk.
void Load (eVision.ESerializer serializer)
 Loads a classification dataset from disk.
void Save (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 (string path)
 Saves the dataset with image paths relative to the directory in which the dataset file is saved.
void Export (string directory, eVision.EImageFileType fileType, int quality)
 Exports the dataset and its images to the given directory.
void Export (string directory, eVision.EImageFileType fileType)
 Exports the dataset and its images to the given directory.
void Export (string directory)
 Exports the dataset and its images to the given directory.
void Export (string directory, bool keepFilename, eVision.EImageFileType fileType, int quality)
 Exports the dataset and its images to the given directory.
void Export (string directory, bool keepFilename, eVision.EImageFileType fileType)
 Exports the dataset and its images to the given directory.
void Export (string directory, bool keepFilename)
 Exports the dataset and its images to the given directory.
void Export (string directory, int width, int height, int channels, eVision.EImageFileType fileType, int quality)
 Exports the dataset and its images to the given directory.
void Export (string directory, int width, int height, int channels, eVision.EImageFileType fileType)
 Exports the dataset and its images to the given directory.
void Export (string directory, int width, int height, int channels)
 Exports the dataset and its images to the given directory.
void Export (string directory, int width, int height, int channels, bool keepFilename, eVision.EImageFileType fileType, int quality)
 Exports the dataset and its images to the given directory.
void Export (string directory, int width, int height, int channels, bool keepFilename, eVision.EImageFileType fileType)
 Exports the dataset and its images to the given directory.
void Export (string directory, int width, int height, int channels, bool keepFilename)
 Exports the dataset and its images to the given directory.
eVision.EasyDeepLearning.EImageAnnotationFormat GetAvailableImageAnnotationFormat (string imageFile)
 Image annotation file formats that are available next to the image file.
eVision.EasyDeepLearning.EImageAnnotationFormat GetAvailableImageAnnotationFormat (int imgId)
 Image annotation file formats that are available next to the image file.
void ImportYOLOTXTAnnotations (int imgId, string labelFile)
 Imports YOLO TXT annotations (for EasyLocate Bounding Box).
void ImportYOLOTXTAnnotations (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 (string imagePath)
 Adds an image to the dataset.
int AddImage (string imagePath, string label)
 Adds an image to the dataset.
int AddImage (string imagePath, int originX, int originY, int width, int height, eVision.ERegion mask)
 Adds an image to the dataset.
int AddImage (string imagePath, int originX, int originY, int width, int height, eVision.ERegion mask, string label)
 Adds an image to the dataset.
int AddImage (eVision.EBaseROI img)
 Adds an image to the dataset.
int AddImage (eVision.EBaseROI img, string label)
 Adds an image to the dataset.
int AddImage (eVision.EBaseROI img, int originX, int originY, int width, int height, eVision.ERegion mask)
 Adds an image to the dataset.
int AddImage (eVision.EBaseROI img, int originX, int originY, int width, int height, eVision.ERegion mask, string label)
 Adds an image to the dataset.
int AddImages (string filter)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImages (string filter, string label)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImages (string filter, int originX, int originY, int width, int height, eVision.ERegion mask)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImages (string filter, int originX, int originY, int width, int height, eVision.ERegion mask, string label)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImagesFromCSV (string csvFile, int imageColumn, int labelColumn, int skipLines, 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 (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 (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 (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 (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 GetNumImagesForFile (string filePath)
 Get the number of images in the dataset that are associated with the given image file.
eVision.EBaseROI GetImageCopy (int index)
 Gets a copy of the i-th image of the dataset.
void GetImageCopy (int index, eVision.EBaseROI img)
 Gets a copy of the i-th image of the dataset.
string GetImagePath (int index)
 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)
 Whether the image is stored as a file path towards an image.
bool IsEmbeddedImage (int index)
 Whether the image is embedded into the dataset and is not a reference towards an image file.
string GetImageLabel (int index)
 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, string label)
 Sets the label of images in the dataset.
void SetImageLabel (string filter, 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)
 Whether an image has a classification label.
uint[] GetImagesIndexesWithLabel (string label)
 Gets a list of index corresponding to the images associated with the given label.
uint[] GetImagesIndexesWithLabel (int labelIndex)
 Gets a list of index corresponding to the images associated with the given label.
void AddLabel (string label)
 Adds a label to the dataset.
string GetLabel (int i)
 Gets the i-th label of the dataset (starting from 0 to EDataset.NumLabels - 1).
void SetLabel (int index, string label)
 Sets the i-th label of the dataset (starting from 0 to EDataset.NumLabels - 1). This operation does not add a new label to the dataset but simply renames an existing label.
float GetLabelWeight (int index)
 Gets the weight associated to the i-th label of the dataset (starting from 0 to EDataset.NumLabels - 1).
void SetLabelWeight (int index, float weight)
 Sets the weight associated to the i-th label of the dataset (starting from 0 to EDataset.NumLabels - 1). This operation does not add a new label.
void SetLabelColor (int index, eVision.ERGBColor color)
 Sets the label color for a classification label.
eVision.ERGBColor GetLabelColor (int index)
 Gets the label color for a classification label.
void SetLabelOpacity (int index, byte opacity)
 Sets the label opacity for a classification label.
byte GetLabelOpacity (int index)
 Gets the label opacity for a classification label.
void RemoveLabel (string label)
 Removes a label from the dataset.
void RemoveLabel (int labelId)
 Removes a label from the dataset.
void SetSegmentationMap (int imageIndex, 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)
 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, 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, string label, 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, string segmentationLabel)
 Gets a region corresponding to the pixels of the given segment.
int GetNumImagesForSegmentationLabel (int labelId)
 Number of images containing the given segmentation label.
int GetNumImagesForSegmentationLabel (string label)
 Number of images containing the given segmentation label.
ulong GetNumPixelsForSegmentationLabel (int labelId)
 Number of pixels assigned to the given segmentation label.
ulong GetNumPixelsForSegmentationLabel (string label)
 Number of pixels assigned to the given segmentation label.
bool HasSegmentation (int imageId)
 Whether the image has a segmentation.
bool HasForegroundSegments (int imageId)
 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)
 Number of segmented blobs in the image for all non-background labels or for a specific label.
int GetNumSegmentedBlobs (int imageId, string label)
 Number of segmented blobs in the image for all non-background labels or for a specific label.
int GetNumSegmentedBlobs (int imageId, int labelId)
 Number of segmented blobs in the image for all non-background labels or for a specific label.
string GetSegmentationLabel (int index)
 Gets the segmentation label.
void SetSegmentationLabel (int index, string label)
 Sets the segmentation labels.
int AddSegmentationLabel (string label, float labelWeight)
 Adds a segmentation label. The index of the new segmentation labels is returned by the method.
int AddSegmentationLabel (string label)
 Adds a segmentation label. The index of the new segmentation labels is returned by the method.
void RemoveSegmentationLabel (string label)
 Remove a segmentation label.
void RemoveSegmentationLabel (int index)
 Remove a segmentation label.
float GetSegmentationLabelWeight (int index)
 Gets the segmentation label weights.
float GetSegmentationLabelWeight (string label)
 Gets the segmentation label weights.
void SetSegmentationLabelWeight (int index, float weight)
 Sets the segmentation label weight.
void SetSegmentationLabelWeight (string label, float weight)
 Sets the segmentation label weight.
void SetSegmentationLabelColor (int index, eVision.ERGBColor color)
 Sets the label color for a segmentation label.
eVision.ERGBColor GetSegmentationLabelColor (int index)
 Gets the label color for a segmentation label.
void SetSegmentationLabelOpacity (int index, byte opacity)
 Sets the label opacity for a segmentation label.
byte GetSegmentationLabelOpacity (int index)
 Gets the label opacity for a segmentation label.
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.
eVision.EasyDeepLearning.ELocatorObject[] GetImageObjects (int imageIndex)
 Gets all the objects of the specified image.
int GetImageNumObjects (int imageIndex)
 Number of objects for the specified image.
eVision.EasyDeepLearning.ELocatorObject GetImageObject (int imageIndex, int objectIndex)
 Gets the specified object for the given image.
void SetImageObject (int imageIndex, int objectIndex, eVision.EasyDeepLearning.ELocatorObject obj)
 Sets the specified object for the given image.
void SetImageObject (int imageIndex, int objectIndex, string label)
 Sets the specified object for the given image.
void SetImageObject (int imageIndex, int objectIndex, eVision.ERectangleRegion region)
 Sets the specified object for the given image.
void AddImageObject (int imageIndex, eVision.EasyDeepLearning.ELocatorObject obj)
 Adds an object to the image.
void AddImageObject (int imageIndex, string label, eVision.ERectangleRegion box)
 Adds an object to the image.
void RemoveImageObject (int imageIndex, int objectIndex)
 Removes an object from an image.
string GetObjectLabel (int labelIndex)
 Object label.
void SetObjectLabel (int labelIndex, string newLabel)
 Sets an object label.
void SetObjectLabel (string oldLabel, string newLabel)
 Sets an object label.
void AddObjectLabel (string label, float weight)
 Adds an object label.
void AddObjectLabel (string label)
 Adds an object label.
void RemoveObjectLabel (int labelIndex)
 Removes an object label.
void RemoveObjectLabel (string label)
 Removes an object label.
void SetObjectLabelWeight (int labelIndex, float weight)
 Sets the weight of an object label.
void SetObjectLabelWeight (string label, float weight)
 Sets the weight of an object label.
float GetObjectLabelWeight (int labelIndex)
 Gets the weight of an object label.
float GetObjectLabelWeight (string label)
 Gets the weight of an object label.
void SetObjectLabelColor (int index, eVision.ERGBColor color)
 Sets the label color for an object label.
eVision.ERGBColor GetObjectLabelColor (int index)
 Gets the label color for an object label.
void SetObjectLabelOpacity (int index, byte opacity)
 Sets the label opacity for an object label.
byte GetObjectLabelOpacity (int index)
 Gets the label opacity for an object label.
bool HasObjectLabeling (int imageIndex)
 Whether the image is labeled for object detection and use with ELocator.
int GetNumImagesWithObjectLabel (int labelIdx)
 Number of images that contain an object with the given label.
int GetNumImagesWithObjectLabel (string label)
 Number of images that contain an object with the given label.
ulong GetNumObjectsWithLabel (int labelIdx)
 Number of objects with the given label.
ulong GetNumObjectsWithLabel (string label)
 Number of objects with the given label.
bool HasOCRAnnotations (int imgId)
 Whether the specified image has OCR annotations.
void UnsetOCRAnnotations (int imgId)
 Unsets the OCR labeling for the specified image.
eVision.EasyDeepOCR.ETextLine[] GetOCRAnnotations (int imgId)
 Ground truth text lines for the specified image.
void SetOCRAnnotations (int imgId, eVision.EasyDeepOCR.ETextLine[] texts)
 Sets the ground truth text lines for the specified image.
void SplitDataset (eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2, float proportion, bool random)
 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)
 Splits the dataset in two parts to be used for training and validation respectively.
void SplitDataset (eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2)
 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)
 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)
 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)
 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)
 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)
 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)
 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, string goodLabel)
 Generates a split.
eVision.EasyDeepLearning.EDatasetSplit GetSplit (float trainingProportion, float validationPropotion, eVision.EasyDeepLearning.EDeepLearningToolType toolType, string goodLabel, uint seed)
 Generates a split.
eVision.EasyDeepLearning.EDatasetSplit GetSplit (int numTrainingImages, int numValidationImages, eVision.EasyDeepLearning.EDeepLearningToolType toolType, string goodLabel)
 Generates a split.
eVision.EasyDeepLearning.EDatasetSplit GetSplit (int numTrainingImages, int numValidationImages, eVision.EasyDeepLearning.EDeepLearningToolType toolType, string goodLabel, uint seed)
 Generates a split.
eVision.EasyDeepLearning.EDataset ExtractSplit (eVision.EasyDeepLearning.EDatasetSplit split, eVision.EasyDeepLearning.EDatasetType type)
 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)
 Region of interest origin abscissa for the specified image.
int GetRegionOfInterestOriginY (int imageIndex)
 Region of interest origin ordinate for the specified image.
int GetRegionOfInterestWidth (int imageIndex)
 Region of interest width for the specified image.
int GetRegionOfInterestHeight (int imageIndex)
 Region of interest height for the specified image.
eVision.ERegion GetMask (int imageIndex)
 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, 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.

Properties

bool EnableDataAugmentation [get, set]
 Enable data augmentation.
int MaxHorizontalShift [get, set]
 Maximum horizontal shift for data augmentation.
int MaxVerticalShift [get, set]
 Maximum vertical shift for data augmentation.
float MaxRotationAngle [get, set]
 Maximum rotation angle for data augmentation.
bool EnableVerticalFlip [get, set]
 Enable vertical flipping in data augmentation.
bool EnableHorizontalFlip [get, set]
 Enable horizontal flipping in data augmentation.
float MinScale [get, set]
 Minimum scaling allowed for data augmentation.
float MaxScale [get, set]
 Maximum scaling allowed for data augmentation.
float MaxHorizontalShear [get, set]
 Maximum absolute horizontal shear.
float MaxVerticalShear [get, set]
 Maximum absolute vertical shear.
float MaxBrightnessOffset [get, set]
 Maximum absolute brightness offset. Its value must be between 0 and 1.
float MaxContrastGain [get, set]
 Maximum contrast gain. Its value must be strictly positive and over EClassificationDataset.MinContrastGain.
float MinContrastGain [get, set]
 Minimum contrast gain. Its value must be strictly positive and below EClassificationDataset.MaxContrastGain.
float MinGamma [get, set]
 Minimum gamma for gamma correction. Its value must be strictly positive and below EClassificationDataset.MaxGamma.
float MaxGamma [get, set]
 Maximum gamma for gamma correction. Its value must be higher than EClassificationDataset.MinGamma.
float MaxHueOffset [get, set]
 Maximum absolute hue offset. Its value must be between 0 and 180 degrees.
float MinSaturationGain [get, set]
 Minimum saturation gain. Its value must be strictly positive.
float MaxSaturationGain [get, set]
 Maximum saturation gain. Its value must be over or equal to EClassificationDataset.MinSaturationGain.
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.
Properties inherited from eVision.EasyDeepLearning.EDataset
string BasePath [set]
 Sets the base path for the images specified with a relative path.
uint Width [get]
 Width of the region of interest of the first image added to the dataset.
uint Height [get]
 Height of the region of interest of the first image added to the dataset.
uint Channels [get]
 Number of channels of the first image added to the dataset.
int NumImages [get]
 Number of images in the dataset.
int NumImageFiles [get]
 Number of different image files contained in the dataset.
int NumLabeledImages [get]
 Number of images that have a classification label.
int NumUnlabeledImages [get]
 Number of images that doesn't have any classification label.
int[] LabeledImagesIndexes [get]
 Gets a list of index corresponding to the images that have a classification label.
int[] TextLabeledImagesIndexes [get]
 Gets a list of index corresponding to the images that have a text only label.
int[] ImagesIndexesWithNoLabel [get]
 Gets a list of index corresponding to the images with no classification labels.
int NumLabels [get]
 Number of labels in the dataset.
int NumSegmentationLabels [get]
 Number of segmentation labels. A dataset has always at least one segmentation label: "background".
int NumImagesWithSegmentation [get]
 Number of images that have a ground truth segmentation.
int NumImagesWithoutSegmentation [get]
 Number of images that doesn't have a ground truth segmentation.
int NumImagesWithoutForegroundSegments [get]
 Number of images that have a ground truth segmentation that has no foreground segments and is thus entirely composed of background pixels.
int NumImagesWithForegroundSegments [get]
 Number of images that have a ground truth segmentation that has foreground segments and is this not entirely composed of background pixels.
int NumObjectLabels [get]
 Number of object labels.
int NumImagesWithObjectLabeling [get]
 Number of images in the dataset that are labeled for object detection.
int NumImagesWithoutObjectLabeling [get]
 Number of images in the dataset that are not labeled for object detection.
int NumImagesWithoutObjects [get]
 Number of images in the dataset that are labeled for object detection but have been associated with no object.
int NumImagesWithObjects [get]
 Number of images in the dataset that are labeled for object detection and have 1 or more objects.
float SameLabelMaxOverlap [get]
 Maximum overlap between objects with the same label in the dataset.
float AbsoluteMaxOverlap [get]
 Absolute maximum overlap between objects in the dataset.
int MaxNumObjectPerImage [get]
 Maximum number of objects for an image in the dataset. If no images has object labeling (see EDataset.HasObjectLabeling), the method returns -1.
int ObjectSize [get, set]
 Object size for EasyLocate Interest point.
int NumImagesWithOCR [get]
 Number of images with OCR annotations.
int NumImagesWithoutOCR [get]
 Number of images without OCR annotations.
int NumTexts [get]
 Number of annotated texts in the dataset.
eVision.EasyDeepLearning.EDataset TextDataset [get]
 Transforms the current dataset to have only subwindow containing the actual text to read.
eVision.EasyDeepLearning.EDataset TextOrientationDataset [get]
 Transforms the current text dataset to duplicate it with half image flipped, adding corresponding ground truth.

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.Width and EDataset.Height) 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/3]

eVision.EasyDeepLearning.EClassificationDataset.EClassificationDataset ( )

Constructs a EClassificationDataset object.

◆ EClassificationDataset() [2/3]

eVision.EasyDeepLearning.EClassificationDataset.EClassificationDataset ( eVision.EasyDeepLearning.EClassificationDataset other)

Copy constructor of a EClassificationDataset object.

Parameters
otherReference to the EClassificationDataset object that should be copied

◆ EClassificationDataset() [3/3]

eVision.EasyDeepLearning.EClassificationDataset.EClassificationDataset ( eVision.EasyDeepLearning.EDataset other)

Copy constructor of a EClassificationDataset object from a EDataset object.

Parameters
otherReference to the EDataset object that should be copied

Member Function Documentation

◆ Clear()

override void eVision.EasyDeepLearning.EClassificationDataset.Clear ( )
virtual

Clears the dataset.

Reimplemented from eVision.EasyDeepLearning.EDataset.

◆ ExtractSplit()

new eVision.EasyDeepLearning.EClassificationDataset eVision.EasyDeepLearning.EClassificationDataset.ExtractSplit ( eVision.EasyDeepLearning.EDatasetSplit split,
eVision.EasyDeepLearning.EDatasetType type )

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

Parameters
splitSplit
typeType of the split to extract

◆ GetImageCopyWithDataAugmentation() [1/4]

eVision.EBaseROI eVision.EasyDeepLearning.EClassificationDataset.GetImageCopyWithDataAugmentation ( int index)

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]

eVision.EBaseROI eVision.EasyDeepLearning.EClassificationDataset.GetImageCopyWithDataAugmentation ( int index,
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.
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]

eVision.EBaseROI[] eVision.EasyDeepLearning.EClassificationDataset.GetImages ( )

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]

eVision.EBaseROI[] eVision.EasyDeepLearning.EClassificationDataset.GetImages ( string label)

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.

◆ SplitDataset() [1/3]

void eVision.EasyDeepLearning.EClassificationDataset.SplitDataset ( eVision.EasyDeepLearning.EClassificationDataset d1,
eVision.EasyDeepLearning.EClassificationDataset d2 )

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 )

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 )

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 )

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 )

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 )

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 )

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 )

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 )

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.

Property Documentation

◆ EnableDataAugmentation

bool eVision.EasyDeepLearning.EClassificationDataset.EnableDataAugmentation
getset

Enable data augmentation.

◆ EnableHorizontalFlip

bool eVision.EasyDeepLearning.EClassificationDataset.EnableHorizontalFlip
getset

Enable horizontal flipping in data augmentation.

◆ EnableVerticalFlip

bool eVision.EasyDeepLearning.EClassificationDataset.EnableVerticalFlip
getset

Enable vertical flipping in data augmentation.

◆ GaussianNoiseMaximumStandardDeviation

float eVision.EasyDeepLearning.EClassificationDataset.GaussianNoiseMaximumStandardDeviation
getset

The Gaussian noise maximum standard deviation.

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 EClassificationDataset.GaussianNoiseMinimumStandardDeviation.

This noise is computed before the salt and paper noise.

◆ GaussianNoiseMinimumStandardDeviation

float eVision.EasyDeepLearning.EClassificationDataset.GaussianNoiseMinimumStandardDeviation
getset

The Gaussian noise minimum standard deviation.

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 between 0 and EClassificationDataset.GaussianNoiseMaximumStandardDeviation.

This noise is computed before the salt and paper noise.

◆ MaxBrightnessOffset

float eVision.EasyDeepLearning.EClassificationDataset.MaxBrightnessOffset
getset

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

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

◆ MaxContrastGain

float eVision.EasyDeepLearning.EClassificationDataset.MaxContrastGain
getset

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

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

◆ MaxGamma

float eVision.EasyDeepLearning.EClassificationDataset.MaxGamma
getset

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

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

◆ MaxHorizontalShear

float eVision.EasyDeepLearning.EClassificationDataset.MaxHorizontalShear
getset

Maximum absolute horizontal shear.

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

◆ MaxHorizontalShift

int eVision.EasyDeepLearning.EClassificationDataset.MaxHorizontalShift
getset

Maximum horizontal shift for data augmentation.

The horizontal shift will be between -EClassificationDataset.MaxHorizontalShift and +EClassificationDataset.MaxHorizontalShift.

◆ MaxHueOffset

float eVision.EasyDeepLearning.EClassificationDataset.MaxHueOffset
getset

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.MaxHueOffset and +EClassificationDataset.MaxHueOffset. This transformation only works for color images.

◆ MaxRotationAngle

float eVision.EasyDeepLearning.EClassificationDataset.MaxRotationAngle
getset

Maximum rotation angle for data augmentation.

The rotation angle will be between -EClassificationDataset.MaxRotationAngle and +EClassificationDataset.MaxRotationAngle.

◆ MaxSaturationGain

float eVision.EasyDeepLearning.EClassificationDataset.MaxSaturationGain
getset

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

The saturation transformation is performed by multiplying the saturation of each pixel by a value between EClassificationDataset.MinSaturationGain and EClassificationDataset.MaxSaturationGain.

◆ MaxScale

float eVision.EasyDeepLearning.EClassificationDataset.MaxScale
getset

Maximum scaling allowed for data augmentation.

◆ MaxVerticalShear

float eVision.EasyDeepLearning.EClassificationDataset.MaxVerticalShear
getset

Maximum absolute vertical shear.

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

◆ MaxVerticalShift

int eVision.EasyDeepLearning.EClassificationDataset.MaxVerticalShift
getset

Maximum vertical shift for data augmentation.

The vertical shift will be between -EClassificationDataset.MaxHorizontalShift and +EClassificationDataset.MaxHorizontalShift.

◆ MinContrastGain

float eVision.EasyDeepLearning.EClassificationDataset.MinContrastGain
getset

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

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

◆ MinGamma

float eVision.EasyDeepLearning.EClassificationDataset.MinGamma
getset

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

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

◆ MinSaturationGain

float eVision.EasyDeepLearning.EClassificationDataset.MinSaturationGain
getset

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.MinSaturationGain and EClassificationDataset.MaxSaturationGain.

◆ MinScale

float eVision.EasyDeepLearning.EClassificationDataset.MinScale
getset

Minimum scaling allowed for data augmentation.

◆ SaltAndPepperNoiseMaximumDensity

float eVision.EasyDeepLearning.EClassificationDataset.SaltAndPepperNoiseMaximumDensity
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 EClassificationDataset.SaltAndPepperNoiseMinimumDensity and EClassificationDataset.SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.

Its value must be between EClassificationDataset.SaltAndPepperNoiseMinimumDensity and 1.

This noise is computed after all the other noises.

◆ SaltAndPepperNoiseMinimumDensity

float eVision.EasyDeepLearning.EClassificationDataset.SaltAndPepperNoiseMinimumDensity
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 EClassificationDataset.SaltAndPepperNoiseMinimumDensity and EClassificationDataset.SaltAndPepperNoiseMaximumDensity) pixels to its minimum or maximum value.

Its value must be between 0 and EClassificationDataset.SaltAndPepperNoiseMaximumDensity.

This noise is computed after all the other noises.

◆ SpeckleNoiseMaximumStandardDeviation

float eVision.EasyDeepLearning.EClassificationDataset.SpeckleNoiseMaximumStandardDeviation
getset

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.SpeckleNoiseMinimumStandardDeviation and EClassificationDataset.SpeckleNoiseMaximumStandardDeviation.

Its value must be strictly higher than EClassificationDataset.SpeckleNoiseMinimumStandardDeviation.

This noise is computed before the salt and paper noise.

◆ SpeckleNoiseMinimumStandardDeviation

float eVision.EasyDeepLearning.EClassificationDataset.SpeckleNoiseMinimumStandardDeviation
getset

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.SpeckleNoiseMinimumStandardDeviation and EClassificationDataset.SpeckleNoiseMaximumStandardDeviation.

Its value must be strictly positive and lower than EClassificationDataset.SpeckleNoiseMaximumStandardDeviation.

This noise is computed before the salt and paper noise.