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

EDataset manages a dataset of images. More...

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

Public Member Functions

 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.
virtual void Clear ()
 Clears the dataset.
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

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

EDataset 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 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

Constructor & Destructor Documentation

◆ EDataset() [1/2]

eVision.EasyDeepLearning.EDataset.EDataset ( )

Constructs a EDataset object.

◆ EDataset() [2/2]

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

Copy constructor of a EDataset object.

Parameters
otherReference to the EDataset object that should be copied

Member Function Documentation

◆ AddImage() [1/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( eVision.EBaseROI img)

Adds an image to the dataset.

The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).

By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.

If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.

The method returns the index of the image in the dataset. This index is equal to EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Parameters
imgThe image

When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.

When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.

◆ AddImage() [2/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( eVision.EBaseROI img,
int originX,
int originY,
int width,
int height,
eVision.ERegion mask )

Adds an image to the dataset.

The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).

By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.

If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.

The method returns the index of the image in the dataset. This index is equal to EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Parameters
imgThe image
originXRegion of interest origin abscissa
originYRegion of interest origin ordinate
widthRegion of interest width
heightRegion of interest height
maskThe mask for the image (with respect to the region of interest)

When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.

When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.

◆ AddImage() [3/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( eVision.EBaseROI img,
int originX,
int originY,
int width,
int height,
eVision.ERegion mask,
string label )

Adds an image to the dataset.

The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).

By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.

If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.

The method returns the index of the image in the dataset. This index is equal to EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Parameters
imgThe image
originXRegion of interest origin abscissa
originYRegion of interest origin ordinate
widthRegion of interest width
heightRegion of interest height
maskThe mask for the image (with respect to the region of interest)
labelThe label

When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.

When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.

◆ AddImage() [4/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( eVision.EBaseROI img,
string label )

Adds an image to the dataset.

The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).

By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.

If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.

The method returns the index of the image in the dataset. This index is equal to EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Parameters
imgThe image
labelThe label

When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.

When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.

◆ AddImage() [5/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( string imagePath)

Adds an image to the dataset.

The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).

By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.

If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.

The method returns the index of the image in the dataset. This index is equal to EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Parameters
imagePathThe path to an image

When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.

When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.

◆ AddImage() [6/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( string imagePath,
int originX,
int originY,
int width,
int height,
eVision.ERegion mask )

Adds an image to the dataset.

The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).

By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.

If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.

The method returns the index of the image in the dataset. This index is equal to EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Parameters
imagePathThe path to an image
originXRegion of interest origin abscissa
originYRegion of interest origin ordinate
widthRegion of interest width
heightRegion of interest height
maskThe mask for the image (with respect to the region of interest)

When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.

When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.

◆ AddImage() [7/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( string imagePath,
int originX,
int originY,
int width,
int height,
eVision.ERegion mask,
string label )

Adds an image to the dataset.

The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).

By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.

If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.

The method returns the index of the image in the dataset. This index is equal to EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Parameters
imagePathThe path to an image
originXRegion of interest origin abscissa
originYRegion of interest origin ordinate
widthRegion of interest width
heightRegion of interest height
maskThe mask for the image (with respect to the region of interest)
labelThe label

When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.

When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.

◆ AddImage() [8/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( string imagePath,
string label )

Adds an image to the dataset.

The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).

By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.

If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.

The method returns the index of the image in the dataset. This index is equal to EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Parameters
imagePathThe path to an image
labelThe label

When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.

When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.

◆ AddImageObject() [1/2]

void eVision.EasyDeepLearning.EDataset.AddImageObject ( int imageIndex,
eVision.EasyDeepLearning.ELocatorObject obj )

Adds an object to the image.

Parameters
imageIndexIndex of the image
objObject

The image will be marked as labeled for object detection (EDataset.HasObjectLabeling equals to true) after a call to this method.

The object must be located at least partially within the region of interest of the image. Otherwise, when the object is completely outside of the region of interest, an exception will be thrown.

If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.

◆ AddImageObject() [2/2]

void eVision.EasyDeepLearning.EDataset.AddImageObject ( int imageIndex,
string label,
eVision.ERectangleRegion box )

Adds an object to the image.

Parameters
imageIndexIndex of the image
labelLabel of the object
boxAxis-aligned rectangle

The image will be marked as labeled for object detection (EDataset.HasObjectLabeling equals to true) after a call to this method.

The object must be located at least partially within the region of interest of the image. Otherwise, when the object is completely outside of the region of interest, an exception will be thrown.

If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.

◆ AddImages() [1/4]

int eVision.EasyDeepLearning.EDataset.AddImages ( string filter)

Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.

By default, all the images will have no classification label and no classification. However, a label can be directly specified for all of the images.

The method returns the number of images added to the dataset.

Parameters
filterA glob filter

The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.

◆ AddImages() [2/4]

int eVision.EasyDeepLearning.EDataset.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.

By default, all the images will have no classification label and no classification. However, a label can be directly specified for all of the images.

The method returns the number of images added to the dataset.

Parameters
filterA glob filter
originXRegion of interest origin abscissa
originYRegion of interest origin ordinate
widthRegion of interest width
heightRegion of interest height
maskThe mask for the images

The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.

◆ AddImages() [3/4]

int eVision.EasyDeepLearning.EDataset.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.

By default, all the images will have no classification label and no classification. However, a label can be directly specified for all of the images.

The method returns the number of images added to the dataset.

Parameters
filterA glob filter
originXRegion of interest origin abscissa
originYRegion of interest origin ordinate
widthRegion of interest width
heightRegion of interest height
maskThe mask for the images
labelA label.

The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.

◆ AddImages() [4/4]

int eVision.EasyDeepLearning.EDataset.AddImages ( string filter,
string label )

Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.

By default, all the images will have no classification label and no classification. However, a label can be directly specified for all of the images.

The method returns the number of images added to the dataset.

Parameters
filterA glob filter
labelA label.

The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.

◆ AddImagesFromCSV() [1/5]

int eVision.EasyDeepLearning.EDataset.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.

If the image path in the CSV file are relative, we use the directory containing the given CSV file as the root of the image paths.

The method returns the number of images added to the dataset.

◆ AddImagesFromCSV() [2/5]

int eVision.EasyDeepLearning.EDataset.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.

If the image path in the CSV file are relative, we use the directory containing the given CSV file as the root of the image paths.

The method returns the number of images added to the dataset.

◆ AddImagesFromCSV() [3/5]

int eVision.EasyDeepLearning.EDataset.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.

If the image path in the CSV file are relative, we use the directory containing the given CSV file as the root of the image paths.

The method returns the number of images added to the dataset.

◆ AddImagesFromCSV() [4/5]

int eVision.EasyDeepLearning.EDataset.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.

If the image path in the CSV file are relative, we use the directory containing the given CSV file as the root of the image paths.

The method returns the number of images added to the dataset.

◆ AddImagesFromCSV() [5/5]

int eVision.EasyDeepLearning.EDataset.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.

If the image path in the CSV file are relative, we use the directory containing the given CSV file as the root of the image paths.

The method returns the number of images added to the dataset.

◆ AddLabel()

void eVision.EasyDeepLearning.EDataset.AddLabel ( string label)

Adds a label to the dataset.

Parameters
labelName of the new label

◆ AddObjectLabel() [1/2]

void eVision.EasyDeepLearning.EDataset.AddObjectLabel ( string label)

Adds an object label.

Parameters
labelLabel to add

◆ AddObjectLabel() [2/2]

void eVision.EasyDeepLearning.EDataset.AddObjectLabel ( string label,
float weight )

Adds an object label.

Parameters
labelLabel to add
weightWeight of the label

◆ AddRegionToSegment() [1/2]

void eVision.EasyDeepLearning.EDataset.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.

Parameters
imageIndexImage index
segmentationLabelIndexSegmentation label index
regionRegion to add

◆ AddRegionToSegment() [2/2]

void eVision.EasyDeepLearning.EDataset.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.

Parameters
imageIndexImage index
labelSegmentation label
regionRegion to add

◆ AddSegmentationLabel() [1/2]

int eVision.EasyDeepLearning.EDataset.AddSegmentationLabel ( string label)

Adds a segmentation label. The index of the new segmentation labels is returned by the method.

Parameters
labelName of the segmentation label

◆ AddSegmentationLabel() [2/2]

int eVision.EasyDeepLearning.EDataset.AddSegmentationLabel ( string label,
float labelWeight )

Adds a segmentation label. The index of the new segmentation labels is returned by the method.

Parameters
labelName of the segmentation label
labelWeightWeight of the segmentation label

◆ Clear()

virtual void eVision.EasyDeepLearning.EDataset.Clear ( )
virtual

Clears the dataset.

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset.

◆ Export() [1/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory)

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.

◆ Export() [2/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
bool keepFilename )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
keepFilenameKeep the original filename of the images

◆ Export() [3/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
bool keepFilename,
eVision.EImageFileType fileType )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
keepFilenameKeep the original filename of the images
fileTypeFile type for the exported file. If EImageFileType_Auto, the same file type as the original image is used.

◆ Export() [4/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
bool keepFilename,
eVision.EImageFileType fileType,
int quality )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
keepFilenameKeep the original filename of the images
fileTypeFile type for the exported file. If EImageFileType_Auto, the same file type as the original image is used.
qualityQuality or compression parameters for EBaseROI.SavePng, EBaseROI.SaveJpeg, or EBaseROI.SaveJpeg2K. A value of -1 means the default value.

◆ Export() [5/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
eVision.EImageFileType fileType )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
fileTypeFile type for the exported file. If EImageFileType_Auto, the same file type as the original image is used.

◆ Export() [6/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
eVision.EImageFileType fileType,
int quality )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
fileTypeFile type for the exported file. If EImageFileType_Auto, the same file type as the original image is used.
qualityQuality or compression parameters for EBaseROI.SavePng, EBaseROI.SaveJpeg, or EBaseROI.SaveJpeg2K. A value of -1 means the default value.

◆ Export() [7/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
int width,
int height,
int channels )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
widthWidth of the image.
heightHeight of the image.
channelsNumber of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively).

◆ Export() [8/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
int width,
int height,
int channels,
bool keepFilename )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
widthWidth of the image.
heightHeight of the image.
channelsNumber of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively).
keepFilenameKeep the original filename of the images

◆ Export() [9/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
int width,
int height,
int channels,
bool keepFilename,
eVision.EImageFileType fileType )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
widthWidth of the image.
heightHeight of the image.
channelsNumber of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively).
keepFilenameKeep the original filename of the images
fileTypeFile type for the exported file. If EImageFileType_Auto, the same file type as the original image is used.

◆ Export() [10/12]

void eVision.EasyDeepLearning.EDataset.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.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
widthWidth of the image.
heightHeight of the image.
channelsNumber of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively).
keepFilenameKeep the original filename of the images
fileTypeFile type for the exported file. If EImageFileType_Auto, the same file type as the original image is used.
qualityQuality or compression parameters for EBaseROI.SavePng, EBaseROI.SaveJpeg, or EBaseROI.SaveJpeg2K. A value of -1 means the default value.

◆ Export() [11/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
int width,
int height,
int channels,
eVision.EImageFileType fileType )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
widthWidth of the image.
heightHeight of the image.
channelsNumber of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively).
fileTypeFile type for the exported file. If EImageFileType_Auto, the same file type as the original image is used.

◆ Export() [12/12]

void eVision.EasyDeepLearning.EDataset.Export ( string directory,
int width,
int height,
int channels,
eVision.EImageFileType fileType,
int quality )

Exports the dataset and its images to the given directory.

  • A new EDataset object with relative paths to the images is saved into the given directory.
  • The exported images will be placed in a sub directory named "Images".

By default, the images will be saved under the filename "Image_[id].[ext]" where [id] is the index of the image in the dataset and [ext] is the image extension. If fileType is set to EImageFileType_Auto, [ext] will be the same as the original image. Otherwise, [ext] will be deduced from the specified file type. If keepFilename is set to true, the images will keep their original filename (except for their extensions). In two images have the same filename, an index will be automatically added to avoid nay conflict. A width, height, and number of channels can be optionally specified to reformat all the images in the dataset. Note that, in this case, only the ROI of the image will be exported.

Parameters
directoryA string containing the full path to the directory.
widthWidth of the image.
heightHeight of the image.
channelsNumber of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively).
fileTypeFile type for the exported file. If EImageFileType_Auto, the same file type as the original image is used.
qualityQuality or compression parameters for EBaseROI.SavePng, EBaseROI.SaveJpeg, or EBaseROI.SaveJpeg2K. A value of -1 means the default value.

◆ ExtractSplit()

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

Parameters
splitSplit
typeType of the split to extract

◆ GetAvailableImageAnnotationFormat() [1/2]

eVision.EasyDeepLearning.EImageAnnotationFormat eVision.EasyDeepLearning.EDataset.GetAvailableImageAnnotationFormat ( int imgId)

Image annotation file formats that are available next to the image file.

Parameters
imgIdIndex of an image

◆ GetAvailableImageAnnotationFormat() [2/2]

eVision.EasyDeepLearning.EImageAnnotationFormat eVision.EasyDeepLearning.EDataset.GetAvailableImageAnnotationFormat ( string imageFile)

Image annotation file formats that are available next to the image file.

Parameters
imageFilePath to an image file

◆ GetImageCopy() [1/2]

eVision.EBaseROI eVision.EasyDeepLearning.EDataset.GetImageCopy ( int index)

Gets a copy of the i-th image of the dataset.

Parameters
indexThe index of the image.

◆ GetImageCopy() [2/2]

void eVision.EasyDeepLearning.EDataset.GetImageCopy ( int index,
eVision.EBaseROI img )

Gets a copy of the i-th image of the dataset.

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

◆ GetImageLabel()

string eVision.EasyDeepLearning.EDataset.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.

Parameters
indexThe index of the image for which to get the label.

◆ GetImageNumObjects()

int eVision.EasyDeepLearning.EDataset.GetImageNumObjects ( int imageIndex)

Number of objects for the specified image.

Parameters
imageIndexIndex of the image

◆ GetImageObject()

eVision.EasyDeepLearning.ELocatorObject eVision.EasyDeepLearning.EDataset.GetImageObject ( int imageIndex,
int objectIndex )

Gets the specified object for the given image.

Parameters
imageIndexIndex of the image
objectIndexIndex of the object between 0 and EDataset.GetImageNumObjects

◆ GetImageObjects()

eVision.EasyDeepLearning.ELocatorObject[] eVision.EasyDeepLearning.EDataset.GetImageObjects ( int imageIndex)

Gets all the objects of the specified image.

Parameters
imageIndexIndex of the image

◆ GetImagePath()

string eVision.EasyDeepLearning.EDataset.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.

Parameters
indexThe index of the image for which to get the path.

◆ GetImagesIndexesWithLabel() [1/2]

uint[] eVision.EasyDeepLearning.EDataset.GetImagesIndexesWithLabel ( int labelIndex)

Gets a list of index corresponding to the images associated with the given label.

Parameters
labelIndexThe index of the label (starting from 0 to EDataset.NumLabels - 1)

◆ GetImagesIndexesWithLabel() [2/2]

uint[] eVision.EasyDeepLearning.EDataset.GetImagesIndexesWithLabel ( string label)

Gets a list of index corresponding to the images associated with the given label.

Parameters
labelThe label

◆ GetLabel()

string eVision.EasyDeepLearning.EDataset.GetLabel ( int i)

Gets the i-th label of the dataset (starting from 0 to EDataset.NumLabels - 1).

Parameters
iLabel index

◆ GetLabelColor()

eVision.ERGBColor eVision.EasyDeepLearning.EDataset.GetLabelColor ( int index)

Gets the label color for a classification label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).

◆ GetLabelOpacity()

byte eVision.EasyDeepLearning.EDataset.GetLabelOpacity ( int index)

Gets the label opacity for a classification label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).

◆ GetLabelWeight()

float eVision.EasyDeepLearning.EDataset.GetLabelWeight ( int index)

Gets the weight associated to the i-th label of the dataset (starting from 0 to EDataset.NumLabels - 1).

Parameters
indexLabel index

◆ GetMask()

eVision.ERegion eVision.EasyDeepLearning.EDataset.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.

Parameters
imageIndexIndex of the image for which to get the mask region

◆ GetNumImagesForFile()

int eVision.EasyDeepLearning.EDataset.GetNumImagesForFile ( string filePath)

Get the number of images in the dataset that are associated with the given image file.

Parameters
filePaththe path to the image.

The number of image files can be different than the number of images of the dataset. An image file can correspond to several dataset images (with different ROI).

◆ GetNumImagesForSegmentationLabel() [1/2]

int eVision.EasyDeepLearning.EDataset.GetNumImagesForSegmentationLabel ( int labelId)

Number of images containing the given segmentation label.

Parameters
labelIdIndex of the segmentation label

◆ GetNumImagesForSegmentationLabel() [2/2]

int eVision.EasyDeepLearning.EDataset.GetNumImagesForSegmentationLabel ( string label)

Number of images containing the given segmentation label.

Parameters
labelSegmentation label

◆ GetNumImagesWithObjectLabel() [1/2]

int eVision.EasyDeepLearning.EDataset.GetNumImagesWithObjectLabel ( int labelIdx)

Number of images that contain an object with the given label.

Parameters
labelIdxIndex of the object label.

◆ GetNumImagesWithObjectLabel() [2/2]

int eVision.EasyDeepLearning.EDataset.GetNumImagesWithObjectLabel ( string label)

Number of images that contain an object with the given label.

Parameters
labelLabel.

◆ GetNumObjectsWithLabel() [1/2]

ulong eVision.EasyDeepLearning.EDataset.GetNumObjectsWithLabel ( int labelIdx)

Number of objects with the given label.

Parameters
labelIdxIndex of the object label.

◆ GetNumObjectsWithLabel() [2/2]

ulong eVision.EasyDeepLearning.EDataset.GetNumObjectsWithLabel ( string label)

Number of objects with the given label.

Parameters
labelLabel.

◆ GetNumPixelsForSegmentationLabel() [1/2]

ulong eVision.EasyDeepLearning.EDataset.GetNumPixelsForSegmentationLabel ( int labelId)

Number of pixels assigned to the given segmentation label.

Parameters
labelIdIndex of the segmentation label

◆ GetNumPixelsForSegmentationLabel() [2/2]

ulong eVision.EasyDeepLearning.EDataset.GetNumPixelsForSegmentationLabel ( string label)

Number of pixels assigned to the given segmentation label.

Parameters
labelSegmentation label

◆ GetNumSegmentedBlobs() [1/3]

int eVision.EasyDeepLearning.EDataset.GetNumSegmentedBlobs ( int imageId)

Number of segmented blobs in the image for all non-background labels or for a specific label.

Parameters
imageIdImage index

A segmented blob is a contiguous area assigned to a label different than "Background".

◆ GetNumSegmentedBlobs() [2/3]

int eVision.EasyDeepLearning.EDataset.GetNumSegmentedBlobs ( int imageId,
int labelId )

Number of segmented blobs in the image for all non-background labels or for a specific label.

Parameters
imageIdImage index
labelIdLabel index

A segmented blob is a contiguous area assigned to a label different than "Background".

◆ GetNumSegmentedBlobs() [3/3]

int eVision.EasyDeepLearning.EDataset.GetNumSegmentedBlobs ( int imageId,
string label )

Number of segmented blobs in the image for all non-background labels or for a specific label.

Parameters
imageIdImage index
labelLabel

A segmented blob is a contiguous area assigned to a label different than "Background".

◆ GetObjectLabel()

string eVision.EasyDeepLearning.EDataset.GetObjectLabel ( int labelIndex)

Object label.

Parameters
labelIndexIndex of the object label between 0 and EDataset.NumObjectLabels

◆ GetObjectLabelColor()

eVision.ERGBColor eVision.EasyDeepLearning.EDataset.GetObjectLabelColor ( int index)

Gets the label color for an object label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).

◆ GetObjectLabelOpacity()

byte eVision.EasyDeepLearning.EDataset.GetObjectLabelOpacity ( int index)

Gets the label opacity for an object label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).

◆ GetObjectLabelWeight() [1/2]

float eVision.EasyDeepLearning.EDataset.GetObjectLabelWeight ( int labelIndex)

Gets the weight of an object label.

Parameters
labelIndexIndex of the object label

◆ GetObjectLabelWeight() [2/2]

float eVision.EasyDeepLearning.EDataset.GetObjectLabelWeight ( string label)

Gets the weight of an object label.

Parameters
labelLabel

◆ GetOCRAnnotations()

eVision.EasyDeepOCR.ETextLine[] eVision.EasyDeepLearning.EDataset.GetOCRAnnotations ( int imgId)

Ground truth text lines for the specified image.

Parameters
imgIdIndex of the image.

◆ GetRegionForSegment() [1/2]

eVision.ERegion eVision.EasyDeepLearning.EDataset.GetRegionForSegment ( int imageIndex,
int segmentationLabelIndex )

Gets a region corresponding to the pixels of the given segment.

Parameters
imageIndexImage index
segmentationLabelIndexSegmentation label index

◆ GetRegionForSegment() [2/2]

eVision.ERegion eVision.EasyDeepLearning.EDataset.GetRegionForSegment ( int imageIndex,
string segmentationLabel )

Gets a region corresponding to the pixels of the given segment.

Parameters
imageIndexImage index
segmentationLabelSegmentation label

◆ GetRegionOfInterestHeight()

int eVision.EasyDeepLearning.EDataset.GetRegionOfInterestHeight ( int imageIndex)

Region of interest height for the specified image.

Parameters
imageIndexIndex of the image.

◆ GetRegionOfInterestOriginX()

int eVision.EasyDeepLearning.EDataset.GetRegionOfInterestOriginX ( int imageIndex)

Region of interest origin abscissa for the specified image.

Parameters
imageIndexIndex of the image.

◆ GetRegionOfInterestOriginY()

int eVision.EasyDeepLearning.EDataset.GetRegionOfInterestOriginY ( int imageIndex)

Region of interest origin ordinate for the specified image.

Parameters
imageIndexIndex of the image.

◆ GetRegionOfInterestWidth()

int eVision.EasyDeepLearning.EDataset.GetRegionOfInterestWidth ( int imageIndex)

Region of interest width for the specified image.

Parameters
imageIndexIndex of the image.

◆ GetSegmentationLabel()

string eVision.EasyDeepLearning.EDataset.GetSegmentationLabel ( int index)

Gets the segmentation label.

Parameters
indexIndex of the segmentation label

The segmentation label index 0 is reserved and corresponds to the "background" label. This segmentation label can't be changed.

◆ GetSegmentationLabelColor()

eVision.ERGBColor eVision.EasyDeepLearning.EDataset.GetSegmentationLabelColor ( int index)

Gets the label color for a segmentation label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).

◆ GetSegmentationLabelOpacity()

byte eVision.EasyDeepLearning.EDataset.GetSegmentationLabelOpacity ( int index)

Gets the label opacity for a segmentation label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).

◆ GetSegmentationLabelWeight() [1/2]

float eVision.EasyDeepLearning.EDataset.GetSegmentationLabelWeight ( int index)

Gets the segmentation label weights.

Parameters
indexIndex of the segmentation label

◆ GetSegmentationLabelWeight() [2/2]

float eVision.EasyDeepLearning.EDataset.GetSegmentationLabelWeight ( string label)

Gets the segmentation label weights.

Parameters
labelSegmentation label

◆ GetSegmentationMap()

eVision.EImageBW16 eVision.EasyDeepLearning.EDataset.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).

If an image has no segmentation (EDataset.HasSegmentation), the getter will throw an exception.

Parameters
imageIndexImage index

◆ GetSplit() [1/4]

eVision.EasyDeepLearning.EDatasetSplit eVision.EasyDeepLearning.EDataset.GetSplit ( float trainingProportion,
float validationPropotion,
eVision.EasyDeepLearning.EDeepLearningToolType toolType,
string goodLabel )

Generates a split.

Parameters
trainingProportionApproximate proportion of training images
validationPropotionApproximate proportion of validation images
toolTypeTool type for which to generate the split
goodLabelThe good label for EasySegment Unsupervised split

◆ GetSplit() [2/4]

eVision.EasyDeepLearning.EDatasetSplit eVision.EasyDeepLearning.EDataset.GetSplit ( float trainingProportion,
float validationPropotion,
eVision.EasyDeepLearning.EDeepLearningToolType toolType,
string goodLabel,
uint seed )

Generates a split.

Parameters
trainingProportionApproximate proportion of training images
validationPropotionApproximate proportion of validation images
toolTypeTool type for which to generate the split
goodLabelThe good label for EasySegment Unsupervised split
seedSeed for randomization

◆ GetSplit() [3/4]

eVision.EasyDeepLearning.EDatasetSplit eVision.EasyDeepLearning.EDataset.GetSplit ( int numTrainingImages,
int numValidationImages,
eVision.EasyDeepLearning.EDeepLearningToolType toolType,
string goodLabel )

Generates a split.

Parameters
numTrainingImagesNumber of training images
numValidationImagesNumber of validation images
toolTypeTool type for which to generate the split
goodLabelThe good label for EasySegment Unsupervised split

◆ GetSplit() [4/4]

eVision.EasyDeepLearning.EDatasetSplit eVision.EasyDeepLearning.EDataset.GetSplit ( int numTrainingImages,
int numValidationImages,
eVision.EasyDeepLearning.EDeepLearningToolType toolType,
string goodLabel,
uint seed )

Generates a split.

Parameters
numTrainingImagesNumber of training images
numValidationImagesNumber of validation images
toolTypeTool type for which to generate the split
goodLabelThe good label for EasySegment Unsupervised split
seedSeed for randomization

◆ HasForegroundSegments()

bool eVision.EasyDeepLearning.EDataset.HasForegroundSegments ( int imageId)

Whether the image segmentation contains segments that are not background. If the image has no segmentation, this method throws an exception.

Parameters
imageIdImage index

◆ HasLabel()

bool eVision.EasyDeepLearning.EDataset.HasLabel ( int index)

Whether an image has a classification label.

Parameters
indexIndex of an image.

◆ HasObjectLabeling()

bool eVision.EasyDeepLearning.EDataset.HasObjectLabeling ( int imageIndex)

Whether the image is labeled for object detection and use with ELocator.

Parameters
imageIndexIndex of the image

◆ HasOCRAnnotations()

bool eVision.EasyDeepLearning.EDataset.HasOCRAnnotations ( int imgId)

Whether the specified image has OCR annotations.

Parameters
imgIdIndex of the image.

◆ HasSegmentation()

bool eVision.EasyDeepLearning.EDataset.HasSegmentation ( int imageId)

Whether the image has a segmentation.

Parameters
imageIdImage index

◆ ImportPascalVOCXMLAnnotations() [1/2]

void eVision.EasyDeepLearning.EDataset.ImportPascalVOCXMLAnnotations ( )

Imports Pascal VOC XML annotations (for EasyLocate Bounding Box).

This method may add new labels to the object labels.

The version that do not take an image index attempts to import the annotation from all images currently in the dataset.

◆ ImportPascalVOCXMLAnnotations() [2/2]

void eVision.EasyDeepLearning.EDataset.ImportPascalVOCXMLAnnotations ( int imgId)

Imports Pascal VOC XML annotations (for EasyLocate Bounding Box).

This method may add new labels to the object labels.

The version that do not take an image index attempts to import the annotation from all images currently in the dataset.

Parameters
imgIdThe image index for which to import the annotation

◆ ImportYOLOTXTAnnotations() [1/2]

void eVision.EasyDeepLearning.EDataset.ImportYOLOTXTAnnotations ( int imgId,
string labelFile )

Imports YOLO TXT annotations (for EasyLocate Bounding Box).

You need to specify the list of labels associated with the YOLO TXT annotations through an array of string or through a file containing this list. This method may add new labels to the object labels.

The version that do not take an image index attempts to import the annotation from all images currently in the dataset.

Parameters
imgIdThe image index for which to import the annotation
labelFilePath to a file containing the label list

◆ ImportYOLOTXTAnnotations() [2/2]

void eVision.EasyDeepLearning.EDataset.ImportYOLOTXTAnnotations ( string labelFile)

Imports YOLO TXT annotations (for EasyLocate Bounding Box).

You need to specify the list of labels associated with the YOLO TXT annotations through an array of string or through a file containing this list. This method may add new labels to the object labels.

The version that do not take an image index attempts to import the annotation from all images currently in the dataset.

Parameters
labelFilePath to a file containing the label list

◆ IsEmbeddedImage()

bool eVision.EasyDeepLearning.EDataset.IsEmbeddedImage ( int index)

Whether the image is embedded into the dataset and is not a reference towards an image file.

Parameters
indexIndex of the image.

◆ IsImageFile()

bool eVision.EasyDeepLearning.EDataset.IsImageFile ( int index)

Whether the image is stored as a file path towards an image.

Parameters
indexIndex of the image.

◆ Load() [1/2]

void eVision.EasyDeepLearning.EDataset.Load ( eVision.ESerializer serializer)

Loads a classification dataset from disk.

Parameters
serializerThe serializer.

◆ Load() [2/2]

void eVision.EasyDeepLearning.EDataset.Load ( string path)

Loads a classification dataset from disk.

Parameters
pathA string containing the full path to the dataset file.

◆ RemoveImage()

void eVision.EasyDeepLearning.EDataset.RemoveImage ( int imgId)

Removes the image at the given index. All annotations (label, segmentation, objects) will be lost.

Parameters
imgIdIndex of the image to remove

◆ RemoveImageObject()

void eVision.EasyDeepLearning.EDataset.RemoveImageObject ( int imageIndex,
int objectIndex )

Removes an object from an image.

Parameters
imageIndexIndex of the image
objectIndexIndex of the object between 0 and EDataset.GetImageNumObjects

◆ RemoveLabel() [1/2]

void eVision.EasyDeepLearning.EDataset.RemoveLabel ( int labelId)

Removes a label from the dataset.

All the images associated with this label will be set to unlabeled (see EDataset.HasLabel).

Parameters
labelIdIndex of the label to remove

◆ RemoveLabel() [2/2]

void eVision.EasyDeepLearning.EDataset.RemoveLabel ( string label)

Removes a label from the dataset.

All the images associated with this label will be set to unlabeled (see EDataset.HasLabel).

Parameters
labelName of the label to remove

◆ RemoveObjectLabel() [1/2]

void eVision.EasyDeepLearning.EDataset.RemoveObjectLabel ( int labelIndex)

Removes an object label.

Parameters
labelIndexIndex of the object label to remove

◆ RemoveObjectLabel() [2/2]

void eVision.EasyDeepLearning.EDataset.RemoveObjectLabel ( string label)

Removes an object label.

Parameters
labelLabel to remove

◆ RemoveSegmentationLabel() [1/2]

void eVision.EasyDeepLearning.EDataset.RemoveSegmentationLabel ( int index)

Remove a segmentation label.

This method sets all the pixels in the dataset assigned to this label to the background label.

Parameters
indexIndex of the segmentation label to remove

◆ RemoveSegmentationLabel() [2/2]

void eVision.EasyDeepLearning.EDataset.RemoveSegmentationLabel ( string label)

Remove a segmentation label.

This method sets all the pixels in the dataset assigned to this label to the background label.

Parameters
labelName of the segmentation label to remove

◆ ResetImageObjectLabeling()

void eVision.EasyDeepLearning.EDataset.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.

Parameters
imageIndexIndex of the image

◆ ResetSegmentation()

void eVision.EasyDeepLearning.EDataset.ResetSegmentation ( int imageIndex)

Resets the segmentation of an image by setting all pixels to background.

Parameters
imageIndexImage index

◆ Save() [1/2]

void eVision.EasyDeepLearning.EDataset.Save ( eVision.ESerializer serializer)

Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label.

Parameters
serializerThe serializer.

This method only save the image that were given to this EDataset instance as EBaseROI pointers.

To obtain a portable EDataset file, please use EDataset.Export.

◆ Save() [2/2]

void eVision.EasyDeepLearning.EDataset.Save ( string path)

Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label.

Parameters
pathA string containing the full path to the dataset file.

This method only save the image that were given to this EDataset instance as EBaseROI pointers.

To obtain a portable EDataset file, please use EDataset.Export.

◆ SaveWithRelativePath()

void eVision.EasyDeepLearning.EDataset.SaveWithRelativePath ( string path)

Saves the dataset with image paths relative to the directory in which the dataset file is saved.

◆ SetImageLabel() [1/2]

void eVision.EasyDeepLearning.EDataset.SetImageLabel ( int index,
string label )

Sets the label of images in the dataset.

Parameters
indexThe index of the image for which to set the label.
labelThe label

The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.

◆ SetImageLabel() [2/2]

void eVision.EasyDeepLearning.EDataset.SetImageLabel ( string filter,
string label )

Sets the label of images in the dataset.

Parameters
filterA glob filter
labelThe label

The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.

◆ SetImageObject() [1/3]

void eVision.EasyDeepLearning.EDataset.SetImageObject ( int imageIndex,
int objectIndex,
eVision.EasyDeepLearning.ELocatorObject obj )

Sets the specified object for the given image.

Parameters
imageIndexIndex of the image
objectIndexIndex of the object between 0 and EDataset.GetImageNumObjects
objObject

If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.

◆ SetImageObject() [2/3]

void eVision.EasyDeepLearning.EDataset.SetImageObject ( int imageIndex,
int objectIndex,
eVision.ERectangleRegion region )

Sets the specified object for the given image.

Parameters
imageIndexIndex of the image
objectIndexIndex of the object between 0 and EDataset.GetImageNumObjects
regionNew region for the object

If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.

◆ SetImageObject() [3/3]

void eVision.EasyDeepLearning.EDataset.SetImageObject ( int imageIndex,
int objectIndex,
string label )

Sets the specified object for the given image.

Parameters
imageIndexIndex of the image
objectIndexIndex of the object between 0 and EDataset.GetImageNumObjects
labelNew label for the object

If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.

◆ SetLabel()

void eVision.EasyDeepLearning.EDataset.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.

Parameters
indexLabel index
labelReplacement label

◆ SetLabelColor()

void eVision.EasyDeepLearning.EDataset.SetLabelColor ( int index,
eVision.ERGBColor color )

Sets the label color for a classification label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).
colorNew color for the label

◆ SetLabelOpacity()

void eVision.EasyDeepLearning.EDataset.SetLabelOpacity ( int index,
byte opacity )

Sets the label opacity for a classification label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).
opacityNew opacity for the label

◆ SetLabelWeight()

void eVision.EasyDeepLearning.EDataset.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.

Parameters
indexLabel index
weightWeight to be set

◆ SetMask()

void eVision.EasyDeepLearning.EDataset.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.

Parameters
imageIndexIndex of the image for which to get the mask region
maskMask to set on the image

◆ SetObjectLabel() [1/2]

void eVision.EasyDeepLearning.EDataset.SetObjectLabel ( int labelIndex,
string newLabel )

Sets an object label.

Parameters
labelIndexIndex of the object label
newLabelNew label to be set

◆ SetObjectLabel() [2/2]

void eVision.EasyDeepLearning.EDataset.SetObjectLabel ( string oldLabel,
string newLabel )

Sets an object label.

Parameters
oldLabelOld label to change
newLabelNew label to be set

◆ SetObjectLabelColor()

void eVision.EasyDeepLearning.EDataset.SetObjectLabelColor ( int index,
eVision.ERGBColor color )

Sets the label color for an object label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).
colorNew color for the label

◆ SetObjectLabelOpacity()

void eVision.EasyDeepLearning.EDataset.SetObjectLabelOpacity ( int index,
byte opacity )

Sets the label opacity for an object label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).
opacityNew opacity for the label

◆ SetObjectLabelWeight() [1/2]

void eVision.EasyDeepLearning.EDataset.SetObjectLabelWeight ( int labelIndex,
float weight )

Sets the weight of an object label.

Parameters
labelIndexIndex of the object label
weightNew weight

◆ SetObjectLabelWeight() [2/2]

void eVision.EasyDeepLearning.EDataset.SetObjectLabelWeight ( string label,
float weight )

Sets the weight of an object label.

Parameters
labelLabel
weightNew weight

◆ SetOCRAnnotations()

void eVision.EasyDeepLearning.EDataset.SetOCRAnnotations ( int imgId,
eVision.EasyDeepOCR.ETextLine[] texts )

Sets the ground truth text lines for the specified image.

Parameters
imgIdIndex of the image.
textsText lines of the image.

◆ SetRegionOfInterest()

void eVision.EasyDeepLearning.EDataset.SetRegionOfInterest ( int imageIndex,
int xOrg,
int yOrg,
int width,
int height )

Sets the region of interest for the specified image.

Parameters
imageIndexIndex of the image.
xOrgROI origin abscissa
yOrgROI origin ordinate
widthROI width
heightROI height

Any objects or segmentation located outside of the region of interest will be lost.

◆ SetSegmentationLabel()

void eVision.EasyDeepLearning.EDataset.SetSegmentationLabel ( int index,
string label )

Sets the segmentation labels.

Parameters
indexIndex of the segmentation label
labelString representing the segmentation label

The segmentation label index 0 is reserved and corresponds to the "background" label. This segmentation label can't be changed.

◆ SetSegmentationLabelColor()

void eVision.EasyDeepLearning.EDataset.SetSegmentationLabelColor ( int index,
eVision.ERGBColor color )

Sets the label color for a segmentation label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).
colorNew color for the label

◆ SetSegmentationLabelOpacity()

void eVision.EasyDeepLearning.EDataset.SetSegmentationLabelOpacity ( int index,
byte opacity )

Sets the label opacity for a segmentation label.

Parameters
indexLabel index (0 to EDataset.NumLabels - 1).
opacityNew opacity for the label

◆ SetSegmentationLabelWeight() [1/2]

void eVision.EasyDeepLearning.EDataset.SetSegmentationLabelWeight ( int index,
float weight )

Sets the segmentation label weight.

Parameters
indexIndex of the segmentation label
weightWeight of the segmentation label

◆ SetSegmentationLabelWeight() [2/2]

void eVision.EasyDeepLearning.EDataset.SetSegmentationLabelWeight ( string label,
float weight )

Sets the segmentation label weight.

Parameters
labelSegmentation label
weightWeight of the segmentation label

◆ SetSegmentationMap()

void eVision.EasyDeepLearning.EDataset.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).

If an image has no segmentation (EDataset.HasSegmentation), the getter will throw an exception.

Parameters
imageIndexImage index
segmentationMapSegmentation map

◆ SplitDataset() [1/3]

void eVision.EasyDeepLearning.EDataset.SplitDataset ( eVision.EasyDeepLearning.EDataset d1,
eVision.EasyDeepLearning.EDataset 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.EDataset.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.

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.EDataset.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.

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.EDataset.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.

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.EDataset.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.

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.EDataset.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.

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.EDataset.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.

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.EDataset.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.

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.EDataset.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.

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.

◆ UnsetImageLabel()

void eVision.EasyDeepLearning.EDataset.UnsetImageLabel ( int index)

Unset the label of the given image of the dataset. After this operation, the given image will have no classification labels.

Parameters
indexIndex of the image for which to unset the label

◆ UnsetImageObjectLabeling()

void eVision.EasyDeepLearning.EDataset.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.

Parameters
imageIndexIndex of the image

◆ UnsetOCRAnnotations()

void eVision.EasyDeepLearning.EDataset.UnsetOCRAnnotations ( int imgId)

Unsets the OCR labeling for the specified image.

Parameters
imgIdIndex of the image.

◆ UnsetSegmentation()

void eVision.EasyDeepLearning.EDataset.UnsetSegmentation ( int imageIndex)

Unsets the segmentation of an image. After this operation, the image will have no segmentation.

Parameters
imageIndexImage index

Property Documentation

◆ AbsoluteMaxOverlap

float eVision.EasyDeepLearning.EDataset.AbsoluteMaxOverlap
get

Absolute maximum overlap between objects in the dataset.

◆ BasePath

string eVision.EasyDeepLearning.EDataset.BasePath
set

Sets the base path for the images specified with a relative path.

The base path is not serialized. It must be set after loading a dataset file.

◆ Channels

uint eVision.EasyDeepLearning.EDataset.Channels
get

Number of channels of the first image added to the dataset.

◆ Height

uint eVision.EasyDeepLearning.EDataset.Height
get

Height of the region of interest of the first image added to the dataset.

◆ ImagesIndexesWithNoLabel

int [] eVision.EasyDeepLearning.EDataset.ImagesIndexesWithNoLabel
get

Gets a list of index corresponding to the images with no classification labels.

◆ LabeledImagesIndexes

int [] eVision.EasyDeepLearning.EDataset.LabeledImagesIndexes
get

Gets a list of index corresponding to the images that have a classification label.

◆ MaxNumObjectPerImage

int eVision.EasyDeepLearning.EDataset.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.

◆ NumImageFiles

int eVision.EasyDeepLearning.EDataset.NumImageFiles
get

Number of different image files contained in the dataset.

The number of image files can be different than the number of images of the dataset. An image file can correspond to several dataset images (with different ROI).

◆ NumImages

int eVision.EasyDeepLearning.EDataset.NumImages
get

Number of images in the dataset.

◆ NumImagesWithForegroundSegments

int eVision.EasyDeepLearning.EDataset.NumImagesWithForegroundSegments
get

Number of images that have a ground truth segmentation that has foreground segments and is this not entirely composed of background pixels.

◆ NumImagesWithObjectLabeling

int eVision.EasyDeepLearning.EDataset.NumImagesWithObjectLabeling
get

Number of images in the dataset that are labeled for object detection.

◆ NumImagesWithObjects

int eVision.EasyDeepLearning.EDataset.NumImagesWithObjects
get

Number of images in the dataset that are labeled for object detection and have 1 or more objects.

◆ NumImagesWithOCR

int eVision.EasyDeepLearning.EDataset.NumImagesWithOCR
get

Number of images with OCR annotations.

◆ NumImagesWithoutForegroundSegments

int eVision.EasyDeepLearning.EDataset.NumImagesWithoutForegroundSegments
get

Number of images that have a ground truth segmentation that has no foreground segments and is thus entirely composed of background pixels.

◆ NumImagesWithoutObjectLabeling

int eVision.EasyDeepLearning.EDataset.NumImagesWithoutObjectLabeling
get

Number of images in the dataset that are not labeled for object detection.

◆ NumImagesWithoutObjects

int eVision.EasyDeepLearning.EDataset.NumImagesWithoutObjects
get

Number of images in the dataset that are labeled for object detection but have been associated with no object.

◆ NumImagesWithoutOCR

int eVision.EasyDeepLearning.EDataset.NumImagesWithoutOCR
get

Number of images without OCR annotations.

◆ NumImagesWithoutSegmentation

int eVision.EasyDeepLearning.EDataset.NumImagesWithoutSegmentation
get

Number of images that doesn't have a ground truth segmentation.

◆ NumImagesWithSegmentation

int eVision.EasyDeepLearning.EDataset.NumImagesWithSegmentation
get

Number of images that have a ground truth segmentation.

◆ NumLabeledImages

int eVision.EasyDeepLearning.EDataset.NumLabeledImages
get

Number of images that have a classification label.

◆ NumLabels

int eVision.EasyDeepLearning.EDataset.NumLabels
get

Number of labels in the dataset.

◆ NumObjectLabels

int eVision.EasyDeepLearning.EDataset.NumObjectLabels
get

Number of object labels.

◆ NumSegmentationLabels

int eVision.EasyDeepLearning.EDataset.NumSegmentationLabels
get

Number of segmentation labels. A dataset has always at least one segmentation label: "background".

◆ NumTexts

int eVision.EasyDeepLearning.EDataset.NumTexts
get

Number of annotated texts in the dataset.

◆ NumUnlabeledImages

int eVision.EasyDeepLearning.EDataset.NumUnlabeledImages
get

Number of images that doesn't have any classification label.

◆ ObjectSize

int eVision.EasyDeepLearning.EDataset.ObjectSize
getset

Object size for EasyLocate Interest point.

◆ SameLabelMaxOverlap

float eVision.EasyDeepLearning.EDataset.SameLabelMaxOverlap
get

Maximum overlap between objects with the same label in the dataset.

◆ TextDataset

eVision.EasyDeepLearning.EDataset eVision.EasyDeepLearning.EDataset.TextDataset
get

Transforms the current dataset to have only subwindow containing the actual text to read.

◆ TextLabeledImagesIndexes

int [] eVision.EasyDeepLearning.EDataset.TextLabeledImagesIndexes
get

Gets a list of index corresponding to the images that have a text only label.

◆ TextOrientationDataset

eVision.EasyDeepLearning.EDataset eVision.EasyDeepLearning.EDataset.TextOrientationDataset
get

Transforms the current text dataset to duplicate it with half image flipped, adding corresponding ground truth.

◆ Width

uint eVision.EasyDeepLearning.EDataset.Width
get

Width of the region of interest of the first image added to the dataset.