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

eVision.EasyDeepLearning.EDataset manages a dataset of images. More...

Inheritance diagram for eVision.EasyDeepLearning.EDataset:

Public Member Functions

None __init__ (self)
 Constructs a eVision.EasyDeepLearning.EDataset object.
None __init__ (self, eVision.EasyDeepLearning.EDataset other)
 Copy constructor of a eVision.EasyDeepLearning.EDataset object.
None Load (self, str path)
 Loads a classification dataset from disk.
None Load (self, eVision.ESerializer|None serializer)
 Loads a classification dataset from disk.
None Save (self, str path)
 Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label.
None Save (self, eVision.ESerializer|None serializer)
 Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label.
None SaveWithRelativePath (self, str path)
 Saves the dataset with image paths relative to the directory in which the dataset file is saved.
None Export (self, str directory, eVision.EImageFileType fileType, int quality)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, eVision.EImageFileType fileType)
 Exports the dataset and its images to the given directory.
None Export (self, str directory)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, bool keepFilename, eVision.EImageFileType fileType, int quality)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, bool keepFilename, eVision.EImageFileType fileType)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, bool keepFilename)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, int width, int height, int channels, eVision.EImageFileType fileType, int quality)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, int width, int height, int channels, eVision.EImageFileType fileType)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, int width, int height, int channels)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, int width, int height, int channels, bool keepFilename, eVision.EImageFileType fileType, int quality)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, int width, int height, int channels, bool keepFilename, eVision.EImageFileType fileType)
 Exports the dataset and its images to the given directory.
None Export (self, str directory, int width, int height, int channels, bool keepFilename)
 Exports the dataset and its images to the given directory.
None Clear (self)
 Clears the dataset.
eVision.EasyDeepLearning.EImageAnnotationFormat GetAvailableImageAnnotationFormat (self, str imageFile)
 Image annotation file formats that are available next to the image file.
eVision.EasyDeepLearning.EImageAnnotationFormat GetAvailableImageAnnotationFormat (self, int imgId)
 Image annotation file formats that are available next to the image file.
None ImportYOLOTXTAnnotations (self, int imgId, str labelFile)
 Imports YOLO TXT annotations (for EasyLocate Bounding Box).
None ImportYOLOTXTAnnotations (self, str labelFile)
 Imports YOLO TXT annotations (for EasyLocate Bounding Box).
None ImportPascalVOCXMLAnnotations (self, int imgId)
 Imports Pascal VOC XML annotations (for EasyLocate Bounding Box).
None ImportPascalVOCXMLAnnotations (self)
 Imports Pascal VOC XML annotations (for EasyLocate Bounding Box).
int AddImage (self, str imagePath)
 Adds an image to the dataset.
int AddImage (self, str imagePath, str label)
 Adds an image to the dataset.
int AddImage (self, str imagePath, int originX, int originY, int width, int height, eVision.ERegion mask)
 Adds an image to the dataset.
int AddImage (self, str imagePath, int originX, int originY, int width, int height, eVision.ERegion mask, str label)
 Adds an image to the dataset.
int AddImage (self, eVision.EBaseROI img)
 Adds an image to the dataset.
int AddImage (self, eVision.EBaseROI img, str label)
 Adds an image to the dataset.
int AddImage (self, eVision.EBaseROI img, int originX, int originY, int width, int height, eVision.ERegion mask)
 Adds an image to the dataset.
int AddImage (self, eVision.EBaseROI img, int originX, int originY, int width, int height, eVision.ERegion mask, str label)
 Adds an image to the dataset.
int AddImages (self, str filter)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImages (self, str filter, str label)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImages (self, str 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 (self, str filter, int originX, int originY, int width, int height, eVision.ERegion mask, str label)
 Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
int AddImagesFromCSV (self, str csvFile, int imageColumn, int labelColumn, int skipLines, str 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 (self, str 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 (self, str 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 (self, str 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 (self, str 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.
None RemoveImage (self, int imgId)
 Removes the image at the given index.
int GetNumImagesForFile (self, str filePath)
 Get the number of images in the dataset that are associated with the given image file.
eVision.EBaseROI|None GetImageCopy (self, int index)
 Gets a copy of the i-th image of the dataset.
None GetImageCopy (self, int index, eVision.EBaseROI img)
 Gets a copy of the i-th image of the dataset.
str GetImagePath (self, int index)
 Gets the path of the i-th image of the dataset.
bool IsImageFile (self, int index)
 Whether the image is stored as a file path towards an image.
bool IsEmbeddedImage (self, int index)
 Whether the image is embedded into the dataset and is not a reference towards an image file.
str GetImageLabel (self, int index)
 Gets the label of the i-th image of the dataset.
None SetImageLabel (self, int index, str label)
 Sets the label of images in the dataset.
None SetImageLabel (self, str filter, str label)
 Sets the label of images in the dataset.
None UnsetImageLabel (self, int index)
 Unset the label of the given image of the dataset.
bool HasLabel (self, int index)
 Whether an image has a classification label.
list[int] GetImagesIndexesWithLabel (self, str label)
 Gets a list of index corresponding to the images associated with the given label.
list[int] GetImagesIndexesWithLabel (self, int labelIndex)
 Gets a list of index corresponding to the images associated with the given label.
None AddLabel (self, str label)
 Adds a label to the dataset.
str GetLabel (self, int i)
 Gets the i-th label of the dataset (starting from 0 to eVision.EasyDeepLearning.EDataset.NumLabels - 1).
None SetLabel (self, int index, str label)
 Sets the i-th label of the dataset (starting from 0 to eVision.EasyDeepLearning.EDataset.NumLabels - 1).
float GetLabelWeight (self, int index)
 Gets the weight associated to the i-th label of the dataset (starting from 0 to eVision.EasyDeepLearning.EDataset.NumLabels - 1).
None SetLabelWeight (self, int index, float weight)
 Sets the weight associated to the i-th label of the dataset (starting from 0 to eVision.EasyDeepLearning.EDataset.NumLabels - 1).
None SetLabelColor (self, int index, eVision.ERGBColor color)
 Sets the label color for a classification label.
eVision.ERGBColor GetLabelColor (self, int index)
 Gets the label color for a classification label.
None SetLabelOpacity (self, int index, int opacity)
 Sets the label opacity for a classification label.
int GetLabelOpacity (self, int index)
 Gets the label opacity for a classification label.
None RemoveLabel (self, str label)
 Removes a label from the dataset.
None RemoveLabel (self, int labelId)
 Removes a label from the dataset.
None SetSegmentationMap (self, int imageIndex, eVision.EROIBW16 segmentationMap)
 Sets the segmentation map of an image.
eVision.EImageBW16 GetSegmentationMap (self, int imageIndex)
 Gets the segmentation map of an image.
None UnsetSegmentation (self, int imageIndex)
 Unsets the segmentation of an image.
None ResetSegmentation (self, int imageIndex)
 Resets the segmentation of an image by setting all pixels to background.
None AddRegionToSegment (self, int imageIndex, int segmentationLabelIndex, eVision.ERegion region)
 Adds a region (see eVision.ERegion) to the given segment of an image.
None AddRegionToSegment (self, int imageIndex, str label, eVision.ERegion region)
 Adds a region (see eVision.ERegion) to the given segment of an image.
eVision.ERegion GetRegionForSegment (self, int imageIndex, int segmentationLabelIndex)
 Gets a region corresponding to the pixels of the given segment.
eVision.ERegion GetRegionForSegment (self, int imageIndex, str segmentationLabel)
 Gets a region corresponding to the pixels of the given segment.
int GetNumImagesForSegmentationLabel (self, int labelId)
 Number of images containing the given segmentation label.
int GetNumImagesForSegmentationLabel (self, str label)
 Number of images containing the given segmentation label.
int GetNumPixelsForSegmentationLabel (self, int labelId)
 Number of pixels assigned to the given segmentation label.
int GetNumPixelsForSegmentationLabel (self, str label)
 Number of pixels assigned to the given segmentation label.
bool HasSegmentation (self, int imageId)
 Whether the image has a segmentation.
bool HasForegroundSegments (self, int imageId)
 Whether the image segmentation contains segments that are not background.
int GetNumSegmentedBlobs (self, int imageId)
 Number of segmented blobs in the image for all non-background labels or for a specific label.
int GetNumSegmentedBlobs (self, int imageId, str label)
 Number of segmented blobs in the image for all non-background labels or for a specific label.
int GetNumSegmentedBlobs (self, int imageId, int labelId)
 Number of segmented blobs in the image for all non-background labels or for a specific label.
str GetSegmentationLabel (self, int index)
 Gets the segmentation label.
None SetSegmentationLabel (self, int index, str label)
 Sets the segmentation labels.
int AddSegmentationLabel (self, str label, float labelWeight)
 Adds a segmentation label.
int AddSegmentationLabel (self, str label)
 Adds a segmentation label.
None RemoveSegmentationLabel (self, str label)
 Remove a segmentation label.
None RemoveSegmentationLabel (self, int index)
 Remove a segmentation label.
float GetSegmentationLabelWeight (self, int index)
 Gets the segmentation label weights.
float GetSegmentationLabelWeight (self, str label)
 Gets the segmentation label weights.
None SetSegmentationLabelWeight (self, int index, float weight)
 Sets the segmentation label weight.
None SetSegmentationLabelWeight (self, str label, float weight)
 Sets the segmentation label weight.
None SetSegmentationLabelColor (self, int index, eVision.ERGBColor color)
 Sets the label color for a segmentation label.
eVision.ERGBColor GetSegmentationLabelColor (self, int index)
 Gets the label color for a segmentation label.
None SetSegmentationLabelOpacity (self, int index, int opacity)
 Sets the label opacity for a segmentation label.
int GetSegmentationLabelOpacity (self, int index)
 Gets the label opacity for a segmentation label.
None ResetImageObjectLabeling (self, int imageIndex)
 Resets the object labeling for the specified image.
None UnsetImageObjectLabeling (self, int imageIndex)
 Unsets the object labeling for the specified image.
list[eVision._eVision.EasyDeepLearning.ELocatorObject] GetImageObjects (self, int imageIndex)
 Gets all the objects of the specified image.
int GetImageNumObjects (self, int imageIndex)
 Number of objects for the specified image.
eVision.EasyDeepLearning.ELocatorObject GetImageObject (self, int imageIndex, int objectIndex)
 Gets the specified object for the given image.
None SetImageObject (self, int imageIndex, int objectIndex, eVision.EasyDeepLearning.ELocatorObject obj)
 Sets the specified object for the given image.
None SetImageObject (self, int imageIndex, int objectIndex, str label)
 Sets the specified object for the given image.
None SetImageObject (self, int imageIndex, int objectIndex, eVision.ERectangleRegion region)
 Sets the specified object for the given image.
None AddImageObject (self, int imageIndex, eVision.EasyDeepLearning.ELocatorObject obj)
 Adds an object to the image.
None AddImageObject (self, int imageIndex, str label, eVision.ERectangleRegion box)
 Adds an object to the image.
None RemoveImageObject (self, int imageIndex, int objectIndex)
 Removes an object from an image.
str GetObjectLabel (self, int labelIndex)
 Object label.
None SetObjectLabel (self, int labelIndex, str newLabel)
 Sets an object label.
None SetObjectLabel (self, str oldLabel, str newLabel)
 Sets an object label.
None AddObjectLabel (self, str label, float weight)
 Adds an object label.
None AddObjectLabel (self, str label)
 Adds an object label.
None RemoveObjectLabel (self, int labelIndex)
 Removes an object label.
None RemoveObjectLabel (self, str label)
 Removes an object label.
None SetObjectLabelWeight (self, int labelIndex, float weight)
 Sets the weight of an object label.
None SetObjectLabelWeight (self, str label, float weight)
 Sets the weight of an object label.
float GetObjectLabelWeight (self, int labelIndex)
 Gets the weight of an object label.
float GetObjectLabelWeight (self, str label)
 Gets the weight of an object label.
None SetObjectLabelColor (self, int index, eVision.ERGBColor color)
 Sets the label color for an object label.
eVision.ERGBColor GetObjectLabelColor (self, int index)
 Gets the label color for an object label.
None SetObjectLabelOpacity (self, int index, int opacity)
 Sets the label opacity for an object label.
int GetObjectLabelOpacity (self, int index)
 Gets the label opacity for an object label.
bool HasObjectLabeling (self, int imageIndex)
 Whether the image is labeled for object detection and use with eVision.EasyDeepLearning.ELocator.
int GetNumImagesWithObjectLabel (self, int labelIdx)
 Number of images that contain an object with the given label.
int GetNumImagesWithObjectLabel (self, str label)
 Number of images that contain an object with the given label.
int GetNumObjectsWithLabel (self, int labelIdx)
 Number of objects with the given label.
int GetNumObjectsWithLabel (self, str label)
 Number of objects with the given label.
bool HasOCRAnnotations (self, int imgId)
 Whether the specified image has OCR annotations.
None UnsetOCRAnnotations (self, int imgId)
 Unsets the OCR labeling for the specified image.
list[eVision._eVision.EasyDeepOCR.ETextLine] GetOCRAnnotations (self, int imgId)
 Ground truth text lines for the specified image.
None SetOCRAnnotations (self, int imgId, list[eVision._eVision.EasyDeepOCR.ETextLine] texts)
 Sets the ground truth text lines for the specified image.
None SplitDataset (self, 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.
None SplitDataset (self, eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2, float proportion)
 Splits the dataset in two parts to be used for training and validation respectively.
None SplitDataset (self, eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2)
 Splits the dataset in two parts to be used for training and validation respectively.
None SplitDatasetForSegmentation (self, eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2, float proportion, bool random)
 Splits the dataset in two parts for a supervised segmenter.
None SplitDatasetForSegmentation (self, eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2, float proportion)
 Splits the dataset in two parts for a supervised segmenter.
None SplitDatasetForSegmentation (self, eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2)
 Splits the dataset in two parts for a supervised segmenter.
None SplitDatasetForLocator (self, eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2, float proportion, bool random)
 Splits the dataset in two parts for training and validation of a eVision.EasyDeepLearning.ELocator tool.
None SplitDatasetForLocator (self, eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2, float proportion)
 Splits the dataset in two parts for training and validation of a eVision.EasyDeepLearning.ELocator tool.
None SplitDatasetForLocator (self, eVision.EasyDeepLearning.EDataset d1, eVision.EasyDeepLearning.EDataset d2)
 Splits the dataset in two parts for training and validation of a eVision.EasyDeepLearning.ELocator tool.
eVision.EasyDeepLearning.EDatasetSplit GetSplit (self, float trainingProportion, float validationPropotion, eVision.EasyDeepLearning.EDeepLearningToolType toolType, str goodLabel)
 Generates a split.
eVision.EasyDeepLearning.EDatasetSplit GetSplit (self, float trainingProportion, float validationPropotion, eVision.EasyDeepLearning.EDeepLearningToolType toolType, str goodLabel, int seed)
 Generates a split.
eVision.EasyDeepLearning.EDataset ExtractSplit (self, eVision.EasyDeepLearning.EDatasetSplit split, eVision.EasyDeepLearning.EDatasetType type)
 Creates a new eVision.EasyDeepLearning.EDataset containing only the images of the given split type.
None SetRegionOfInterest (self, int imageIndex, int xOrg, int yOrg, int width, int height)
 Sets the region of interest for the specified image.
int GetRegionOfInterestOriginX (self, int imageIndex)
 Region of interest origin abscissa for the specified image.
int GetRegionOfInterestOriginY (self, int imageIndex)
 Region of interest origin ordinate for the specified image.
int GetRegionOfInterestWidth (self, int imageIndex)
 Region of interest width for the specified image.
int GetRegionOfInterestHeight (self, int imageIndex)
 Region of interest height for the specified image.
eVision.ERegion GetMask (self, int imageIndex)
 Gets the mask region/don't care area for the given image.
None SetMask (self, int imageIndex, eVision.ERegion mask)
 Sets the mask region/don't care area for the given image.
int Width (self)
 Width of the region of interest of the first image added to the dataset.
int Height (self)
 Height of the region of interest of the first image added to the dataset.
int Channels (self)
 Number of channels of the first image added to the dataset.
int NumImages (self)
 Number of images in the dataset.
int NumImageFiles (self)
 Number of different image files contained in the dataset.
int NumLabeledImages (self)
 Number of images that have a classification label.
int NumUnlabeledImages (self)
 Number of images that doesn't have any classification label.
list[int] LabeledImagesIndexes (self)
 Gets a list of index corresponding to the images that have a classification label.
list[int] TextLabeledImagesIndexes (self)
 Gets a list of index corresponding to the images that have a text only label.
list[int] ImagesIndexesWithNoLabel (self)
 Gets a list of index corresponding to the images with no classification labels.
int NumLabels (self)
 Number of labels in the dataset.
int NumSegmentationLabels (self)
 Number of segmentation labels.
int NumImagesWithSegmentation (self)
 Number of images that have a ground truth segmentation.
int NumImagesWithoutSegmentation (self)
 Number of images that doesn't have a ground truth segmentation.
int NumImagesWithoutForegroundSegments (self)
 Number of images that have a ground truth segmentation that has no foreground segments and is thus entirely composed of background pixels.
int NumImagesWithForegroundSegments (self)
 Number of images that have a ground truth segmentation that has foreground segments and is this not entirely composed of background pixels.
int NumObjectLabels (self)
 Number of object labels.
int NumImagesWithObjectLabeling (self)
 Number of images in the dataset that are labeled for object detection.
int NumImagesWithoutObjectLabeling (self)
 Number of images in the dataset that are not labeled for object detection.
int NumImagesWithoutObjects (self)
 Number of images in the dataset that are labeled for object detection but have been associated with no object.
int NumImagesWithObjects (self)
 Number of images in the dataset that are labeled for object detection and have 1 or more objects.
float SameLabelMaxOverlap (self)
 Maximum overlap between objects with the same label in the dataset.
float AbsoluteMaxOverlap (self)
 Absolute maximum overlap between objects in the dataset.
int MaxNumObjectPerImage (self)
 Maximum number of objects for an image in the dataset.
int ObjectSize (self)
 Object size for EasyLocate Interest point.
 ObjectSize (self, int value)
 Object size for EasyLocate Interest point.
int NumImagesWithOCR (self)
 Number of images with OCR annotations.
int NumImagesWithoutOCR (self)
 Number of images without OCR annotations.
int NumTexts (self)
 Number of annotated texts in the dataset.
eVision.EasyDeepLearning.EDataset TextDataset (self)
 Transforms the current dataset to have only subwindow containing the actual text to read.
eVision.EasyDeepLearning.EDataset TextOrientationDataset (self)
 Transforms the current text dataset to duplicate it with half image flipped, adding corresponding ground truth.

Protected Member Functions

 _BasePath__setter (self, str value)
 Sets the base path for the images specified with a relative path.

Properties

 BasePath

Detailed Description

eVision.EasyDeepLearning.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 (eVision.EImageBW8), 16-bits monochrome (eVision.EImageBW16), and 24-bits color (eVision.EROIC24, eVision.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 eVision.EasyDeepLearning.EDataset.Width and eVision.EasyDeepLearning.EDataset.Height) that is used by deep learning tools that require the same input image size such as the eVision.EasyDeepLearning.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.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EasyDeepLearning.EDataset.__init__ ( self)

Constructs a eVision.EasyDeepLearning.EDataset object.

◆ __init__() [2/2]

None eVision.EasyDeepLearning.EDataset.__init__ ( self,
eVision.EasyDeepLearning.EDataset other )

Copy constructor of a eVision.EasyDeepLearning.EDataset object.

Parameters
otherReference to the eVision.EasyDeepLearning.EDataset object that should be copied

Member Function Documentation

◆ _BasePath__setter()

eVision.EasyDeepLearning.EDataset._BasePath__setter ( self,
str value )
protected

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

Remarks:

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

◆ AbsoluteMaxOverlap()

float eVision.EasyDeepLearning.EDataset.AbsoluteMaxOverlap ( self)

Absolute maximum overlap between objects in the dataset.

◆ AddImage() [1/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( self,
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 eVision.EasyDeepLearning.EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Remarks:

When adding eVision images (eVision.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.

Parameters
imgThe image

◆ AddImage() [2/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( self,
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 eVision.EasyDeepLearning.EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Remarks:

When adding eVision images (eVision.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.

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)

◆ AddImage() [3/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( self,
eVision.EBaseROI img,
int originX,
int originY,
int width,
int height,
eVision.ERegion mask,
str 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 eVision.EasyDeepLearning.EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Remarks:

When adding eVision images (eVision.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.

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

◆ AddImage() [4/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( self,
eVision.EBaseROI img,
str 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 eVision.EasyDeepLearning.EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Remarks:

When adding eVision images (eVision.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.

Parameters
imgThe image
labelThe label

◆ AddImage() [5/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( self,
str 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 eVision.EasyDeepLearning.EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Remarks:

When adding eVision images (eVision.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.

Parameters
imagePathThe path to an image

◆ AddImage() [6/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( self,
str 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 eVision.EasyDeepLearning.EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Remarks:

When adding eVision images (eVision.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.

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)

◆ AddImage() [7/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( self,
str imagePath,
int originX,
int originY,
int width,
int height,
eVision.ERegion mask,
str 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 eVision.EasyDeepLearning.EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Remarks:

When adding eVision images (eVision.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.

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

◆ AddImage() [8/8]

int eVision.EasyDeepLearning.EDataset.AddImage ( self,
str imagePath,
str 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 eVision.EasyDeepLearning.EDataset.NumImages - 1 and can be used to add, remove, or modify the annotations for the image.

Remarks:

When adding eVision images (eVision.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.

Parameters
imagePathThe path to an image
labelThe label

◆ AddImageObject() [1/2]

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

Adds an object to the image.

Remarks:

The image will be marked as labeled for object detection (eVision.EasyDeepLearning.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.

Parameters
imageIndexIndex of the image
objObject

◆ AddImageObject() [2/2]

None eVision.EasyDeepLearning.EDataset.AddImageObject ( self,
int imageIndex,
str label,
eVision.ERectangleRegion box )

Adds an object to the image.

Remarks:

The image will be marked as labeled for object detection (eVision.EasyDeepLearning.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.

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

◆ AddImages() [1/4]

int eVision.EasyDeepLearning.EDataset.AddImages ( self,
str 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.

Remarks:

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.

Parameters
filterA glob filter

◆ AddImages() [2/4]

int eVision.EasyDeepLearning.EDataset.AddImages ( self,
str 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.

Remarks:

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.

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

◆ AddImages() [3/4]

int eVision.EasyDeepLearning.EDataset.AddImages ( self,
str filter,
int originX,
int originY,
int width,
int height,
eVision.ERegion mask,
str 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.

Remarks:

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.

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.

◆ AddImages() [4/4]

int eVision.EasyDeepLearning.EDataset.AddImages ( self,
str filter,
str 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.

Remarks:

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.

Parameters
filterA glob filter
labelA label.

◆ AddImagesFromCSV() [1/5]

int eVision.EasyDeepLearning.EDataset.AddImagesFromCSV ( self,
str 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 ( self,
str 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 ( self,
str 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 ( self,
str 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 ( self,
str csvFile,
int imageColumn,
int labelColumn,
int skipLines,
str 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()

None eVision.EasyDeepLearning.EDataset.AddLabel ( self,
str label )

Adds a label to the dataset.

Parameters
labelName of the new label

◆ AddObjectLabel() [1/2]

None eVision.EasyDeepLearning.EDataset.AddObjectLabel ( self,
str label )

Adds an object label.

Parameters
labelLabel to add

◆ AddObjectLabel() [2/2]

None eVision.EasyDeepLearning.EDataset.AddObjectLabel ( self,
str label,
float weight )

Adds an object label.

Parameters
labelLabel to add
weightWeight of the label

◆ AddRegionToSegment() [1/2]

None eVision.EasyDeepLearning.EDataset.AddRegionToSegment ( self,
int imageIndex,
int segmentationLabelIndex,
eVision.ERegion region )

Adds a region (see eVision.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]

None eVision.EasyDeepLearning.EDataset.AddRegionToSegment ( self,
int imageIndex,
str label,
eVision.ERegion region )

Adds a region (see eVision.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 ( self,
str 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 ( self,
str 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

◆ Channels()

int eVision.EasyDeepLearning.EDataset.Channels ( self)

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

◆ Clear()

None eVision.EasyDeepLearning.EDataset.Clear ( self)

Clears the dataset.

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset.

◆ Export() [1/12]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
bool keepFilename )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
bool keepFilename,
eVision.EImageFileType fileType )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
bool keepFilename,
eVision.EImageFileType fileType,
int quality )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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 eVision.EBaseROI.SavePng, eVision.EBaseROI.SaveJpeg, or eVision.EBaseROI.SaveJpeg2K. A value of -1 means the default value.

◆ Export() [5/12]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
eVision.EImageFileType fileType )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
eVision.EImageFileType fileType,
int quality )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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 eVision.EBaseROI.SavePng, eVision.EBaseROI.SaveJpeg, or eVision.EBaseROI.SaveJpeg2K. A value of -1 means the default value.

◆ Export() [7/12]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
int width,
int height,
int channels )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
int width,
int height,
int channels,
bool keepFilename )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
int width,
int height,
int channels,
bool keepFilename,
eVision.EImageFileType fileType )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str 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 eVision.EasyDeepLearning.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 eVision.EBaseROI.SavePng, eVision.EBaseROI.SaveJpeg, or eVision.EBaseROI.SaveJpeg2K. A value of -1 means the default value.

◆ Export() [11/12]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
int width,
int height,
int channels,
eVision.EImageFileType fileType )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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]

None eVision.EasyDeepLearning.EDataset.Export ( self,
str directory,
int width,
int height,
int channels,
eVision.EImageFileType fileType,
int quality )

Exports the dataset and its images to the given directory.

  • A new eVision.EasyDeepLearning.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 eVision.EBaseROI.SavePng, eVision.EBaseROI.SaveJpeg, or eVision.EBaseROI.SaveJpeg2K. A value of -1 means the default value.

◆ ExtractSplit()

eVision.EasyDeepLearning.EDataset eVision.EasyDeepLearning.EDataset.ExtractSplit ( self,
eVision.EasyDeepLearning.EDatasetSplit split,
eVision.EasyDeepLearning.EDatasetType type )

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

Parameters
splitSplit
typeType of the split to extract

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset.

◆ GetAvailableImageAnnotationFormat() [1/2]

eVision.EasyDeepLearning.EImageAnnotationFormat eVision.EasyDeepLearning.EDataset.GetAvailableImageAnnotationFormat ( self,
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 ( self,
str imageFile )

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

Parameters
imageFilePath to an image file

◆ GetImageCopy() [1/2]

eVision.EBaseROI | None eVision.EasyDeepLearning.EDataset.GetImageCopy ( self,
int index )

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

Parameters
indexThe index of the image.

◆ GetImageCopy() [2/2]

None eVision.EasyDeepLearning.EDataset.GetImageCopy ( self,
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()

str eVision.EasyDeepLearning.EDataset.GetImageLabel ( self,
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 ( self,
int imageIndex )

Number of objects for the specified image.

Parameters
imageIndexIndex of the image

◆ GetImageObject()

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

Gets the specified object for the given image.

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

◆ GetImageObjects()

list[eVision._eVision.EasyDeepLearning.ELocatorObject] eVision.EasyDeepLearning.EDataset.GetImageObjects ( self,
int imageIndex )

Gets all the objects of the specified image.

Parameters
imageIndexIndex of the image

◆ GetImagePath()

str eVision.EasyDeepLearning.EDataset.GetImagePath ( self,
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]

list[int] eVision.EasyDeepLearning.EDataset.GetImagesIndexesWithLabel ( self,
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 eVision.EasyDeepLearning.EDataset.NumLabels - 1)

◆ GetImagesIndexesWithLabel() [2/2]

list[int] eVision.EasyDeepLearning.EDataset.GetImagesIndexesWithLabel ( self,
str label )

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

Parameters
labelThe label

◆ GetLabel()

str eVision.EasyDeepLearning.EDataset.GetLabel ( self,
int i )

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

Parameters
iLabel index

◆ GetLabelColor()

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

Gets the label color for a classification label.

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

◆ GetLabelOpacity()

int eVision.EasyDeepLearning.EDataset.GetLabelOpacity ( self,
int index )

Gets the label opacity for a classification label.

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

◆ GetLabelWeight()

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

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

Parameters
indexLabel index

◆ GetMask()

eVision.ERegion eVision.EasyDeepLearning.EDataset.GetMask ( self,
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 ( self,
str filePath )

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

Remarks:

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

Parameters
filePaththe path to the image.

◆ GetNumImagesForSegmentationLabel() [1/2]

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

Number of images containing the given segmentation label.

Parameters
labelIdIndex of the segmentation label

◆ GetNumImagesForSegmentationLabel() [2/2]

int eVision.EasyDeepLearning.EDataset.GetNumImagesForSegmentationLabel ( self,
str label )

Number of images containing the given segmentation label.

Parameters
labelSegmentation label

◆ GetNumImagesWithObjectLabel() [1/2]

int eVision.EasyDeepLearning.EDataset.GetNumImagesWithObjectLabel ( self,
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 ( self,
str label )

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

Parameters
labelLabel.

◆ GetNumObjectsWithLabel() [1/2]

int eVision.EasyDeepLearning.EDataset.GetNumObjectsWithLabel ( self,
int labelIdx )

Number of objects with the given label.

Parameters
labelIdxIndex of the object label.

◆ GetNumObjectsWithLabel() [2/2]

int eVision.EasyDeepLearning.EDataset.GetNumObjectsWithLabel ( self,
str label )

Number of objects with the given label.

Parameters
labelLabel.

◆ GetNumPixelsForSegmentationLabel() [1/2]

int eVision.EasyDeepLearning.EDataset.GetNumPixelsForSegmentationLabel ( self,
int labelId )

Number of pixels assigned to the given segmentation label.

Parameters
labelIdIndex of the segmentation label

◆ GetNumPixelsForSegmentationLabel() [2/2]

int eVision.EasyDeepLearning.EDataset.GetNumPixelsForSegmentationLabel ( self,
str label )

Number of pixels assigned to the given segmentation label.

Parameters
labelSegmentation label

◆ GetNumSegmentedBlobs() [1/3]

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

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

Remarks:

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

Parameters
imageIdImage index

◆ GetNumSegmentedBlobs() [2/3]

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

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

Remarks:

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

Parameters
imageIdImage index
labelIdLabel index

◆ GetNumSegmentedBlobs() [3/3]

int eVision.EasyDeepLearning.EDataset.GetNumSegmentedBlobs ( self,
int imageId,
str label )

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

Remarks:

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

Parameters
imageIdImage index
labelLabel

◆ GetObjectLabel()

str eVision.EasyDeepLearning.EDataset.GetObjectLabel ( self,
int labelIndex )

Object label.

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

◆ GetObjectLabelColor()

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

Gets the label color for an object label.

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

◆ GetObjectLabelOpacity()

int eVision.EasyDeepLearning.EDataset.GetObjectLabelOpacity ( self,
int index )

Gets the label opacity for an object label.

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

◆ GetObjectLabelWeight() [1/2]

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

Gets the weight of an object label.

Parameters
labelIndexIndex of the object label

◆ GetObjectLabelWeight() [2/2]

float eVision.EasyDeepLearning.EDataset.GetObjectLabelWeight ( self,
str label )

Gets the weight of an object label.

Parameters
labelLabel

◆ GetOCRAnnotations()

list[eVision._eVision.EasyDeepOCR.ETextLine] eVision.EasyDeepLearning.EDataset.GetOCRAnnotations ( self,
int imgId )

Ground truth text lines for the specified image.

Parameters
imgIdIndex of the image.

◆ GetRegionForSegment() [1/2]

eVision.ERegion eVision.EasyDeepLearning.EDataset.GetRegionForSegment ( self,
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 ( self,
int imageIndex,
str segmentationLabel )

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

Parameters
imageIndexImage index
segmentationLabelSegmentation label

◆ GetRegionOfInterestHeight()

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

Region of interest height for the specified image.

Parameters
imageIndexIndex of the image.

◆ GetRegionOfInterestOriginX()

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

Region of interest origin abscissa for the specified image.

Parameters
imageIndexIndex of the image.

◆ GetRegionOfInterestOriginY()

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

Region of interest origin ordinate for the specified image.

Parameters
imageIndexIndex of the image.

◆ GetRegionOfInterestWidth()

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

Region of interest width for the specified image.

Parameters
imageIndexIndex of the image.

◆ GetSegmentationLabel()

str eVision.EasyDeepLearning.EDataset.GetSegmentationLabel ( self,
int index )

Gets the segmentation label.

Remarks:

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

Parameters
indexIndex of the segmentation label

◆ GetSegmentationLabelColor()

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

Gets the label color for a segmentation label.

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

◆ GetSegmentationLabelOpacity()

int eVision.EasyDeepLearning.EDataset.GetSegmentationLabelOpacity ( self,
int index )

Gets the label opacity for a segmentation label.

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

◆ GetSegmentationLabelWeight() [1/2]

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

Gets the segmentation label weights.

Parameters
indexIndex of the segmentation label

◆ GetSegmentationLabelWeight() [2/2]

float eVision.EasyDeepLearning.EDataset.GetSegmentationLabelWeight ( self,
str label )

Gets the segmentation label weights.

Parameters
labelSegmentation label

◆ GetSegmentationMap()

eVision.EImageBW16 eVision.EasyDeepLearning.EDataset.GetSegmentationMap ( self,
int imageIndex )

Gets the segmentation map of an image.

The segmentation map is a 16-bit eVision.EROIBW16 image where the value of each pixel is equal to the corresponding segmentation label index (see eVision.EasyDeepLearning.EDataset.GetSegmentationLabel).

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

Parameters
imageIndexImage index

◆ GetSplit() [1/2]

eVision.EasyDeepLearning.EDatasetSplit eVision.EasyDeepLearning.EDataset.GetSplit ( self,
float trainingProportion,
float validationPropotion,
eVision.EasyDeepLearning.EDeepLearningToolType toolType,
str 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/2]

eVision.EasyDeepLearning.EDatasetSplit eVision.EasyDeepLearning.EDataset.GetSplit ( self,
float trainingProportion,
float validationPropotion,
eVision.EasyDeepLearning.EDeepLearningToolType toolType,
str goodLabel,
int 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

◆ HasForegroundSegments()

bool eVision.EasyDeepLearning.EDataset.HasForegroundSegments ( self,
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 ( self,
int index )

Whether an image has a classification label.

Parameters
indexIndex of an image.

◆ HasObjectLabeling()

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

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

Parameters
imageIndexIndex of the image

◆ HasOCRAnnotations()

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

Whether the specified image has OCR annotations.

Parameters
imgIdIndex of the image.

◆ HasSegmentation()

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

Whether the image has a segmentation.

Parameters
imageIdImage index

◆ Height()

int eVision.EasyDeepLearning.EDataset.Height ( self)

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

◆ ImagesIndexesWithNoLabel()

list[int] eVision.EasyDeepLearning.EDataset.ImagesIndexesWithNoLabel ( self)

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

◆ ImportPascalVOCXMLAnnotations() [1/2]

None eVision.EasyDeepLearning.EDataset.ImportPascalVOCXMLAnnotations ( self)

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]

None eVision.EasyDeepLearning.EDataset.ImportPascalVOCXMLAnnotations ( self,
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]

None eVision.EasyDeepLearning.EDataset.ImportYOLOTXTAnnotations ( self,
int imgId,
str 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]

None eVision.EasyDeepLearning.EDataset.ImportYOLOTXTAnnotations ( self,
str 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 ( self,
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 ( self,
int index )

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

Parameters
indexIndex of the image.

◆ LabeledImagesIndexes()

list[int] eVision.EasyDeepLearning.EDataset.LabeledImagesIndexes ( self)

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

◆ Load() [1/2]

None eVision.EasyDeepLearning.EDataset.Load ( self,
eVision.ESerializer | None serializer )

Loads a classification dataset from disk.

Parameters
serializerThe serializer.

◆ Load() [2/2]

None eVision.EasyDeepLearning.EDataset.Load ( self,
str path )

Loads a classification dataset from disk.

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

◆ MaxNumObjectPerImage()

int eVision.EasyDeepLearning.EDataset.MaxNumObjectPerImage ( self)

Maximum number of objects for an image in the dataset.

If no images has object labeling (see eVision.EasyDeepLearning.EDataset.HasObjectLabeling), the method returns -1.

◆ NumImageFiles()

int eVision.EasyDeepLearning.EDataset.NumImageFiles ( self)

Number of different image files contained in the dataset.

Remarks:

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 ( self)

Number of images in the dataset.

◆ NumImagesWithForegroundSegments()

int eVision.EasyDeepLearning.EDataset.NumImagesWithForegroundSegments ( self)

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 ( self)

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

◆ NumImagesWithObjects()

int eVision.EasyDeepLearning.EDataset.NumImagesWithObjects ( self)

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

◆ NumImagesWithOCR()

int eVision.EasyDeepLearning.EDataset.NumImagesWithOCR ( self)

Number of images with OCR annotations.

◆ NumImagesWithoutForegroundSegments()

int eVision.EasyDeepLearning.EDataset.NumImagesWithoutForegroundSegments ( self)

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 ( self)

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

◆ NumImagesWithoutObjects()

int eVision.EasyDeepLearning.EDataset.NumImagesWithoutObjects ( self)

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 ( self)

Number of images without OCR annotations.

◆ NumImagesWithoutSegmentation()

int eVision.EasyDeepLearning.EDataset.NumImagesWithoutSegmentation ( self)

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

◆ NumImagesWithSegmentation()

int eVision.EasyDeepLearning.EDataset.NumImagesWithSegmentation ( self)

Number of images that have a ground truth segmentation.

◆ NumLabeledImages()

int eVision.EasyDeepLearning.EDataset.NumLabeledImages ( self)

Number of images that have a classification label.

◆ NumLabels()

int eVision.EasyDeepLearning.EDataset.NumLabels ( self)

Number of labels in the dataset.

◆ NumObjectLabels()

int eVision.EasyDeepLearning.EDataset.NumObjectLabels ( self)

Number of object labels.

◆ NumSegmentationLabels()

int eVision.EasyDeepLearning.EDataset.NumSegmentationLabels ( self)

Number of segmentation labels.

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

◆ NumTexts()

int eVision.EasyDeepLearning.EDataset.NumTexts ( self)

Number of annotated texts in the dataset.

◆ NumUnlabeledImages()

int eVision.EasyDeepLearning.EDataset.NumUnlabeledImages ( self)

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

◆ ObjectSize() [1/2]

int eVision.EasyDeepLearning.EDataset.ObjectSize ( self)

Object size for EasyLocate Interest point.

◆ ObjectSize() [2/2]

eVision.EasyDeepLearning.EDataset.ObjectSize ( self,
int value )

Object size for EasyLocate Interest point.

◆ RemoveImage()

None eVision.EasyDeepLearning.EDataset.RemoveImage ( self,
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()

None eVision.EasyDeepLearning.EDataset.RemoveImageObject ( self,
int imageIndex,
int objectIndex )

Removes an object from an image.

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

◆ RemoveLabel() [1/2]

None eVision.EasyDeepLearning.EDataset.RemoveLabel ( self,
int labelId )

Removes a label from the dataset.

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

Parameters
labelIdIndex of the label to remove

◆ RemoveLabel() [2/2]

None eVision.EasyDeepLearning.EDataset.RemoveLabel ( self,
str label )

Removes a label from the dataset.

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

Parameters
labelName of the label to remove

◆ RemoveObjectLabel() [1/2]

None eVision.EasyDeepLearning.EDataset.RemoveObjectLabel ( self,
int labelIndex )

Removes an object label.

Parameters
labelIndexIndex of the object label to remove

◆ RemoveObjectLabel() [2/2]

None eVision.EasyDeepLearning.EDataset.RemoveObjectLabel ( self,
str label )

Removes an object label.

Parameters
labelLabel to remove

◆ RemoveSegmentationLabel() [1/2]

None eVision.EasyDeepLearning.EDataset.RemoveSegmentationLabel ( self,
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]

None eVision.EasyDeepLearning.EDataset.RemoveSegmentationLabel ( self,
str 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()

None eVision.EasyDeepLearning.EDataset.ResetImageObjectLabeling ( self,
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()

None eVision.EasyDeepLearning.EDataset.ResetSegmentation ( self,
int imageIndex )

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

Parameters
imageIndexImage index

◆ SameLabelMaxOverlap()

float eVision.EasyDeepLearning.EDataset.SameLabelMaxOverlap ( self)

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

◆ Save() [1/2]

None eVision.EasyDeepLearning.EDataset.Save ( self,
eVision.ESerializer | None serializer )

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

Remarks:

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

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

Parameters
serializerThe serializer.

◆ Save() [2/2]

None eVision.EasyDeepLearning.EDataset.Save ( self,
str path )

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

Remarks:

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

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

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

◆ SaveWithRelativePath()

None eVision.EasyDeepLearning.EDataset.SaveWithRelativePath ( self,
str path )

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

◆ SetImageLabel() [1/2]

None eVision.EasyDeepLearning.EDataset.SetImageLabel ( self,
int index,
str label )

Sets the label of images in the dataset.

Remarks:

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.

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

◆ SetImageLabel() [2/2]

None eVision.EasyDeepLearning.EDataset.SetImageLabel ( self,
str filter,
str label )

Sets the label of images in the dataset.

Remarks:

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.

Parameters
filterA glob filter
labelThe label

◆ SetImageObject() [1/3]

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

Sets the specified object for the given image.

Remarks:

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.

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

◆ SetImageObject() [2/3]

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

Sets the specified object for the given image.

Remarks:

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.

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

◆ SetImageObject() [3/3]

None eVision.EasyDeepLearning.EDataset.SetImageObject ( self,
int imageIndex,
int objectIndex,
str label )

Sets the specified object for the given image.

Remarks:

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.

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

◆ SetLabel()

None eVision.EasyDeepLearning.EDataset.SetLabel ( self,
int index,
str label )

Sets the i-th label of the dataset (starting from 0 to eVision.EasyDeepLearning.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()

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

Sets the label color for a classification label.

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

◆ SetLabelOpacity()

None eVision.EasyDeepLearning.EDataset.SetLabelOpacity ( self,
int index,
int opacity )

Sets the label opacity for a classification label.

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

◆ SetLabelWeight()

None eVision.EasyDeepLearning.EDataset.SetLabelWeight ( self,
int index,
float weight )

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

This operation does not add a new label.

Parameters
indexLabel index
weightWeight to be set

◆ SetMask()

None eVision.EasyDeepLearning.EDataset.SetMask ( self,
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]

None eVision.EasyDeepLearning.EDataset.SetObjectLabel ( self,
int labelIndex,
str newLabel )

Sets an object label.

Parameters
labelIndexIndex of the object label
newLabelNew label to be set

◆ SetObjectLabel() [2/2]

None eVision.EasyDeepLearning.EDataset.SetObjectLabel ( self,
str oldLabel,
str newLabel )

Sets an object label.

Parameters
oldLabelOld label to change
newLabelNew label to be set

◆ SetObjectLabelColor()

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

Sets the label color for an object label.

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

◆ SetObjectLabelOpacity()

None eVision.EasyDeepLearning.EDataset.SetObjectLabelOpacity ( self,
int index,
int opacity )

Sets the label opacity for an object label.

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

◆ SetObjectLabelWeight() [1/2]

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

Sets the weight of an object label.

Parameters
labelIndexIndex of the object label
weightNew weight

◆ SetObjectLabelWeight() [2/2]

None eVision.EasyDeepLearning.EDataset.SetObjectLabelWeight ( self,
str label,
float weight )

Sets the weight of an object label.

Parameters
labelLabel
weightNew weight

◆ SetOCRAnnotations()

None eVision.EasyDeepLearning.EDataset.SetOCRAnnotations ( self,
int imgId,
list[eVision._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()

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

Sets the region of interest for the specified image.

Remarks:

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

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

◆ SetSegmentationLabel()

None eVision.EasyDeepLearning.EDataset.SetSegmentationLabel ( self,
int index,
str label )

Sets the segmentation labels.

Remarks:

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

Parameters
indexIndex of the segmentation label
labelString representing the segmentation label

◆ SetSegmentationLabelColor()

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

Sets the label color for a segmentation label.

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

◆ SetSegmentationLabelOpacity()

None eVision.EasyDeepLearning.EDataset.SetSegmentationLabelOpacity ( self,
int index,
int opacity )

Sets the label opacity for a segmentation label.

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

◆ SetSegmentationLabelWeight() [1/2]

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

Sets the segmentation label weight.

Parameters
indexIndex of the segmentation label
weightWeight of the segmentation label

◆ SetSegmentationLabelWeight() [2/2]

None eVision.EasyDeepLearning.EDataset.SetSegmentationLabelWeight ( self,
str label,
float weight )

Sets the segmentation label weight.

Parameters
labelSegmentation label
weightWeight of the segmentation label

◆ SetSegmentationMap()

None eVision.EasyDeepLearning.EDataset.SetSegmentationMap ( self,
int imageIndex,
eVision.EROIBW16 segmentationMap )

Sets the segmentation map of an image.

The segmentation map is a 16-bit eVision.EROIBW16 image where the value of each pixel is equal to the corresponding segmentation label index (see eVision.EasyDeepLearning.EDataset.GetSegmentationLabel).

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

Parameters
imageIndexImage index
segmentationMapSegmentation map

◆ SplitDataset() [1/3]

None eVision.EasyDeepLearning.EDataset.SplitDataset ( self,
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

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ SplitDataset() [2/3]

None eVision.EasyDeepLearning.EDataset.SplitDataset ( self,
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

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ SplitDataset() [3/3]

None eVision.EasyDeepLearning.EDataset.SplitDataset ( self,
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.

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ SplitDatasetForLocator() [1/3]

None eVision.EasyDeepLearning.EDataset.SplitDatasetForLocator ( self,
eVision.EasyDeepLearning.EDataset d1,
eVision.EasyDeepLearning.EDataset d2 )

Splits the dataset in two parts for training and validation of a eVision.EasyDeepLearning.ELocator tool.

Images without object labeling are excluded from the split.

Remarks:

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.

Parameters
d1First part of the dataset
d2Second part of the dataset

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ SplitDatasetForLocator() [2/3]

None eVision.EasyDeepLearning.EDataset.SplitDatasetForLocator ( self,
eVision.EasyDeepLearning.EDataset d1,
eVision.EasyDeepLearning.EDataset d2,
float proportion )

Splits the dataset in two parts for training and validation of a eVision.EasyDeepLearning.ELocator tool.

Images without object labeling are excluded from the split.

Remarks:

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.

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

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ SplitDatasetForLocator() [3/3]

None eVision.EasyDeepLearning.EDataset.SplitDatasetForLocator ( self,
eVision.EasyDeepLearning.EDataset d1,
eVision.EasyDeepLearning.EDataset d2,
float proportion,
bool random )

Splits the dataset in two parts for training and validation of a eVision.EasyDeepLearning.ELocator tool.

Images without object labeling are excluded from the split.

Remarks:

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.

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.

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ SplitDatasetForSegmentation() [1/3]

None eVision.EasyDeepLearning.EDataset.SplitDatasetForSegmentation ( self,
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.

Remarks:

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.

Parameters
d1First part of the dataset
d2Second part of the dataset

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ SplitDatasetForSegmentation() [2/3]

None eVision.EasyDeepLearning.EDataset.SplitDatasetForSegmentation ( self,
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.

Remarks:

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.

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

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ SplitDatasetForSegmentation() [3/3]

None eVision.EasyDeepLearning.EDataset.SplitDatasetForSegmentation ( self,
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.

Remarks:

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.

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.

Reimplemented in eVision.EasyDeepLearning.EClassificationDataset, eVision.EasyDeepLearning.EClassificationDataset, and eVision.EasyDeepLearning.EClassificationDataset.

◆ TextDataset()

eVision.EasyDeepLearning.EDataset eVision.EasyDeepLearning.EDataset.TextDataset ( self)

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

◆ TextLabeledImagesIndexes()

list[int] eVision.EasyDeepLearning.EDataset.TextLabeledImagesIndexes ( self)

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

◆ TextOrientationDataset()

eVision.EasyDeepLearning.EDataset eVision.EasyDeepLearning.EDataset.TextOrientationDataset ( self)

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

◆ UnsetImageLabel()

None eVision.EasyDeepLearning.EDataset.UnsetImageLabel ( self,
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()

None eVision.EasyDeepLearning.EDataset.UnsetImageObjectLabeling ( self,
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 eVision.EasyDeepLearning.ELocator tool.

Parameters
imageIndexIndex of the image

◆ UnsetOCRAnnotations()

None eVision.EasyDeepLearning.EDataset.UnsetOCRAnnotations ( self,
int imgId )

Unsets the OCR labeling for the specified image.

Parameters
imgIdIndex of the image.

◆ UnsetSegmentation()

None eVision.EasyDeepLearning.EDataset.UnsetSegmentation ( self,
int imageIndex )

Unsets the segmentation of an image.

After this operation, the image will have no segmentation.

Parameters
imageIndexImage index

◆ Width()

int eVision.EasyDeepLearning.EDataset.Width ( self)

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

Property Documentation

◆ BasePath

eVision.EasyDeepLearning.EDataset.BasePath
static
Initial value:
= property(None, _BasePath__setter, None,
)