EDataset manages a dataset of images. More...
#include <eVision/EasyDeepLearning/EDataset.h>
Public Member Functions | |
| EDataset () | |
| Constructs a EDataset object. | |
| EDataset (const eVision::EasyDeepLearning::EDataset &other) | |
| Copy constructor of a EDataset object. | |
| virtual | ~EDataset () throw () |
| eVision::EasyDeepLearning::EDataset & | operator= (const eVision::EasyDeepLearning::EDataset &other) |
| Assignment operator. | |
| void | Load (const std::string &path) |
| Loads a classification dataset from disk. | |
| void | Load (eVision::ESerializer *serializer) |
| Loads a classification dataset from disk. | |
| void | Save (const std::string &path) |
| Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label. | |
| void | Save (eVision::ESerializer *serializer) |
| Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label. | |
| void | SaveWithRelativePath (const std::string &path) |
| Saves the dataset with image paths relative to the directory in which the dataset file is saved. | |
| void | SetBasePath (const std::string &basePath) |
| Sets the base path for the images specified with a relative path. | |
| void | Export (const std::string &directory, eVision::EImageFileType fileType, int quality) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, eVision::EImageFileType fileType) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, bool keepFilename, eVision::EImageFileType fileType, int quality) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, bool keepFilename, eVision::EImageFileType fileType) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, bool keepFilename) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, int width, int height, int channels, eVision::EImageFileType fileType, int quality) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, int width, int height, int channels, eVision::EImageFileType fileType) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, int width, int height, int channels) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, int width, int height, int channels, bool keepFilename, eVision::EImageFileType fileType, int quality) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, int width, int height, int channels, bool keepFilename, eVision::EImageFileType fileType) const |
| Exports the dataset and its images to the given directory. | |
| void | Export (const std::string &directory, int width, int height, int channels, bool keepFilename) const |
| Exports the dataset and its images to the given directory. | |
| virtual void | Clear () |
| Clears the dataset. | |
| uint32_t | GetWidth () const |
| Width of the region of interest of the first image added to the dataset. | |
| uint32_t | GetHeight () const |
| Height of the region of interest of the first image added to the dataset. | |
| uint32_t | GetChannels () const |
| Number of channels of the first image added to the dataset. | |
| eVision::EasyDeepLearning::EImageAnnotationFormat | GetAvailableImageAnnotationFormat (const std::string &imageFile) const |
| Image annotation file formats that are available next to the image file. | |
| eVision::EasyDeepLearning::EImageAnnotationFormat | GetAvailableImageAnnotationFormat (int imgId) const |
| Image annotation file formats that are available next to the image file. | |
| void | ImportYOLOTXTAnnotations (int imgId, const std::string &labelFile) |
| Imports YOLO TXT annotations (for EasyLocate Bounding Box). | |
| void | ImportYOLOTXTAnnotations (const std::string &labelFile) |
| Imports YOLO TXT annotations (for EasyLocate Bounding Box). | |
| void | ImportPascalVOCXMLAnnotations (int imgId) |
| Imports Pascal VOC XML annotations (for EasyLocate Bounding Box). | |
| void | ImportPascalVOCXMLAnnotations () |
| Imports Pascal VOC XML annotations (for EasyLocate Bounding Box). | |
| int | AddImage (const std::string &imagePath) |
| Adds an image to the dataset. | |
| int | AddImage (const std::string &imagePath, const std::string &label) |
| Adds an image to the dataset. | |
| int | AddImage (const std::string &imagePath, int originX, int originY, int width, int height, const eVision::ERegion &mask) |
| Adds an image to the dataset. | |
| int | AddImage (const std::string &imagePath, int originX, int originY, int width, int height, const eVision::ERegion &mask, const std::string &label) |
| Adds an image to the dataset. | |
| int | AddImage (const eVision::EBaseROI &img) |
| Adds an image to the dataset. | |
| int | AddImage (const eVision::EBaseROI &img, const std::string &label) |
| Adds an image to the dataset. | |
| int | AddImage (const eVision::EBaseROI &img, int originX, int originY, int width, int height, const eVision::ERegion &mask) |
| Adds an image to the dataset. | |
| int | AddImage (const eVision::EBaseROI &img, int originX, int originY, int width, int height, const eVision::ERegion &mask, const std::string &label) |
| Adds an image to the dataset. | |
| int | AddImages (const std::string &filter) |
| Adds all the images present in the directory specified by the parameter path and whose filename matches the filter. | |
| int | AddImages (const std::string &filter, const std::string &label) |
| Adds all the images present in the directory specified by the parameter path and whose filename matches the filter. | |
| int | AddImages (const std::string &filter, int originX, int originY, int width, int height, const eVision::ERegion &mask) |
| Adds all the images present in the directory specified by the parameter path and whose filename matches the filter. | |
| int | AddImages (const std::string &filter, int originX, int originY, int width, int height, const eVision::ERegion &mask, const std::string &label) |
| Adds all the images present in the directory specified by the parameter path and whose filename matches the filter. | |
| int | AddImagesFromCSV (const std::string &csvFile, int imageColumn, int labelColumn, int skipLines, const std::string &separator) |
| Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively. | |
| int | AddImagesFromCSV (const std::string &csvFile, int imageColumn, int labelColumn, int skipLines) |
| Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively. | |
| int | AddImagesFromCSV (const std::string &csvFile, int imageColumn, int labelColumn) |
| Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively. | |
| int | AddImagesFromCSV (const std::string &csvFile, int imageColumn) |
| Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively. | |
| int | AddImagesFromCSV (const std::string &csvFile) |
| Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively. | |
| void | RemoveImage (int imgId) |
| Removes the image at the given index. All annotations (label, segmentation, objects) will be lost. | |
| int | GetNumImages () const |
| Number of images in the dataset. | |
| int | GetNumImageFiles () const |
| Number of different image files contained in the dataset. | |
| int | GetNumImagesForFile (const std::string &filePath) const |
| Get the number of images in the dataset that are associated with the given image file. | |
| std::unique_ptr< eVision::EBaseROI > | GetImageCopy (int index) const |
| Gets a copy of the i-th image of the dataset. | |
| void | GetImageCopy (int index, eVision::EBaseROI &img) const |
| Gets a copy of the i-th image of the dataset. | |
| std::string | GetImagePath (int index) const |
| Gets the path of the i-th image of the dataset. If the image was not given using a path, the method will throw an exception. | |
| bool | IsImageFile (int index) const |
| Whether the image is stored as a file path towards an image. | |
| bool | IsEmbeddedImage (int index) const |
| Whether the image is embedded into the dataset and is not a reference towards an image file. | |
| std::string | GetImageLabel (int index) const |
| Gets the label of the i-th image of the dataset. An exception is thrown if the image has no classification label. | |
| void | SetImageLabel (int index, const std::string &label) |
| Sets the label of images in the dataset. | |
| void | SetImageLabel (const std::string &filter, const std::string &label) |
| Sets the label of images in the dataset. | |
| void | UnsetImageLabel (int index) |
| Unset the label of the given image of the dataset. After this operation, the given image will have no classification labels. | |
| bool | HasLabel (int index) const |
| Whether an image has a classification label. | |
| int | GetNumLabeledImages () const |
| Number of images that have a classification label. | |
| int | GetNumUnlabeledImages () const |
| Number of images that doesn't have any classification label. | |
| std::vector< uint32_t > | GetImagesIndexesWithLabel (const std::string &label) const |
| Gets a list of index corresponding to the images associated with the given label. | |
| std::vector< uint32_t > | GetImagesIndexesWithLabel (int labelIndex) const |
| Gets a list of index corresponding to the images associated with the given label. | |
| std::vector< int > | GetLabeledImagesIndexes () const |
| Gets a list of index corresponding to the images that have a classification label. | |
| std::vector< int > | GetTextLabeledImagesIndexes () const |
| Gets a list of index corresponding to the images that have a text only label. | |
| std::vector< int > | GetImagesIndexesWithNoLabel () const |
| Gets a list of index corresponding to the images with no classification labels. | |
| int | GetNumLabels () const |
| Number of labels in the dataset. | |
| void | AddLabel (const std::string &label) |
| Adds a label to the dataset. | |
| std::string | GetLabel (int i) const |
| Gets the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1). | |
| void | SetLabel (int index, const std::string &label) |
| Sets the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1). This operation does not add a new label to the dataset but simply renames an existing label. | |
| float | GetLabelWeight (int index) const |
| Gets the weight associated to the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1). | |
| void | SetLabelWeight (int index, const float &weight) |
| Sets the weight associated to the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1). This operation does not add a new label. | |
| void | SetLabelColor (int index, const eVision::ERGBColor &color) |
| Sets the label color for a classification label. | |
| eVision::ERGBColor | GetLabelColor (int index) const |
| Gets the label color for a classification label. | |
| void | SetLabelOpacity (int index, const uint8_t opacity) |
| Sets the label opacity for a classification label. | |
| uint8_t | GetLabelOpacity (int index) const |
| Gets the label opacity for a classification label. | |
| void | RemoveLabel (const std::string &label) |
| Removes a label from the dataset. | |
| void | RemoveLabel (int labelId) |
| Removes a label from the dataset. | |
| void | SetSegmentationMap (int imageIndex, const eVision::EROIBW16 &segmentationMap) |
| Sets the segmentation map of an image. The segmentation map is a 16-bit EROIBW16 image where the value of each pixel is equal to the corresponding segmentation label index (see EDataset::GetSegmentationLabel). | |
| eVision::EImageBW16 | GetSegmentationMap (int imageIndex) const |
| Gets the segmentation map of an image. The segmentation map is a 16-bit EROIBW16 image where the value of each pixel is equal to the corresponding segmentation label index (see EDataset::GetSegmentationLabel). | |
| void | UnsetSegmentation (int imageIndex) |
| Unsets the segmentation of an image. After this operation, the image will have no segmentation. | |
| void | ResetSegmentation (int imageIndex) |
| Resets the segmentation of an image by setting all pixels to background. | |
| void | AddRegionToSegment (int imageIndex, int segmentationLabelIndex, const eVision::ERegion ®ion) |
| Adds a region (see ERegion) to the given segment of an image. If, before this call, the image had no segmentation, the pixels not in the given region will be set to the background segmentation label. | |
| void | AddRegionToSegment (int imageIndex, const std::string &label, const eVision::ERegion ®ion) |
| Adds a region (see ERegion) to the given segment of an image. If, before this call, the image had no segmentation, the pixels not in the given region will be set to the background segmentation label. | |
| eVision::ERegion | GetRegionForSegment (int imageIndex, int segmentationLabelIndex) |
| Gets a region corresponding to the pixels of the given segment. | |
| eVision::ERegion | GetRegionForSegment (int imageIndex, const std::string &segmentationLabel) |
| Gets a region corresponding to the pixels of the given segment. | |
| int | GetNumSegmentationLabels () const |
| Number of segmentation labels. A dataset has always at least one segmentation label: "background". | |
| int | GetNumImagesForSegmentationLabel (int labelId) const |
| Number of images containing the given segmentation label. | |
| int | GetNumImagesForSegmentationLabel (const std::string &label) const |
| Number of images containing the given segmentation label. | |
| uint64_t | GetNumPixelsForSegmentationLabel (int labelId) const |
| Number of pixels assigned to the given segmentation label. | |
| uint64_t | GetNumPixelsForSegmentationLabel (const std::string &label) const |
| Number of pixels assigned to the given segmentation label. | |
| bool | HasSegmentation (int imageId) const |
| Whether the image has a segmentation. | |
| bool | HasForegroundSegments (int imageId) const |
| Whether the image segmentation contains segments that are not background. If the image has no segmentation, this method throws an exception. | |
| int | GetNumSegmentedBlobs (int imageId) const |
| Number of segmented blobs in the image for all non-background labels or for a specific label. | |
| int | GetNumSegmentedBlobs (int imageId, const std::string &label) const |
| Number of segmented blobs in the image for all non-background labels or for a specific label. | |
| int | GetNumSegmentedBlobs (int imageId, int labelId) const |
| Number of segmented blobs in the image for all non-background labels or for a specific label. | |
| std::string | GetSegmentationLabel (int index) const |
| Gets the segmentation label. | |
| void | SetSegmentationLabel (int index, const std::string &label) |
| Sets the segmentation labels. | |
| int | AddSegmentationLabel (const std::string &label, float labelWeight) |
| Adds a segmentation label. The index of the new segmentation labels is returned by the method. | |
| int | AddSegmentationLabel (const std::string &label) |
| Adds a segmentation label. The index of the new segmentation labels is returned by the method. | |
| void | RemoveSegmentationLabel (const std::string &label) |
| Remove a segmentation label. | |
| void | RemoveSegmentationLabel (int index) |
| Remove a segmentation label. | |
| float | GetSegmentationLabelWeight (int index) const |
| Gets the segmentation label weights. | |
| float | GetSegmentationLabelWeight (const std::string &label) const |
| Gets the segmentation label weights. | |
| void | SetSegmentationLabelWeight (int index, float weight) |
| Sets the segmentation label weight. | |
| void | SetSegmentationLabelWeight (const std::string &label, float weight) |
| Sets the segmentation label weight. | |
| void | SetSegmentationLabelColor (int index, const eVision::ERGBColor &color) |
| Sets the label color for a segmentation label. | |
| eVision::ERGBColor | GetSegmentationLabelColor (int index) const |
| Gets the label color for a segmentation label. | |
| void | SetSegmentationLabelOpacity (int index, const uint8_t opacity) |
| Sets the label opacity for a segmentation label. | |
| uint8_t | GetSegmentationLabelOpacity (int index) const |
| Gets the label opacity for a segmentation label. | |
| int | GetNumImagesWithSegmentation () const |
| Number of images that have a ground truth segmentation. | |
| int | GetNumImagesWithoutSegmentation () const |
| Number of images that doesn't have a ground truth segmentation. | |
| int | GetNumImagesWithoutForegroundSegments () const |
| Number of images that have a ground truth segmentation that has no foreground segments and is thus entirely composed of background pixels. | |
| int | GetNumImagesWithForegroundSegments () const |
| Number of images that have a ground truth segmentation that has foreground segments and is this not entirely composed of background pixels. | |
| void | ResetImageObjectLabeling (int imageIndex) |
| Resets the object labeling for the specified image. This sets the image as having been labeled for object detection with no object present in the image. | |
| void | UnsetImageObjectLabeling (int imageIndex) |
| Unsets the object labeling for the specified image. This sets the image as not having been labeled for object detection. This image won't be use for training with a ELocator tool. | |
| std::vector< eVision::EasyDeepLearning::ELocatorObject > | GetImageObjects (int imageIndex) const |
| Gets all the objects of the specified image. | |
| int | GetImageNumObjects (int imageIndex) const |
| Number of objects for the specified image. | |
| eVision::EasyDeepLearning::ELocatorObject | GetImageObject (int imageIndex, int objectIndex) const |
| Gets the specified object for the given image. | |
| void | SetImageObject (int imageIndex, int objectIndex, const eVision::EasyDeepLearning::ELocatorObject &obj) |
| Sets the specified object for the given image. | |
| void | SetImageObject (int imageIndex, int objectIndex, const std::string &label) |
| Sets the specified object for the given image. | |
| void | SetImageObject (int imageIndex, int objectIndex, const eVision::ERectangleRegion ®ion) |
| Sets the specified object for the given image. | |
| void | AddImageObject (int imageIndex, const eVision::EasyDeepLearning::ELocatorObject &obj) |
| Adds an object to the image. | |
| void | AddImageObject (int imageIndex, const std::string &label, const eVision::ERectangleRegion &box) |
| Adds an object to the image. | |
| void | RemoveImageObject (int imageIndex, int objectIndex) |
| Removes an object from an image. | |
| int | GetNumObjectLabels () const |
| Number of object labels. | |
| std::string | GetObjectLabel (int labelIndex) const |
| Object label. | |
| void | SetObjectLabel (int labelIndex, const std::string &newLabel) |
| Sets an object label. | |
| void | SetObjectLabel (const std::string &oldLabel, const std::string &newLabel) |
| Sets an object label. | |
| void | AddObjectLabel (const std::string &label, float weight) |
| Adds an object label. | |
| void | AddObjectLabel (const std::string &label) |
| Adds an object label. | |
| void | RemoveObjectLabel (int labelIndex) |
| Removes an object label. | |
| void | RemoveObjectLabel (const std::string &label) |
| Removes an object label. | |
| void | SetObjectLabelWeight (int labelIndex, float weight) |
| Sets the weight of an object label. | |
| void | SetObjectLabelWeight (const std::string &label, float weight) |
| Sets the weight of an object label. | |
| float | GetObjectLabelWeight (int labelIndex) const |
| Gets the weight of an object label. | |
| float | GetObjectLabelWeight (const std::string &label) const |
| Gets the weight of an object label. | |
| void | SetObjectLabelColor (int index, const eVision::ERGBColor &color) |
| Sets the label color for an object label. | |
| eVision::ERGBColor | GetObjectLabelColor (int index) const |
| Gets the label color for an object label. | |
| void | SetObjectLabelOpacity (int index, const uint8_t opacity) |
| Sets the label opacity for an object label. | |
| uint8_t | GetObjectLabelOpacity (int index) const |
| Gets the label opacity for an object label. | |
| bool | HasObjectLabeling (int imageIndex) const |
| Whether the image is labeled for object detection and use with ELocator. | |
| int | GetNumImagesWithObjectLabeling () const |
| Number of images in the dataset that are labeled for object detection. | |
| int | GetNumImagesWithoutObjectLabeling () const |
| Number of images in the dataset that are not labeled for object detection. | |
| int | GetNumImagesWithoutObjects () const |
| Number of images in the dataset that are labeled for object detection but have been associated with no object. | |
| int | GetNumImagesWithObjects () const |
| Number of images in the dataset that are labeled for object detection and have 1 or more objects. | |
| int | GetNumImagesWithObjectLabel (int labelIdx) const |
| Number of images that contain an object with the given label. | |
| int | GetNumImagesWithObjectLabel (const std::string &label) const |
| Number of images that contain an object with the given label. | |
| uint64_t | GetNumObjectsWithLabel (int labelIdx) const |
| Number of objects with the given label. | |
| uint64_t | GetNumObjectsWithLabel (const std::string &label) const |
| Number of objects with the given label. | |
| float | GetSameLabelMaxOverlap () const |
| Maximum overlap between objects with the same label in the dataset. | |
| float | GetAbsoluteMaxOverlap () const |
| Absolute maximum overlap between objects in the dataset. | |
| int | GetMaxNumObjectPerImage () const |
| Maximum number of objects for an image in the dataset. If no images has object labeling (see EDataset::HasObjectLabeling), the method returns -1. | |
| void | SetObjectSize (int objectSize) |
| Object size for EasyLocate Interest point. | |
| int | GetObjectSize () const |
| Object size for EasyLocate Interest point. | |
| bool | HasOCRAnnotations (int imgId) const |
| Whether the specified image has OCR annotations. | |
| void | UnsetOCRAnnotations (int imgId) |
| Unsets the OCR labeling for the specified image. | |
| std::vector< eVision::EasyDeepOCR::ETextLine > | GetOCRAnnotations (int imgId) const |
| Ground truth text lines for the specified image. | |
| void | SetOCRAnnotations (int imgId, const std::vector< eVision::EasyDeepOCR::ETextLine > &texts) |
| Sets the ground truth text lines for the specified image. | |
| int | GetNumImagesWithOCR () const |
| Number of images with OCR annotations. | |
| int | GetNumImagesWithoutOCR () const |
| Number of images without OCR annotations. | |
| int | GetNumTexts () const |
| Number of annotated texts in the dataset. | |
| eVision::EasyDeepLearning::EDataset | GetTextDataset () const |
| Transforms the current dataset to have only subwindow containing the actual text to read. | |
| eVision::EasyDeepLearning::EDataset | GetTextOrientationDataset () const |
| Transforms the current text dataset to duplicate it with half image flipped, adding corresponding ground truth. | |
| void | SplitDataset (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion, bool random) const |
| Splits the dataset in two parts to be used for training and validation respectively. | |
| void | SplitDataset (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion) const |
| Splits the dataset in two parts to be used for training and validation respectively. | |
| void | SplitDataset (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2) const |
| Splits the dataset in two parts to be used for training and validation respectively. | |
| void | SplitDatasetForSegmentation (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion, bool random) const |
| Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively. | |
| void | SplitDatasetForSegmentation (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion) const |
| Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively. | |
| void | SplitDatasetForSegmentation (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2) const |
| Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively. | |
| void | SplitDatasetForLocator (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion, bool random) const |
| Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split. | |
| void | SplitDatasetForLocator (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2, float proportion) const |
| Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split. | |
| void | SplitDatasetForLocator (eVision::EasyDeepLearning::EDataset &d1, eVision::EasyDeepLearning::EDataset &d2) const |
| Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split. | |
| eVision::EasyDeepLearning::EDatasetSplit | GetSplit (float trainingProportion, float validationPropotion, eVision::EasyDeepLearning::EDeepLearningToolType toolType, const std::string &goodLabel) const |
| Generates a split. | |
| eVision::EasyDeepLearning::EDatasetSplit | GetSplit (float trainingProportion, float validationPropotion, eVision::EasyDeepLearning::EDeepLearningToolType toolType, const std::string &goodLabel, uint32_t seed) const |
| Generates a split. | |
| eVision::EasyDeepLearning::EDatasetSplit | GetSplit (int numTrainingImages, int numValidationImages, eVision::EasyDeepLearning::EDeepLearningToolType toolType, const std::string &goodLabel) const |
| Generates a split. | |
| eVision::EasyDeepLearning::EDatasetSplit | GetSplit (int numTrainingImages, int numValidationImages, eVision::EasyDeepLearning::EDeepLearningToolType toolType, const std::string &goodLabel, uint32_t seed) const |
| Generates a split. | |
| eVision::EasyDeepLearning::EDataset | ExtractSplit (const eVision::EasyDeepLearning::EDatasetSplit &split, eVision::EasyDeepLearning::EDatasetType type) const |
| Creates a new EDataset containing only the images of the given split type. | |
| void | SetRegionOfInterest (int imageIndex, int xOrg, int yOrg, int width, int height) |
| Sets the region of interest for the specified image. | |
| int | GetRegionOfInterestOriginX (int imageIndex) const |
| Region of interest origin abscissa for the specified image. | |
| int | GetRegionOfInterestOriginY (int imageIndex) const |
| Region of interest origin ordinate for the specified image. | |
| int | GetRegionOfInterestWidth (int imageIndex) const |
| Region of interest width for the specified image. | |
| int | GetRegionOfInterestHeight (int imageIndex) const |
| Region of interest height for the specified image. | |
| eVision::ERegion | GetMask (int imageIndex) const |
| Gets the mask region/don't care area for the given image. The mask is defined with respect to the region of interest of the image. | |
| void | SetMask (int imageIndex, const eVision::ERegion &mask) |
| Sets the mask region/don't care area for the given image. The mask is defined with respect to the region of interest of the image. | |
| EDataset (CppWrapperInternal::InternalConstructor) | |
Public Attributes | |
| CppWrapperInternal::WrappedClass | wrappedClass_ |
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 and segmentation labels are entirely user defined. The set of segmentation labels will always contain at least the "Background" label representing pixels of the images that have no relevant information for your task (for example, in a defect segmentation application, the "Background" pixels would be the pixels without any defects).
For each type of labeling, an image can either be unlabeled or labeled. When an image in unlabeled for a given type of labeling, the image won't be used for training a deep learning tool that requires this type of labeling.
The image in the dataset can be stored as path to an image file or as an eVision image structure. Supported structures are 8-bits monochrome (EImageBW8), 16-bits monochrome (EImageBW16), and 24-bits color (EROIC24, EImageC24).
The dataset associates with each image a region of interest and a mask/don't care area. By default, the region of interest of an image is its full extent and its mask is empty.
A dataset can contain images with different sizes (with and height of their region of interest). However, the dataset has a default resolution (see EDataset::GetWidth and EDataset::GetHeight) that is used by deep learning tools that require the same input image size such as the EClassifier. When the images have different sizes, the default resolution will be the resolution of the region of interest of the first image added to the dataset.
License(s): BasicTypes
| eVision::EasyDeepLearning::EDataset::EDataset | ( | ) |
Constructs a EDataset object.
| eVision::EasyDeepLearning::EDataset::EDataset | ( | const eVision::EasyDeepLearning::EDataset & | other | ) |
|
virtual | ||||||||||||
| eVision::EasyDeepLearning::EDataset::EDataset | ( | CppWrapperInternal::InternalConstructor | ) |
| int eVision::EasyDeepLearning::EDataset::AddImage | ( | const eVision::EBaseROI & | img | ) |
Adds an image to the dataset.
The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).
By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns the index of the image in the dataset. This index is equal to EDataset::GetNumImages - 1 and can be used to add, remove, or modify the annotations for the image.
| img | The image |
When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.
When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.
| int eVision::EasyDeepLearning::EDataset::AddImage | ( | const eVision::EBaseROI & | img, |
| const std::string & | label ) |
Adds an image to the dataset.
The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).
By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns the index of the image in the dataset. This index is equal to EDataset::GetNumImages - 1 and can be used to add, remove, or modify the annotations for the image.
| img | The image |
| label | The label |
When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.
When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.
| int eVision::EasyDeepLearning::EDataset::AddImage | ( | const eVision::EBaseROI & | img, |
| int | originX, | ||
| int | originY, | ||
| int | width, | ||
| int | height, | ||
| const eVision::ERegion & | mask ) |
Adds an image to the dataset.
The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).
By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns the index of the image in the dataset. This index is equal to EDataset::GetNumImages - 1 and can be used to add, remove, or modify the annotations for the image.
| img | The image |
| originX | Region of interest origin abscissa |
| originY | Region of interest origin ordinate |
| width | Region of interest width |
| height | Region of interest height |
| mask | The mask for the image (with respect to the region of interest) |
When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.
When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.
| int eVision::EasyDeepLearning::EDataset::AddImage | ( | const eVision::EBaseROI & | img, |
| int | originX, | ||
| int | originY, | ||
| int | width, | ||
| int | height, | ||
| const eVision::ERegion & | mask, | ||
| const std::string & | label ) |
Adds an image to the dataset.
The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).
By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns the index of the image in the dataset. This index is equal to EDataset::GetNumImages - 1 and can be used to add, remove, or modify the annotations for the image.
| img | The image |
| originX | Region of interest origin abscissa |
| originY | Region of interest origin ordinate |
| width | Region of interest width |
| height | Region of interest height |
| mask | The mask for the image (with respect to the region of interest) |
| label | The label |
When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.
When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.
| int eVision::EasyDeepLearning::EDataset::AddImage | ( | const std::string & | imagePath | ) |
Adds an image to the dataset.
The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).
By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns the index of the image in the dataset. This index is equal to EDataset::GetNumImages - 1 and can be used to add, remove, or modify the annotations for the image.
| imagePath | The path to an image |
When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.
When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.
| int eVision::EasyDeepLearning::EDataset::AddImage | ( | const std::string & | imagePath, |
| const std::string & | label ) |
Adds an image to the dataset.
The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).
By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns the index of the image in the dataset. This index is equal to EDataset::GetNumImages - 1 and can be used to add, remove, or modify the annotations for the image.
| imagePath | The path to an image |
| label | The label |
When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.
When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.
| int eVision::EasyDeepLearning::EDataset::AddImage | ( | const std::string & | imagePath, |
| int | originX, | ||
| int | originY, | ||
| int | width, | ||
| int | height, | ||
| const eVision::ERegion & | mask ) |
Adds an image to the dataset.
The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).
By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns the index of the image in the dataset. This index is equal to EDataset::GetNumImages - 1 and can be used to add, remove, or modify the annotations for the image.
| imagePath | The path to an image |
| originX | Region of interest origin abscissa |
| originY | Region of interest origin ordinate |
| width | Region of interest width |
| height | Region of interest height |
| mask | The mask for the image (with respect to the region of interest) |
When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.
When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.
| int eVision::EasyDeepLearning::EDataset::AddImage | ( | const std::string & | imagePath, |
| int | originX, | ||
| int | originY, | ||
| int | width, | ||
| int | height, | ||
| const eVision::ERegion & | mask, | ||
| const std::string & | label ) |
Adds an image to the dataset.
The image can be specified by its path on the filesystem (parameter imagePath) or by an eVision image buffer (parameter img).
By default, an image will have no classification label and no segmentation. The label of the image can be directly specified when adding the image to the dataset. If the given label was not in the classification labels of the dataset, it will be automatically added to them.
If no region of interest and/or mask is specified, the region of interest of the image will be its full extent and its mask will be empty.
The method returns the index of the image in the dataset. This index is equal to EDataset::GetNumImages - 1 and can be used to add, remove, or modify the annotations for the image.
| imagePath | The path to an image |
| originX | Region of interest origin abscissa |
| originY | Region of interest origin ordinate |
| width | Region of interest width |
| height | Region of interest height |
| mask | The mask for the image (with respect to the region of interest) |
| label | The label |
When adding eVision images (EBaseROI) to a dataset, the dataset will retain a copy of the image.
When specifying an individual region of interest and/or mask, the dataset will retain a copy of these.
| void eVision::EasyDeepLearning::EDataset::AddImageObject | ( | int | imageIndex, |
| const eVision::EasyDeepLearning::ELocatorObject & | obj ) |
Adds an object to the image.
| imageIndex | Index of the image |
| obj | Object |
The image will be marked as labeled for object detection (EDataset::HasObjectLabeling equals to true) after a call to this method.
The object must be located at least partially within the region of interest of the image. Otherwise, when the object is completely outside of the region of interest, an exception will be thrown.
If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.
| void eVision::EasyDeepLearning::EDataset::AddImageObject | ( | int | imageIndex, |
| const std::string & | label, | ||
| const eVision::ERectangleRegion & | box ) |
Adds an object to the image.
| imageIndex | Index of the image |
| label | Label of the object |
| box | Axis-aligned rectangle |
The image will be marked as labeled for object detection (EDataset::HasObjectLabeling equals to true) after a call to this method.
The object must be located at least partially within the region of interest of the image. Otherwise, when the object is completely outside of the region of interest, an exception will be thrown.
If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.
| int eVision::EasyDeepLearning::EDataset::AddImages | ( | const std::string & | filter | ) |
Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
By default, all the images will have no classification label and no classification. However, a label can be directly specified for all of the images.
The method returns the number of images added to the dataset.
| filter | A glob filter |
The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.
| int eVision::EasyDeepLearning::EDataset::AddImages | ( | const std::string & | filter, |
| const std::string & | label ) |
Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
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.
| filter | A glob filter |
| label | A label. |
The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.
| int eVision::EasyDeepLearning::EDataset::AddImages | ( | const std::string & | filter, |
| int | originX, | ||
| int | originY, | ||
| int | width, | ||
| int | height, | ||
| const eVision::ERegion & | mask ) |
Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
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.
| filter | A glob filter |
| originX | Region of interest origin abscissa |
| originY | Region of interest origin ordinate |
| width | Region of interest width |
| height | Region of interest height |
| mask | The mask for the images |
The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.
| int eVision::EasyDeepLearning::EDataset::AddImages | ( | const std::string & | filter, |
| int | originX, | ||
| int | originY, | ||
| int | width, | ||
| int | height, | ||
| const eVision::ERegion & | mask, | ||
| const std::string & | label ) |
Adds all the images present in the directory specified by the parameter path and whose filename matches the filter.
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.
| filter | A glob filter |
| originX | Region of interest origin abscissa |
| originY | Region of interest origin ordinate |
| width | Region of interest width |
| height | Region of interest height |
| mask | The mask for the images |
| label | A label. |
The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.
| int eVision::EasyDeepLearning::EDataset::AddImagesFromCSV | ( | const std::string & | csvFile | ) |
Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
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.
| int eVision::EasyDeepLearning::EDataset::AddImagesFromCSV | ( | const std::string & | csvFile, |
| int | imageColumn ) |
Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
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.
| int eVision::EasyDeepLearning::EDataset::AddImagesFromCSV | ( | const std::string & | csvFile, |
| int | imageColumn, | ||
| int | labelColumn ) |
Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
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.
| int eVision::EasyDeepLearning::EDataset::AddImagesFromCSV | ( | const std::string & | csvFile, |
| int | imageColumn, | ||
| int | labelColumn, | ||
| int | skipLines ) |
Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
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.
| int eVision::EasyDeepLearning::EDataset::AddImagesFromCSV | ( | const std::string & | csvFile, |
| int | imageColumn, | ||
| int | labelColumn, | ||
| int | skipLines, | ||
| const std::string & | separator ) |
Adds images using a CSV (Comma Separated Value) file where each row correspond to an image and the file path and label of each image is given in the columns imageColumn and labelColumn respectively.
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.
| void eVision::EasyDeepLearning::EDataset::AddLabel | ( | const std::string & | label | ) |
Adds a label to the dataset.
| label | Name of the new label |
| void eVision::EasyDeepLearning::EDataset::AddObjectLabel | ( | const std::string & | label | ) |
Adds an object label.
| label | Label to add |
| void eVision::EasyDeepLearning::EDataset::AddObjectLabel | ( | const std::string & | label, |
| float | weight ) |
Adds an object label.
| label | Label to add |
| weight | Weight of the label |
| void eVision::EasyDeepLearning::EDataset::AddRegionToSegment | ( | int | imageIndex, |
| const std::string & | label, | ||
| const eVision::ERegion & | region ) |
Adds a region (see ERegion) to the given segment of an image. If, before this call, the image had no segmentation, the pixels not in the given region will be set to the background segmentation label.
| imageIndex | Image index |
| label | Segmentation label |
| region | Region to add |
| void eVision::EasyDeepLearning::EDataset::AddRegionToSegment | ( | int | imageIndex, |
| int | segmentationLabelIndex, | ||
| const eVision::ERegion & | region ) |
Adds a region (see ERegion) to the given segment of an image. If, before this call, the image had no segmentation, the pixels not in the given region will be set to the background segmentation label.
| imageIndex | Image index |
| segmentationLabelIndex | Segmentation label index |
| region | Region to add |
| int eVision::EasyDeepLearning::EDataset::AddSegmentationLabel | ( | const std::string & | label | ) |
Adds a segmentation label. The index of the new segmentation labels is returned by the method.
| label | Name of the segmentation label |
| int eVision::EasyDeepLearning::EDataset::AddSegmentationLabel | ( | const std::string & | label, |
| float | labelWeight ) |
Adds a segmentation label. The index of the new segmentation labels is returned by the method.
| label | Name of the segmentation label |
| labelWeight | Weight of the segmentation label |
|
virtual |
Clears the dataset.
Reimplemented in eVision::EasyDeepLearning::EClassificationDataset.
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory | ) | const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| bool | keepFilename ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| keepFilename | Keep the original filename of the images |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| bool | keepFilename, | ||
| eVision::EImageFileType | fileType ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| keepFilename | Keep the original filename of the images |
| fileType | File type for the exported file. If EImageFileType_Auto, the same file type as the original image is used. |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| bool | keepFilename, | ||
| eVision::EImageFileType | fileType, | ||
| int | quality ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| keepFilename | Keep the original filename of the images |
| fileType | File type for the exported file. If EImageFileType_Auto, the same file type as the original image is used. |
| quality | Quality or compression parameters for EBaseROI::SavePng, EBaseROI::SaveJpeg, or EBaseROI::SaveJpeg2K. A value of -1 means the default value. |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| eVision::EImageFileType | fileType ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| fileType | File type for the exported file. If EImageFileType_Auto, the same file type as the original image is used. |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| eVision::EImageFileType | fileType, | ||
| int | quality ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| fileType | File type for the exported file. If EImageFileType_Auto, the same file type as the original image is used. |
| quality | Quality or compression parameters for EBaseROI::SavePng, EBaseROI::SaveJpeg, or EBaseROI::SaveJpeg2K. A value of -1 means the default value. |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| int | width, | ||
| int | height, | ||
| int | channels ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| width | Width of the image. |
| height | Height of the image. |
| channels | Number of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively). |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| bool | keepFilename ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| width | Width of the image. |
| height | Height of the image. |
| channels | Number of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively). |
| keepFilename | Keep the original filename of the images |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| bool | keepFilename, | ||
| eVision::EImageFileType | fileType ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| width | Width of the image. |
| height | Height of the image. |
| channels | Number of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively). |
| keepFilename | Keep the original filename of the images |
| fileType | File type for the exported file. If EImageFileType_Auto, the same file type as the original image is used. |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| bool | keepFilename, | ||
| eVision::EImageFileType | fileType, | ||
| int | quality ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| width | Width of the image. |
| height | Height of the image. |
| channels | Number of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively). |
| keepFilename | Keep the original filename of the images |
| fileType | File type for the exported file. If EImageFileType_Auto, the same file type as the original image is used. |
| quality | Quality or compression parameters for EBaseROI::SavePng, EBaseROI::SaveJpeg, or EBaseROI::SaveJpeg2K. A value of -1 means the default value. |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| eVision::EImageFileType | fileType ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| width | Width of the image. |
| height | Height of the image. |
| channels | Number of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively). |
| fileType | File type for the exported file. If EImageFileType_Auto, the same file type as the original image is used. |
| void eVision::EasyDeepLearning::EDataset::Export | ( | const std::string & | directory, |
| int | width, | ||
| int | height, | ||
| int | channels, | ||
| eVision::EImageFileType | fileType, | ||
| int | quality ) const |
Exports the dataset and its images to the given directory.
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.
| directory | A string containing the full path to the directory. |
| width | Width of the image. |
| height | Height of the image. |
| channels | Number of channels of the image (only 1 and 3 are valid, for grayscale and RGB respectively). |
| fileType | File type for the exported file. If EImageFileType_Auto, the same file type as the original image is used. |
| quality | Quality or compression parameters for EBaseROI::SavePng, EBaseROI::SaveJpeg, or EBaseROI::SaveJpeg2K. A value of -1 means the default value. |
| eVision::EasyDeepLearning::EDataset eVision::EasyDeepLearning::EDataset::ExtractSplit | ( | const eVision::EasyDeepLearning::EDatasetSplit & | split, |
| eVision::EasyDeepLearning::EDatasetType | type ) const |
Creates a new EDataset containing only the images of the given split type.
| split | Split |
| type | Type of the split to extract |
| float eVision::EasyDeepLearning::EDataset::GetAbsoluteMaxOverlap | ( | ) | const |
Absolute maximum overlap between objects in the dataset.
| eVision::EasyDeepLearning::EImageAnnotationFormat eVision::EasyDeepLearning::EDataset::GetAvailableImageAnnotationFormat | ( | const std::string & | imageFile | ) | const |
Image annotation file formats that are available next to the image file.
| imageFile | Path to an image file |
| eVision::EasyDeepLearning::EImageAnnotationFormat eVision::EasyDeepLearning::EDataset::GetAvailableImageAnnotationFormat | ( | int | imgId | ) | const |
Image annotation file formats that are available next to the image file.
| imgId | Index of an image |
| uint32_t eVision::EasyDeepLearning::EDataset::GetChannels | ( | ) | const |
Number of channels of the first image added to the dataset.
| uint32_t eVision::EasyDeepLearning::EDataset::GetHeight | ( | ) | const |
Height of the region of interest of the first image added to the dataset.
| std::unique_ptr< eVision::EBaseROI > eVision::EasyDeepLearning::EDataset::GetImageCopy | ( | int | index | ) | const |
Gets a copy of the i-th image of the dataset.
| index | The index of the image. |
| void eVision::EasyDeepLearning::EDataset::GetImageCopy | ( | int | index, |
| eVision::EBaseROI & | img ) const |
Gets a copy of the i-th image of the dataset.
| index | The index of the image. |
| img | Image object to copy the image into. |
| std::string eVision::EasyDeepLearning::EDataset::GetImageLabel | ( | int | index | ) | const |
Gets the label of the i-th image of the dataset. An exception is thrown if the image has no classification label.
| index | The index of the image for which to get the label. |
| int eVision::EasyDeepLearning::EDataset::GetImageNumObjects | ( | int | imageIndex | ) | const |
Number of objects for the specified image.
| imageIndex | Index of the image |
| eVision::EasyDeepLearning::ELocatorObject eVision::EasyDeepLearning::EDataset::GetImageObject | ( | int | imageIndex, |
| int | objectIndex ) const |
Gets the specified object for the given image.
| imageIndex | Index of the image |
| objectIndex | Index of the object between 0 and EDataset::GetImageNumObjects |
| std::vector< eVision::EasyDeepLearning::ELocatorObject > eVision::EasyDeepLearning::EDataset::GetImageObjects | ( | int | imageIndex | ) | const |
Gets all the objects of the specified image.
| imageIndex | Index of the image |
| std::string eVision::EasyDeepLearning::EDataset::GetImagePath | ( | int | index | ) | const |
Gets the path of the i-th image of the dataset. If the image was not given using a path, the method will throw an exception.
| index | The index of the image for which to get the path. |
| std::vector< uint32_t > eVision::EasyDeepLearning::EDataset::GetImagesIndexesWithLabel | ( | const std::string & | label | ) | const |
Gets a list of index corresponding to the images associated with the given label.
| label | The label |
| std::vector< uint32_t > eVision::EasyDeepLearning::EDataset::GetImagesIndexesWithLabel | ( | int | labelIndex | ) | const |
Gets a list of index corresponding to the images associated with the given label.
| labelIndex | The index of the label (starting from 0 to EDataset::GetNumLabels - 1) |
| std::vector< int > eVision::EasyDeepLearning::EDataset::GetImagesIndexesWithNoLabel | ( | ) | const |
Gets a list of index corresponding to the images with no classification labels.
| std::string eVision::EasyDeepLearning::EDataset::GetLabel | ( | int | i | ) | const |
Gets the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1).
| i | Label index |
| eVision::ERGBColor eVision::EasyDeepLearning::EDataset::GetLabelColor | ( | int | index | ) | const |
Gets the label color for a classification label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| std::vector< int > eVision::EasyDeepLearning::EDataset::GetLabeledImagesIndexes | ( | ) | const |
Gets a list of index corresponding to the images that have a classification label.
| uint8_t eVision::EasyDeepLearning::EDataset::GetLabelOpacity | ( | int | index | ) | const |
Gets the label opacity for a classification label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| float eVision::EasyDeepLearning::EDataset::GetLabelWeight | ( | int | index | ) | const |
Gets the weight associated to the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1).
| index | Label index |
| eVision::ERegion eVision::EasyDeepLearning::EDataset::GetMask | ( | int | imageIndex | ) | const |
Gets the mask region/don't care area for the given image. The mask is defined with respect to the region of interest of the image.
| imageIndex | Index of the image for which to get the mask region |
| int eVision::EasyDeepLearning::EDataset::GetMaxNumObjectPerImage | ( | ) | const |
Maximum number of objects for an image in the dataset. If no images has object labeling (see EDataset::HasObjectLabeling), the method returns -1.
| int eVision::EasyDeepLearning::EDataset::GetNumImageFiles | ( | ) | const |
Number of different image files contained in the dataset.
The number of image files can be different than the number of images of the dataset. An image file can correspond to several dataset images (with different ROI).
| int eVision::EasyDeepLearning::EDataset::GetNumImages | ( | ) | const |
Number of images in the dataset.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesForFile | ( | const std::string & | filePath | ) | const |
Get the number of images in the dataset that are associated with the given image file.
| filePath | the path to the image. |
The number of image files can be different than the number of images of the dataset. An image file can correspond to several dataset images (with different ROI).
| int eVision::EasyDeepLearning::EDataset::GetNumImagesForSegmentationLabel | ( | const std::string & | label | ) | const |
Number of images containing the given segmentation label.
| label | Segmentation label |
| int eVision::EasyDeepLearning::EDataset::GetNumImagesForSegmentationLabel | ( | int | labelId | ) | const |
Number of images containing the given segmentation label.
| labelId | Index of the segmentation label |
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithForegroundSegments | ( | ) | const |
Number of images that have a ground truth segmentation that has foreground segments and is this not entirely composed of background pixels.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithObjectLabel | ( | const std::string & | label | ) | const |
Number of images that contain an object with the given label.
| label | Label. |
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithObjectLabel | ( | int | labelIdx | ) | const |
Number of images that contain an object with the given label.
| labelIdx | Index of the object label. |
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithObjectLabeling | ( | ) | const |
Number of images in the dataset that are labeled for object detection.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithObjects | ( | ) | const |
Number of images in the dataset that are labeled for object detection and have 1 or more objects.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithOCR | ( | ) | const |
Number of images with OCR annotations.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithoutForegroundSegments | ( | ) | const |
Number of images that have a ground truth segmentation that has no foreground segments and is thus entirely composed of background pixels.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithoutObjectLabeling | ( | ) | const |
Number of images in the dataset that are not labeled for object detection.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithoutObjects | ( | ) | const |
Number of images in the dataset that are labeled for object detection but have been associated with no object.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithoutOCR | ( | ) | const |
Number of images without OCR annotations.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithoutSegmentation | ( | ) | const |
Number of images that doesn't have a ground truth segmentation.
| int eVision::EasyDeepLearning::EDataset::GetNumImagesWithSegmentation | ( | ) | const |
Number of images that have a ground truth segmentation.
| int eVision::EasyDeepLearning::EDataset::GetNumLabeledImages | ( | ) | const |
Number of images that have a classification label.
| int eVision::EasyDeepLearning::EDataset::GetNumLabels | ( | ) | const |
Number of labels in the dataset.
| int eVision::EasyDeepLearning::EDataset::GetNumObjectLabels | ( | ) | const |
Number of object labels.
| uint64_t eVision::EasyDeepLearning::EDataset::GetNumObjectsWithLabel | ( | const std::string & | label | ) | const |
Number of objects with the given label.
| label | Label. |
| uint64_t eVision::EasyDeepLearning::EDataset::GetNumObjectsWithLabel | ( | int | labelIdx | ) | const |
Number of objects with the given label.
| labelIdx | Index of the object label. |
| uint64_t eVision::EasyDeepLearning::EDataset::GetNumPixelsForSegmentationLabel | ( | const std::string & | label | ) | const |
Number of pixels assigned to the given segmentation label.
| label | Segmentation label |
| uint64_t eVision::EasyDeepLearning::EDataset::GetNumPixelsForSegmentationLabel | ( | int | labelId | ) | const |
Number of pixels assigned to the given segmentation label.
| labelId | Index of the segmentation label |
| int eVision::EasyDeepLearning::EDataset::GetNumSegmentationLabels | ( | ) | const |
Number of segmentation labels. A dataset has always at least one segmentation label: "background".
| int eVision::EasyDeepLearning::EDataset::GetNumSegmentedBlobs | ( | int | imageId | ) | const |
Number of segmented blobs in the image for all non-background labels or for a specific label.
| imageId | Image index |
A segmented blob is a contiguous area assigned to a label different than "Background".
| int eVision::EasyDeepLearning::EDataset::GetNumSegmentedBlobs | ( | int | imageId, |
| const std::string & | label ) const |
Number of segmented blobs in the image for all non-background labels or for a specific label.
| imageId | Image index |
| label | Label |
A segmented blob is a contiguous area assigned to a label different than "Background".
| int eVision::EasyDeepLearning::EDataset::GetNumSegmentedBlobs | ( | int | imageId, |
| int | labelId ) const |
Number of segmented blobs in the image for all non-background labels or for a specific label.
| imageId | Image index |
| labelId | Label index |
A segmented blob is a contiguous area assigned to a label different than "Background".
| int eVision::EasyDeepLearning::EDataset::GetNumTexts | ( | ) | const |
Number of annotated texts in the dataset.
| int eVision::EasyDeepLearning::EDataset::GetNumUnlabeledImages | ( | ) | const |
Number of images that doesn't have any classification label.
| std::string eVision::EasyDeepLearning::EDataset::GetObjectLabel | ( | int | labelIndex | ) | const |
Object label.
| labelIndex | Index of the object label between 0 and EDataset::GetNumObjectLabels |
| eVision::ERGBColor eVision::EasyDeepLearning::EDataset::GetObjectLabelColor | ( | int | index | ) | const |
Gets the label color for an object label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| uint8_t eVision::EasyDeepLearning::EDataset::GetObjectLabelOpacity | ( | int | index | ) | const |
Gets the label opacity for an object label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| float eVision::EasyDeepLearning::EDataset::GetObjectLabelWeight | ( | const std::string & | label | ) | const |
Gets the weight of an object label.
| label | Label |
| float eVision::EasyDeepLearning::EDataset::GetObjectLabelWeight | ( | int | labelIndex | ) | const |
Gets the weight of an object label.
| labelIndex | Index of the object label |
| int eVision::EasyDeepLearning::EDataset::GetObjectSize | ( | ) | const |
Object size for EasyLocate Interest point.
| std::vector< eVision::EasyDeepOCR::ETextLine > eVision::EasyDeepLearning::EDataset::GetOCRAnnotations | ( | int | imgId | ) | const |
Ground truth text lines for the specified image.
| imgId | Index of the image. |
| eVision::ERegion eVision::EasyDeepLearning::EDataset::GetRegionForSegment | ( | int | imageIndex, |
| const std::string & | segmentationLabel ) |
Gets a region corresponding to the pixels of the given segment.
| imageIndex | Image index |
| segmentationLabel | Segmentation label |
| eVision::ERegion eVision::EasyDeepLearning::EDataset::GetRegionForSegment | ( | int | imageIndex, |
| int | segmentationLabelIndex ) |
Gets a region corresponding to the pixels of the given segment.
| imageIndex | Image index |
| segmentationLabelIndex | Segmentation label index |
| int eVision::EasyDeepLearning::EDataset::GetRegionOfInterestHeight | ( | int | imageIndex | ) | const |
Region of interest height for the specified image.
| imageIndex | Index of the image. |
| int eVision::EasyDeepLearning::EDataset::GetRegionOfInterestOriginX | ( | int | imageIndex | ) | const |
Region of interest origin abscissa for the specified image.
| imageIndex | Index of the image. |
| int eVision::EasyDeepLearning::EDataset::GetRegionOfInterestOriginY | ( | int | imageIndex | ) | const |
Region of interest origin ordinate for the specified image.
| imageIndex | Index of the image. |
| int eVision::EasyDeepLearning::EDataset::GetRegionOfInterestWidth | ( | int | imageIndex | ) | const |
Region of interest width for the specified image.
| imageIndex | Index of the image. |
| float eVision::EasyDeepLearning::EDataset::GetSameLabelMaxOverlap | ( | ) | const |
Maximum overlap between objects with the same label in the dataset.
| std::string eVision::EasyDeepLearning::EDataset::GetSegmentationLabel | ( | int | index | ) | const |
Gets the segmentation label.
| index | Index of the segmentation label |
The segmentation label index 0 is reserved and corresponds to the "background" label. This segmentation label can't be changed.
| eVision::ERGBColor eVision::EasyDeepLearning::EDataset::GetSegmentationLabelColor | ( | int | index | ) | const |
Gets the label color for a segmentation label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| uint8_t eVision::EasyDeepLearning::EDataset::GetSegmentationLabelOpacity | ( | int | index | ) | const |
Gets the label opacity for a segmentation label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| float eVision::EasyDeepLearning::EDataset::GetSegmentationLabelWeight | ( | const std::string & | label | ) | const |
Gets the segmentation label weights.
| label | Segmentation label |
| float eVision::EasyDeepLearning::EDataset::GetSegmentationLabelWeight | ( | int | index | ) | const |
Gets the segmentation label weights.
| index | Index of the segmentation label |
| eVision::EImageBW16 eVision::EasyDeepLearning::EDataset::GetSegmentationMap | ( | int | imageIndex | ) | const |
Gets the segmentation map of an image. The segmentation map is a 16-bit EROIBW16 image where the value of each pixel is equal to the corresponding segmentation label index (see EDataset::GetSegmentationLabel).
If an image has no segmentation (EDataset::HasSegmentation), the getter will throw an exception.
| imageIndex | Image index |
| eVision::EasyDeepLearning::EDatasetSplit eVision::EasyDeepLearning::EDataset::GetSplit | ( | float | trainingProportion, |
| float | validationPropotion, | ||
| eVision::EasyDeepLearning::EDeepLearningToolType | toolType, | ||
| const std::string & | goodLabel ) const |
Generates a split.
| trainingProportion | Approximate proportion of training images |
| validationPropotion | Approximate proportion of validation images |
| toolType | Tool type for which to generate the split |
| goodLabel | The good label for EasySegment Unsupervised split |
| eVision::EasyDeepLearning::EDatasetSplit eVision::EasyDeepLearning::EDataset::GetSplit | ( | float | trainingProportion, |
| float | validationPropotion, | ||
| eVision::EasyDeepLearning::EDeepLearningToolType | toolType, | ||
| const std::string & | goodLabel, | ||
| uint32_t | seed ) const |
Generates a split.
| trainingProportion | Approximate proportion of training images |
| validationPropotion | Approximate proportion of validation images |
| toolType | Tool type for which to generate the split |
| goodLabel | The good label for EasySegment Unsupervised split |
| seed | Seed for randomization |
| eVision::EasyDeepLearning::EDatasetSplit eVision::EasyDeepLearning::EDataset::GetSplit | ( | int | numTrainingImages, |
| int | numValidationImages, | ||
| eVision::EasyDeepLearning::EDeepLearningToolType | toolType, | ||
| const std::string & | goodLabel ) const |
Generates a split.
| numTrainingImages | Number of training images |
| numValidationImages | Number of validation images |
| toolType | Tool type for which to generate the split |
| goodLabel | The good label for EasySegment Unsupervised split |
| eVision::EasyDeepLearning::EDatasetSplit eVision::EasyDeepLearning::EDataset::GetSplit | ( | int | numTrainingImages, |
| int | numValidationImages, | ||
| eVision::EasyDeepLearning::EDeepLearningToolType | toolType, | ||
| const std::string & | goodLabel, | ||
| uint32_t | seed ) const |
Generates a split.
| numTrainingImages | Number of training images |
| numValidationImages | Number of validation images |
| toolType | Tool type for which to generate the split |
| goodLabel | The good label for EasySegment Unsupervised split |
| seed | Seed for randomization |
| eVision::EasyDeepLearning::EDataset eVision::EasyDeepLearning::EDataset::GetTextDataset | ( | ) | const |
Transforms the current dataset to have only subwindow containing the actual text to read.
| std::vector< int > eVision::EasyDeepLearning::EDataset::GetTextLabeledImagesIndexes | ( | ) | const |
Gets a list of index corresponding to the images that have a text only label.
| eVision::EasyDeepLearning::EDataset eVision::EasyDeepLearning::EDataset::GetTextOrientationDataset | ( | ) | const |
Transforms the current text dataset to duplicate it with half image flipped, adding corresponding ground truth.
| uint32_t eVision::EasyDeepLearning::EDataset::GetWidth | ( | ) | const |
Width of the region of interest of the first image added to the dataset.
| bool eVision::EasyDeepLearning::EDataset::HasForegroundSegments | ( | int | imageId | ) | const |
Whether the image segmentation contains segments that are not background. If the image has no segmentation, this method throws an exception.
| imageId | Image index |
| bool eVision::EasyDeepLearning::EDataset::HasLabel | ( | int | index | ) | const |
Whether an image has a classification label.
| index | Index of an image. |
| bool eVision::EasyDeepLearning::EDataset::HasObjectLabeling | ( | int | imageIndex | ) | const |
Whether the image is labeled for object detection and use with ELocator.
| imageIndex | Index of the image |
| bool eVision::EasyDeepLearning::EDataset::HasOCRAnnotations | ( | int | imgId | ) | const |
Whether the specified image has OCR annotations.
| imgId | Index of the image. |
| bool eVision::EasyDeepLearning::EDataset::HasSegmentation | ( | int | imageId | ) | const |
Whether the image has a segmentation.
| imageId | Image index |
| void eVision::EasyDeepLearning::EDataset::ImportPascalVOCXMLAnnotations | ( | ) |
Imports Pascal VOC XML annotations (for EasyLocate Bounding Box).
This method may add new labels to the object labels.
The version that do not take an image index attempts to import the annotation from all images currently in the dataset.
| void eVision::EasyDeepLearning::EDataset::ImportPascalVOCXMLAnnotations | ( | int | imgId | ) |
Imports Pascal VOC XML annotations (for EasyLocate Bounding Box).
This method may add new labels to the object labels.
The version that do not take an image index attempts to import the annotation from all images currently in the dataset.
| imgId | The image index for which to import the annotation |
| void eVision::EasyDeepLearning::EDataset::ImportYOLOTXTAnnotations | ( | const std::string & | labelFile | ) |
Imports YOLO TXT annotations (for EasyLocate Bounding Box).
You need to specify the list of labels associated with the YOLO TXT annotations through an array of string or through a file containing this list. This method may add new labels to the object labels.
The version that do not take an image index attempts to import the annotation from all images currently in the dataset.
| labelFile | Path to a file containing the label list |
| void eVision::EasyDeepLearning::EDataset::ImportYOLOTXTAnnotations | ( | int | imgId, |
| const std::string & | labelFile ) |
Imports YOLO TXT annotations (for EasyLocate Bounding Box).
You need to specify the list of labels associated with the YOLO TXT annotations through an array of string or through a file containing this list. This method may add new labels to the object labels.
The version that do not take an image index attempts to import the annotation from all images currently in the dataset.
| imgId | The image index for which to import the annotation |
| labelFile | Path to a file containing the label list |
| bool eVision::EasyDeepLearning::EDataset::IsEmbeddedImage | ( | int | index | ) | const |
Whether the image is embedded into the dataset and is not a reference towards an image file.
| index | Index of the image. |
| bool eVision::EasyDeepLearning::EDataset::IsImageFile | ( | int | index | ) | const |
Whether the image is stored as a file path towards an image.
| index | Index of the image. |
| void eVision::EasyDeepLearning::EDataset::Load | ( | const std::string & | path | ) |
Loads a classification dataset from disk.
| path | A string containing the full path to the dataset file. |
| void eVision::EasyDeepLearning::EDataset::Load | ( | eVision::ESerializer * | serializer | ) |
Loads a classification dataset from disk.
| serializer | The serializer. |
| eVision::EasyDeepLearning::EDataset & eVision::EasyDeepLearning::EDataset::operator= | ( | const eVision::EasyDeepLearning::EDataset & | other | ) |
Assignment operator.
| other | Reference to the EDataset object used for the assignment |
| void eVision::EasyDeepLearning::EDataset::RemoveImage | ( | int | imgId | ) |
Removes the image at the given index. All annotations (label, segmentation, objects) will be lost.
| imgId | Index of the image to remove |
| void eVision::EasyDeepLearning::EDataset::RemoveImageObject | ( | int | imageIndex, |
| int | objectIndex ) |
Removes an object from an image.
| imageIndex | Index of the image |
| objectIndex | Index of the object between 0 and EDataset::GetImageNumObjects |
| void eVision::EasyDeepLearning::EDataset::RemoveLabel | ( | const std::string & | label | ) |
Removes a label from the dataset.
All the images associated with this label will be set to unlabeled (see EDataset::HasLabel).
| label | Name of the label to remove |
| void eVision::EasyDeepLearning::EDataset::RemoveLabel | ( | int | labelId | ) |
Removes a label from the dataset.
All the images associated with this label will be set to unlabeled (see EDataset::HasLabel).
| labelId | Index of the label to remove |
| void eVision::EasyDeepLearning::EDataset::RemoveObjectLabel | ( | const std::string & | label | ) |
Removes an object label.
| label | Label to remove |
| void eVision::EasyDeepLearning::EDataset::RemoveObjectLabel | ( | int | labelIndex | ) |
Removes an object label.
| labelIndex | Index of the object label to remove |
| void eVision::EasyDeepLearning::EDataset::RemoveSegmentationLabel | ( | const std::string & | label | ) |
Remove a segmentation label.
This method sets all the pixels in the dataset assigned to this label to the background label.
| label | Name of the segmentation label to remove |
| void eVision::EasyDeepLearning::EDataset::RemoveSegmentationLabel | ( | int | index | ) |
Remove a segmentation label.
This method sets all the pixels in the dataset assigned to this label to the background label.
| index | Index of the segmentation label to remove |
| void eVision::EasyDeepLearning::EDataset::ResetImageObjectLabeling | ( | int | imageIndex | ) |
Resets the object labeling for the specified image. This sets the image as having been labeled for object detection with no object present in the image.
| imageIndex | Index of the image |
| void eVision::EasyDeepLearning::EDataset::ResetSegmentation | ( | int | imageIndex | ) |
Resets the segmentation of an image by setting all pixels to background.
| imageIndex | Image index |
| void eVision::EasyDeepLearning::EDataset::Save | ( | const std::string & | path | ) |
Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label.
| path | A string containing the full path to the dataset file. |
This method only save the image that were given to this EDataset instance as EBaseROI pointers.
To obtain a portable EDataset file, please use EDataset::Export.
| void eVision::EasyDeepLearning::EDataset::Save | ( | eVision::ESerializer * | serializer | ) |
Saves a classification dataset to disk, containing the file paths to the images in the dataset and their associated label.
| serializer | The serializer. |
This method only save the image that were given to this EDataset instance as EBaseROI pointers.
To obtain a portable EDataset file, please use EDataset::Export.
| void eVision::EasyDeepLearning::EDataset::SaveWithRelativePath | ( | const std::string & | path | ) |
Saves the dataset with image paths relative to the directory in which the dataset file is saved.
| void eVision::EasyDeepLearning::EDataset::SetBasePath | ( | const std::string & | basePath | ) |
Sets the base path for the images specified with a relative path.
| basePath | Base path |
The base path is not serialized. It must be set after loading a dataset file.
| void eVision::EasyDeepLearning::EDataset::SetImageLabel | ( | const std::string & | filter, |
| const std::string & | label ) |
Sets the label of images in the dataset.
| filter | A glob filter |
| label | The label |
The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.
| void eVision::EasyDeepLearning::EDataset::SetImageLabel | ( | int | index, |
| const std::string & | label ) |
Sets the label of images in the dataset.
| index | The index of the image for which to set the label. |
| label | The label |
The filter is a glob pattern. This means the wildcard characters "*" and "?" correspond to "zero or more character" and "a single character" respectively. For example, the filter "*_good_*.png" will match any filename that contains the string "_good_" and has a png extension.
| void eVision::EasyDeepLearning::EDataset::SetImageObject | ( | int | imageIndex, |
| int | objectIndex, | ||
| const eVision::EasyDeepLearning::ELocatorObject & | obj ) |
Sets the specified object for the given image.
| imageIndex | Index of the image |
| objectIndex | Index of the object between 0 and EDataset::GetImageNumObjects |
| obj | Object |
If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.
| void eVision::EasyDeepLearning::EDataset::SetImageObject | ( | int | imageIndex, |
| int | objectIndex, | ||
| const eVision::ERectangleRegion & | region ) |
Sets the specified object for the given image.
| imageIndex | Index of the image |
| objectIndex | Index of the object between 0 and EDataset::GetImageNumObjects |
| region | New region for the object |
If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.
| void eVision::EasyDeepLearning::EDataset::SetImageObject | ( | int | imageIndex, |
| int | objectIndex, | ||
| const std::string & | label ) |
Sets the specified object for the given image.
| imageIndex | Index of the image |
| objectIndex | Index of the object between 0 and EDataset::GetImageNumObjects |
| label | New label for the object |
If the label of the object does not exist in the object labels of the dataset, the label will be added to the object labels of the dataset.
| void eVision::EasyDeepLearning::EDataset::SetLabel | ( | int | index, |
| const std::string & | label ) |
Sets the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1). This operation does not add a new label to the dataset but simply renames an existing label.
| index | Label index |
| label | Replacement label |
| void eVision::EasyDeepLearning::EDataset::SetLabelColor | ( | int | index, |
| const eVision::ERGBColor & | color ) |
Sets the label color for a classification label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| color | New color for the label |
| void eVision::EasyDeepLearning::EDataset::SetLabelOpacity | ( | int | index, |
| const uint8_t | opacity ) |
Sets the label opacity for a classification label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| opacity | New opacity for the label |
| void eVision::EasyDeepLearning::EDataset::SetLabelWeight | ( | int | index, |
| const float & | weight ) |
Sets the weight associated to the i-th label of the dataset (starting from 0 to EDataset::GetNumLabels - 1). This operation does not add a new label.
| index | Label index |
| weight | Weight to be set |
| void eVision::EasyDeepLearning::EDataset::SetMask | ( | int | imageIndex, |
| const eVision::ERegion & | mask ) |
Sets the mask region/don't care area for the given image. The mask is defined with respect to the region of interest of the image.
| imageIndex | Index of the image for which to get the mask region |
| mask | Mask to set on the image |
| void eVision::EasyDeepLearning::EDataset::SetObjectLabel | ( | const std::string & | oldLabel, |
| const std::string & | newLabel ) |
Sets an object label.
| oldLabel | Old label to change |
| newLabel | New label to be set |
| void eVision::EasyDeepLearning::EDataset::SetObjectLabel | ( | int | labelIndex, |
| const std::string & | newLabel ) |
Sets an object label.
| labelIndex | Index of the object label |
| newLabel | New label to be set |
| void eVision::EasyDeepLearning::EDataset::SetObjectLabelColor | ( | int | index, |
| const eVision::ERGBColor & | color ) |
Sets the label color for an object label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| color | New color for the label |
| void eVision::EasyDeepLearning::EDataset::SetObjectLabelOpacity | ( | int | index, |
| const uint8_t | opacity ) |
Sets the label opacity for an object label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| opacity | New opacity for the label |
| void eVision::EasyDeepLearning::EDataset::SetObjectLabelWeight | ( | const std::string & | label, |
| float | weight ) |
Sets the weight of an object label.
| label | Label |
| weight | New weight |
| void eVision::EasyDeepLearning::EDataset::SetObjectLabelWeight | ( | int | labelIndex, |
| float | weight ) |
Sets the weight of an object label.
| labelIndex | Index of the object label |
| weight | New weight |
| void eVision::EasyDeepLearning::EDataset::SetObjectSize | ( | int | objectSize | ) |
Object size for EasyLocate Interest point.
| objectSize | New object size |
| void eVision::EasyDeepLearning::EDataset::SetOCRAnnotations | ( | int | imgId, |
| const std::vector< eVision::EasyDeepOCR::ETextLine > & | texts ) |
Sets the ground truth text lines for the specified image.
| imgId | Index of the image. |
| texts | Text lines of the image. |
| void eVision::EasyDeepLearning::EDataset::SetRegionOfInterest | ( | int | imageIndex, |
| int | xOrg, | ||
| int | yOrg, | ||
| int | width, | ||
| int | height ) |
Sets the region of interest for the specified image.
| imageIndex | Index of the image. |
| xOrg | ROI origin abscissa |
| yOrg | ROI origin ordinate |
| width | ROI width |
| height | ROI height |
Any objects or segmentation located outside of the region of interest will be lost.
| void eVision::EasyDeepLearning::EDataset::SetSegmentationLabel | ( | int | index, |
| const std::string & | label ) |
Sets the segmentation labels.
| index | Index of the segmentation label |
| label | String representing the segmentation label |
The segmentation label index 0 is reserved and corresponds to the "background" label. This segmentation label can't be changed.
| void eVision::EasyDeepLearning::EDataset::SetSegmentationLabelColor | ( | int | index, |
| const eVision::ERGBColor & | color ) |
Sets the label color for a segmentation label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| color | New color for the label |
| void eVision::EasyDeepLearning::EDataset::SetSegmentationLabelOpacity | ( | int | index, |
| const uint8_t | opacity ) |
Sets the label opacity for a segmentation label.
| index | Label index (0 to EDataset::GetNumLabels - 1). |
| opacity | New opacity for the label |
| void eVision::EasyDeepLearning::EDataset::SetSegmentationLabelWeight | ( | const std::string & | label, |
| float | weight ) |
Sets the segmentation label weight.
| label | Segmentation label |
| weight | Weight of the segmentation label |
| void eVision::EasyDeepLearning::EDataset::SetSegmentationLabelWeight | ( | int | index, |
| float | weight ) |
Sets the segmentation label weight.
| index | Index of the segmentation label |
| weight | Weight of the segmentation label |
| void eVision::EasyDeepLearning::EDataset::SetSegmentationMap | ( | int | imageIndex, |
| const eVision::EROIBW16 & | segmentationMap ) |
Sets the segmentation map of an image. The segmentation map is a 16-bit EROIBW16 image where the value of each pixel is equal to the corresponding segmentation label index (see EDataset::GetSegmentationLabel).
If an image has no segmentation (EDataset::HasSegmentation), the getter will throw an exception.
| imageIndex | Image index |
| segmentationMap | Segmentation map |
| void eVision::EasyDeepLearning::EDataset::SplitDataset | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2 ) const |
Splits the dataset in two parts to be used for training and validation respectively.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
| void eVision::EasyDeepLearning::EDataset::SplitDataset | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2, | ||
| float | proportion ) const |
Splits the dataset in two parts to be used for training and validation respectively.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
| proportion | Proportion of image of each class to put into the first part. The remaining images are put in d2 |
| void eVision::EasyDeepLearning::EDataset::SplitDataset | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2, | ||
| float | proportion, | ||
| bool | random ) const |
Splits the dataset in two parts to be used for training and validation respectively.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
| proportion | Proportion of image of each class to put into the first part. The remaining images are put in d2 |
| random | Randomly sample the images. |
| void eVision::EasyDeepLearning::EDataset::SplitDatasetForLocator | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2 ) const |
Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
The method ensures that all the object labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.
| void eVision::EasyDeepLearning::EDataset::SplitDatasetForLocator | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2, | ||
| float | proportion ) const |
Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
| proportion | Proportion of image of each class to put into the first part. The remaining images are put in d2 |
The method ensures that all the object labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.
| void eVision::EasyDeepLearning::EDataset::SplitDatasetForLocator | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2, | ||
| float | proportion, | ||
| bool | random ) const |
Splits the dataset in two parts for training and validation of a ELocator tool. Images without object labeling are excluded from the split.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
| proportion | Proportion of image of each class to put into the first part. The remaining images are put in d2 |
| random | Randomly sample the images. |
The method ensures that all the object labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.
| void eVision::EasyDeepLearning::EDataset::SplitDatasetForSegmentation | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2 ) const |
Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
The method ensures that all the segmentation labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.
| void eVision::EasyDeepLearning::EDataset::SplitDatasetForSegmentation | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2, | ||
| float | proportion ) const |
Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
| proportion | Proportion of image of each class to put into the first part. The remaining images are put in d2 |
The method ensures that all the segmentation labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.
| void eVision::EasyDeepLearning::EDataset::SplitDatasetForSegmentation | ( | eVision::EasyDeepLearning::EDataset & | d1, |
| eVision::EasyDeepLearning::EDataset & | d2, | ||
| float | proportion, | ||
| bool | random ) const |
Splits the dataset in two parts for a supervised segmenter. The two parts are to be used for training and validation respectively.
| d1 | First part of the dataset |
| d2 | Second part of the dataset |
| proportion | Proportion of image of each class to put into the first part. The remaining images are put in d2 |
| random | Randomly sample the images. |
The method ensures that all the segmentation labels are represented in d1. Thus, even when the parameter random is set to false, the images in d1 and d2 can be ordered differently than they were in the original dataset.
| void eVision::EasyDeepLearning::EDataset::UnsetImageLabel | ( | int | index | ) |
Unset the label of the given image of the dataset. After this operation, the given image will have no classification labels.
| index | Index of the image for which to unset the label |
| void eVision::EasyDeepLearning::EDataset::UnsetImageObjectLabeling | ( | int | imageIndex | ) |
Unsets the object labeling for the specified image. This sets the image as not having been labeled for object detection. This image won't be use for training with a ELocator tool.
| imageIndex | Index of the image |
| void eVision::EasyDeepLearning::EDataset::UnsetOCRAnnotations | ( | int | imgId | ) |
Unsets the OCR labeling for the specified image.
| imgId | Index of the image. |
| void eVision::EasyDeepLearning::EDataset::UnsetSegmentation | ( | int | imageIndex | ) |
Unsets the segmentation of an image. After this operation, the image will have no segmentation.
| imageIndex | Image index |
| CppWrapperInternal::WrappedClass eVision::EasyDeepLearning::EDataset::wrappedClass_ |