eVision.EasyDeepLearning.EClassifier allows to train a classifier using an eVision.EasyDeepLearning.EDataset object and classify new images. More...


Public Member Functions | |
| None | __init__ (self) |
| Constructs a eVision.EasyDeepLearning.EClassifier object. | |
| None | __init__ (self, eVision.EasyDeepLearning.EClassifier other) |
| Copy constructor of a eVision.EasyDeepLearning.EClassifier object. | |
| None | SerializeSettings (self, eVision.ESerializer|None serializer) |
| Serializes the classifier settings. | |
| None | LoadAsPretrained (self, str path) |
| Loads the classifier and use it as a pre-trained model. | |
| None | LoadOnnxModelAsPretrained (self, str path) |
| Loads the ONNX model as a pre-trained model. | |
| None | LoadOnnxModel (self, str path) |
| Loads the ONNX model for inference. | |
| bool | HasPretrainedModel (self) |
| Whether a pre-trained model for the current configuration can be found. | |
| eVision.EasyDeepLearning.EClassificationMetrics | GetTrainingMetrics (self, int id) |
| Gets the metrics obtained with the training dataset at the given iteration. | |
| eVision.EasyDeepLearning.EClassificationMetrics | GetValidationMetrics (self, int id) |
| Gets the metrics obtained with the validation dataset at the given iteration. | |
| None | Train (self, eVision.EasyDeepLearning.EDataset dataset) |
| Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations. | |
| None | Train (self, eVision.EasyDeepLearning.EDataset dataset, eVision.EasyDeepLearning.EDataAugmentation dataAugmentation) |
| Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations. | |
| None | Train (self, eVision.EasyDeepLearning.EDataset trainingDataset, eVision.EasyDeepLearning.EDataset validationDataset) |
| Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations. | |
| None | Train (self, eVision.EasyDeepLearning.EDataset trainingDataset, eVision.EasyDeepLearning.EDataset validationDataset, eVision.EasyDeepLearning.EDataAugmentation dataAugmentation) |
| Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations. | |
| None | Train (self, eVision.EasyDeepLearning.EDataset dataset, int iterations) |
| Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations. | |
| None | Train (self, eVision.EasyDeepLearning.EDataset dataset, eVision.EasyDeepLearning.EDataAugmentation dataAugmentation, int iterations) |
| Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations. | |
| None | Train (self, eVision.EasyDeepLearning.EDataset trainingDataset, eVision.EasyDeepLearning.EDataset validationDataset, int iterations) |
| Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations. | |
| None | Train (self, eVision.EasyDeepLearning.EDataset trainingDataset, eVision.EasyDeepLearning.EDataset validationDataset, eVision.EasyDeepLearning.EDataAugmentation dataAugmentation, int iterations) |
| Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations. | |
| eVision.EasyDeepLearning.EClassificationResult | Classify (self, eVision.EBaseROI img) |
| Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object. | |
| eVision.EasyDeepLearning.EClassificationResult | Classify (self, eVision.EBaseROI img, eVision.ERegion mask) |
| Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object. | |
| list[eVision._eVision.EasyDeepLearning.EClassificationResult] | Classify (self, list[eVision._eVision.EBaseROI|None] imgList, eVision.ERegion mask) |
| Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object. | |
| list[eVision._eVision.EasyDeepLearning.EClassificationResult] | Classify (self, list[eVision._eVision.EBaseROI|None] imgList) |
| Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object. | |
| eVision.EasyDeepLearning.EClassificationResult | Classify (self, eVision.EBaseROI img, eVision.ERegion mask, eVision.EFrame frame) |
| Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object. | |
| list[eVision._eVision.EasyDeepLearning.EClassificationResult] | Classify (self, list[eVision._eVision.EBaseROI|None] imgList, eVision.ERegion mask, eVision.EFrame frame) |
| Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object. | |
| eVision.EasyDeepLearning.EClassificationMetrics | Evaluate (self, eVision.EasyDeepLearning.EDataset dataset) |
| Evaluates the eVision.EasyDeepLearning.EClassifier using the given eVision.EasyDeepLearning.EDataset. | |
| eVision.EImageBW8 | GetHeatMap (self, eVision.EBaseROI image, str label) |
| Gets a heatmap associated with the given label. | |
| eVision.EImageC24 | GetColorizedHeatMap (self, eVision.EBaseROI image, str label) |
| Gets a colorized heatmap associated with the given label. | |
| eVision.EImageC24A | GetColorizedHeatmapWithTransparency (self, eVision.EBaseROI image, str label, float minAlpha, float maxAlpha, eVision.EasyDeepLearning.EHeatmapColormap colormap) |
| Colorized heatmap with transparency. | |
| eVision.EImageC24A | GetColorizedHeatmapWithTransparency (self, eVision.EBaseROI image, str label, float minAlpha, float maxAlpha) |
| Colorized heatmap with transparency. | |
| None | LearnOODParameters (self, eVision.EasyDeepLearning.EDataset trainList, eVision.EasyDeepLearning.EDataset valList) |
| Learns OOD parameters using training data. | |
| None | LearnOODParameters (self, list[eVision._eVision.EBaseROI|None] trainList, list[eVision._eVision.EBaseROI|None] valList) |
| Learns OOD parameters using training data. | |
| bool | HasOODParameters (self) |
| Checks whether the OOD parameters have been learned. | |
| eVision.EasyDeepLearning.EDeepLearningToolType | ToolType (self) |
| Type of the deep learning tool. | |
| bool | UsePretrainedModel (self) |
| Whether to use a pre-trained model when training. | |
| UsePretrainedModel (self, bool value) | |
| Whether to use a pre-trained model when training. | |
| int | Width (self) |
| Width for input images of the classifier. | |
| Width (self, int value) | |
| Width for input images of the classifier. | |
| int | Height (self) |
| Height for input images of the classifier. | |
| Height (self, int value) | |
| Height for input images of the classifier. | |
| int | Channels (self) |
| Number of channels for input images of the classifier. | |
| Channels (self, int value) | |
| Number of channels for input images of the classifier. | |
| bool | EnableAutomaticImageReformat (self) |
| Enable automatic image reformat (true by default). | |
| EnableAutomaticImageReformat (self, bool value) | |
| Enable automatic image reformat (true by default). | |
| bool | EnableHistogramEqualization (self) |
| Enable histogram equalization of all images passing through the classifier. | |
| EnableHistogramEqualization (self, bool value) | |
| Enable histogram equalization of all images passing through the classifier. | |
| int | MinimumWidth (self) |
| Minimum width for input images of the classifier. | |
| int | MinimumHeight (self) |
| Minimum height for input images of the classifier. | |
| eVision.EasyDeepLearning.EClassifierCapacity | Capacity (self) |
| Capacity of classifier to use. | |
| Capacity (self, eVision.EasyDeepLearning.EClassifierCapacity value) | |
| Capacity of classifier to use. | |
| str | ModelType (self) |
| Model type for training. | |
| ModelType (self, str value) | |
| Model type for training. | |
| float | OODThreshold (self) |
| Out-Of-Distribution (OOD) threshold below which an image is considered to be OOD. | |
| OODThreshold (self, float value) | |
| Out-Of-Distribution (OOD) threshold below which an image is considered to be OOD. | |
| bool | ComputeHeatmapWithResult (self) |
| Whether to always compute the heatmap along the result when applying the tool. | |
| ComputeHeatmapWithResult (self, bool value) | |
| Whether to always compute the heatmap along the result when applying the tool. | |
| bool | ComputeOODWithResult (self) |
| Whether to compute the OOD parameters while training. | |
| ComputeOODWithResult (self, bool value) | |
| Whether to compute the OOD parameters while training. | |
| Public Member Functions inherited from eVision.EasyDeepLearning.EDeepLearningTool | |
| None | Load (self, str filePath) |
| Loads a deep learning tool. | |
| None | Load (self, eVision.ESerializer|None serializer) |
| Loads a deep learning tool. | |
| eVision.EasyDeepLearning.EDeepLearningTool|None | Clone (self) |
| Clones this tool. | |
| None | Save (self, str filePath, bool includeTrainingModel) |
| Saves the settings, inference and training model of the deep learning tool. | |
| None | Save (self, str filePath) |
| Saves the settings, inference and training model of the deep learning tool. | |
| None | Save (self, eVision.ESerializer|None serializer, bool includeTrainingModel) |
| Saves the settings, inference and training model of the deep learning tool. | |
| None | Save (self, eVision.ESerializer|None serializer) |
| Saves the settings, inference and training model of the deep learning tool. | |
| None | SerializeInferenceModel (self, eVision.ESerializer|None serializer) |
| Serializes the inference model of the tool. | |
| None | SerializeTrainingModel (self, eVision.ESerializer|None serializer) |
| Serializes the training model of the tool. | |
| None | SaveSettings (self, str filePath) |
| Saves the settings of the tool to a file. | |
| None | SaveInferenceModel (self, str filePath) |
| Saves the tool's inference model to a file. | |
| None | SaveTrainingModel (self, str filePath) |
| Saves the tool's training model to a file. | |
| None | LoadSettings (self, str filePath) |
| Loads the settings of a tool. | |
| None | LoadInferenceModel (self, str filePath) |
| Loads the tool's inference model. | |
| None | LoadTrainingModel (self, str filePath) |
| Loads the tool's training model. | |
| None | UnloadInferenceModel (self) |
| Unloads the inference model. | |
| None | UnloadTrainingModel (self) |
| Unloads the training model. | |
| None | UnloadModels (self) |
| Unloads the inference and training model. | |
| bool | HasInferenceModel (self) |
| Whether the inference model is loaded or created when the tool is not yet trained. | |
| bool | HasTrainingModel (self) |
| Whether the training model is loaded or created when the tool is not yet trained. | |
| bool | IsTrained (self) |
| Tells whether the deep learning tool has been trained. | |
| str | GetAvailableDeviceName (self, int i) |
| Name of the i-th device of the current engine. | |
| eVision.EasyDeepLearning.EDeepLearningDevice | GetAvailableDevice (self, int i) |
| i-th eVision.EasyDeepLearning.EDeepLearningDevice of the current engine. | |
| None | SetActiveDevice (self, eVision.EasyDeepLearning.EDeepLearningDevice device) |
| Sets the device with which to run or train the model. | |
| eVision.EasyDeepLearning.EDeepLearningDevice | GetActiveDevice (self, int i) |
| Gets the active device. | |
| eVision.EasyDeepLearning.EDeepLearningDevice | GetActiveDevice (self) |
| Gets the active device. | |
| bool | HasEngineSetupData (self) |
| Whether the inference model has engine setup data. | |
| None | ClearEngineSetupData (self) |
| Clears the engine data saved in the inference model. | |
| bool | IsTraining (self) |
| Indicates whether the object is currently training. | |
| int | WaitForTrainingCompletion (self, int timeout) |
| Waits until the training is complete or the timeout is expired. | |
| int | WaitForTrainingCompletion (self) |
| Waits until the training is complete or the timeout is expired. | |
| int | WaitForIterationCompletion (self) |
| Waits until an iteration is complete. | |
| int | StopTraining (self, bool wait) |
| Stops training and returns the last completed iteration. | |
| None | SetLearningRate (self, eVision.EasyDeepLearning.EDeepLearningLearningRateType type, list[float] parameters) |
| Specifies how the value of the learning rate and how it evolves during training. | |
| None | InitializeInference (self, int width, int height, eVision.EImageType imageType, int numImages) |
| Initializes the neural network for inference (i.e. | |
| None | InitializeInference (self, eVision.EBaseROI img) |
| Initializes the neural network for inference (i.e. | |
| None | InitializeInference (self, list[eVision._eVision.EBaseROI|None] imgList) |
| Initializes the neural network for inference (i.e. | |
| str | GetLabel (self, int index) |
| Gets the label from its index. | |
| None | SetLabel (self, int index, str label) |
| Changes a label predicted by the tool. | |
| None | SetLabelWeight (self, int index, float weight) |
| Sets the label weight. | |
| float | GetLabelWeight (self, int index) |
| Gets the label weight. | |
| None | SetLabelColor (self, int index, eVision.ERGBColor c) |
| Changes a label color. | |
| eVision.ERGBColor | GetLabelColor (self, int index) |
| Label color. | |
| None | SetLabelOpacity (self, int index, int opacity) |
| Changes a label opacity (between 0 for fully transparent and 255 for opaque color). | |
| int | GetLabelOpacity (self, int index) |
| Gets the label opacity (between 0 for fully transparent and 255 for opaque color). | |
| int | GetOptimalNumImagesForBatchSize (self, eVision.EBaseROI sampleImage) |
| Optimal number of images to process together for inference given the batch size and eVision.EasyDeepLearning.EDeepLearningTool.GetNumPatchesForImage. | |
| int | GetOptimalNumImagesForBatchSize (self, int imageWidth, int imageHeight) |
| Optimal number of images to process together for inference given the batch size and eVision.EasyDeepLearning.EDeepLearningTool.GetNumPatchesForImage. | |
| int | GetNumPatchesForImage (self, eVision.EBaseROI sampleImage) |
| Number of patches that will be extracted from an input image to perform inference. | |
| int | GetNumPatchesForImage (self, int imageWidth, int imageHeight) |
| Number of patches that will be extracted from an input image to perform inference. | |
| None | Clean (self) |
| Reset the engine and clean CPU and GPU memory allocated for running the model. | |
| bool | EnableGPU (self) |
| Enable the use of a GPU for training and inference of the deep learning tool. | |
| EnableGPU (self, bool value) | |
| Enable the use of a GPU for training and inference of the deep learning tool. | |
| list[int] | GPUIndexes (self) |
| Indexes of the GPUs to use for computations. | |
| GPUIndexes (self, list[int] value) | |
| Indexes of the GPUs to use for computations. | |
| int | NumGPUs (self) |
| Number of detected NVIDIA GPU. | |
| str | Engine (self) |
| Sets the engine with which to execute or train the neural network. | |
| Engine (self, str value) | |
| Sets the engine with which to execute or train the neural network. | |
| eVision.EasyDeepLearning.EDeepLearningInferencePrecision | InferencePrecision (self) |
| Inference precision. | |
| InferencePrecision (self, eVision.EasyDeepLearning.EDeepLearningInferencePrecision value) | |
| Inference precision. | |
| int | NumAvailableDevices (self) |
| Available devices for the current eVision.EasyDeepLearning.EDeepLearningTool.Engine. | |
| list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] | AvailableDevices (self) |
| Get all available device for the current engine. | |
| int | NumActiveDevices (self) |
| Gets the number of devices with which to run or train the model. | |
| list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] | ActiveDevices (self) |
| Devices with which to run or train the model. | |
| ActiveDevices (self, list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] value) | |
| Devices with which to run or train the model. | |
| eVision.EasyDeepLearning.EDeepLearningExecutionSettings | ExecutionSettings (self) |
| Execution settings of the tool (engine, device(s), inference precision, batch size settings). | |
| ExecutionSettings (self, eVision.EasyDeepLearning.EDeepLearningExecutionSettings value) | |
| Execution settings of the tool (engine, device(s), inference precision, batch size settings). | |
| eVision.EasyDeepLearning.EDeepLearningDevice | EngineSetupDataDevice (self) |
| Device corresponding to the engine data contained in the tool. | |
| eVision.EasyDeepLearning.EDeepLearningInferencePrecision | EngineSetupDataInferencePrecision (self) |
| Inference precision corresponding to the engine data contained in the tool. | |
| int | EngineSetupDataBatchSize (self) |
| Batch size corresponding to the engine data contained in the tool. | |
| bool | OptimizeBatchSize (self) |
| Indicates whether to optimize the batch size (see eVision.EasyDeepLearning.EDeepLearningTool.BatchSize) to maximize the training and inference speed according to the engine, the device and the available memory. | |
| OptimizeBatchSize (self, bool value) | |
| Indicates whether to optimize the batch size (see eVision.EasyDeepLearning.EDeepLearningTool.BatchSize) to maximize the training and inference speed according to the engine, the device and the available memory. | |
| int | BatchSizeForMaximumInferenceSpeed (self) |
| Computes the batch size that will maximize the inference speed on NVIDIA GPU. | |
| int | BatchSize (self) |
| Batch size. | |
| BatchSize (self, int value) | |
| Batch size. | |
| float | CurrentTrainingProgression (self) |
| Current training progression as a percentage (between 0 and 1). | |
| int | CurrentTrainingFinishedIterations (self) |
| Number of iterations that are already finished in the current training. | |
| int | CurrentTrainingNumIterations (self) |
| Total number of training iterations that will be performed during the current training of the deep learning tool. | |
| int | NumTrainedIterations (self) |
| Number of iterations that were performed to train this deep learning tool. | |
| int | BestIteration (self) |
| Iteration at which the minimum validation error was reached. | |
| int | ImageCacheSize (self) |
| Size in byte of the image cache. | |
| ImageCacheSize (self, int value) | |
| Size in byte of the image cache. | |
| str | Path (self) |
| Path of the tool when loaded or saved using eVision.EasyDeepLearning.EDeepLearningTool.Save or eVision.EasyDeepLearning.EDeepLearningTool.Load. | |
| str | InferenceModelPath (self) |
| Path of the inference model when loaded or saved using eVision.EasyDeepLearning.EDeepLearningTool.SaveInferenceModel, eVision.EasyDeepLearning.EDeepLearningTool.LoadInferenceModel or eVision.EasyDeepLearning.EDeepLearningTool.SerializeInferenceModel. | |
| str | TrainingModelPath (self) |
| Path of the training model when loaded or saved using eVision.EasyDeepLearning.EDeepLearningTool.SaveTrainingModel, eVision.EasyDeepLearning.EDeepLearningTool.LoadTrainingModel or eVision.EasyDeepLearning.EDeepLearningTool.SerializeTrainingModel. | |
| str | SettingsPath (self) |
| Path of the settings when loaded or saved using eVision.EasyDeepLearning.EDeepLearningTool.SaveSettings, eVision.EasyDeepLearning.EDeepLearningTool.LoadSettings or eVision.EasyDeepLearning.EDeepLearningTool.SerializeSettings. | |
| int | AutoSavePeriod (self) |
| Auto-save period. | |
| AutoSavePeriod (self, int value) | |
| Auto-save period. | |
| eVision.EasyDeepLearning.EDeepLearningLearningRateType | LearningRateType (self) |
| Learning rate type. | |
| list[float] | LearningRateParameters (self) |
| Parameters of the learning rate. | |
| bool | EnableDeterministicTraining (self) |
| Whether to use deterministic training algorithm that allows to repeatable training results. | |
| EnableDeterministicTraining (self, bool value) | |
| Whether to use deterministic training algorithm that allows to repeatable training results. | |
| int | DeterministicTrainingRandomSeed (self) |
| Random seed to use when eVision.EasyDeepLearning.EDeepLearningTool.EnableDeterministicTraining is set to true. | |
| DeterministicTrainingRandomSeed (self, int value) | |
| Random seed to use when eVision.EasyDeepLearning.EDeepLearningTool.EnableDeterministicTraining is set to true. | |
| int | NumLabels (self) |
| Number of labels of this tool. | |
Static Public Member Functions | |
| str | GetAvailableModelTypes (int i) |
| Get the i-th available models to be used with eVision.EasyDeepLearning.EClassifier.ModelType. | |
| int | GetNumAvailableModelTypes () |
| Number of available models for training an EasyClassify tool. | |
| Static Public Member Functions inherited from eVision.EasyDeepLearning.EDeepLearningTool | |
| eVision.EasyDeepLearning.EDeepLearningTool|None | Create (str path) |
| Factory method to open a deep learning tool. | |
| eVision.EasyDeepLearning.EDeepLearningTool|None | Create (eVision.ESerializer|None serializer) |
| Factory method to open a deep learning tool. | |
| eVision.EasyDeepLearning.EDeepLearningTool|None | Create (eVision.EasyDeepLearning.EDeepLearningToolType type) |
| Factory method to open a deep learning tool. | |
| int | GetNumAvailableEngines () |
| Number of available engines. | |
| str | GetAvailableEngineName (int id) |
| Gets the name of the engine given its id. | |
| list[str] | GetAvailableEngines () |
| Available engines. | |
| list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] | GetAvailableDevicesForEngine (str engine) |
| Available devices for the specified engine. | |
Additional Inherited Members | |
| Protected Member Functions inherited from eVision.EasyDeepLearning.EDeepLearningTool | |
| _ActiveDeviceByName__setter (self, str value) | |
| Sets the device with which to run the model using its name. | |
| _ActiveDeviceById__setter (self, int value) | |
| Sets the device with which to run the model using its index in the list returned by eVision.EasyDeepLearning.EDeepLearningTool.AvailableDevices. | |
| _ActiveDevicesById__setter (self, list[int] value) | |
| Sets the devices with which to run the model using their index in the list returned by eVision.EasyDeepLearning.EDeepLearningTool.AvailableDevices. | |
| Properties inherited from eVision.EasyDeepLearning.EDeepLearningTool | |
| ActiveDeviceByName | |
| ActiveDeviceById | |
| ActiveDevicesById | |
eVision.EasyDeepLearning.EClassifier allows to train a classifier using an eVision.EasyDeepLearning.EDataset object and classify new images.
As required by Deep Learning techniques, the input image of eVision.EasyDeepLearning.EClassifier must be of the same format (width, height, number of channels). By default, this format will be 224x224xC (which is the format used for pre-training our networks) with C being the number of channel of the first image of the dataset. The format can also be specified by the eVision.EasyDeepLearning.EClassifier.Width, eVision.EasyDeepLearning.EClassifier.Height and eVision.EasyDeepLearning.EClassifier.Channels unless its width and height is smaller than the minimum width and height supported by the classifier. In this case, the input resolution will be the minimum resolution supported by the classifier. (See eVision.EasyDeepLearning.EClassifier.MinimumWidth and eVision.EasyDeepLearning.EClassifier.MinimumHeight). methods.
By default, images that don't satisfy the image format of the classifier are automatically reformatted. This behavior can be controlled through the eVision.EasyDeepLearning.EClassifier.EnableAutomaticImageReformat method. When the automatic image reformatting is disabled, training or classifying an image that doesn't satisfy the input image format will result in an exception.
Once trained, the input image format cannot be changed.
Remarks:
License(s): EasyClassify or EasyClassifyInference
| None eVision.EasyDeepLearning.EClassifier.__init__ | ( | self | ) |
Constructs a eVision.EasyDeepLearning.EClassifier object.
| None eVision.EasyDeepLearning.EClassifier.__init__ | ( | self, | |
| eVision.EasyDeepLearning.EClassifier | other ) |
Copy constructor of a eVision.EasyDeepLearning.EClassifier object.
| other | Reference to the eVision.EasyDeepLearning.EClassifier object that should be copied |
| eVision.EasyDeepLearning.EClassifierCapacity eVision.EasyDeepLearning.EClassifier.Capacity | ( | self | ) |
Capacity of classifier to use.
Be aware that changing the classifier capacity will delete the effect of any previous training. The capacity will be translated to the corresponding type (Small, Normal, or Large).
| eVision.EasyDeepLearning.EClassifier.Capacity | ( | self, | |
| eVision.EasyDeepLearning.EClassifierCapacity | value ) |
Capacity of classifier to use.
Be aware that changing the classifier capacity will delete the effect of any previous training. The capacity will be translated to the corresponding type (Small, Normal, or Large).
| int eVision.EasyDeepLearning.EClassifier.Channels | ( | self | ) |
Number of channels for input images of the classifier.
The number of channels can be either 1 (monochrome image) or 3 (RGB image). By default, this value will be set from the format of the first image added to the training dataset.
Remarks:
If the classifier is not trained or the value was not explicitly set, its value will be 0.
| eVision.EasyDeepLearning.EClassifier.Channels | ( | self, | |
| int | value ) |
Number of channels for input images of the classifier.
The number of channels can be either 1 (monochrome image) or 3 (RGB image). By default, this value will be set from the format of the first image added to the training dataset.
Remarks:
If the classifier is not trained or the value was not explicitly set, its value will be 0.
| eVision.EasyDeepLearning.EClassificationResult eVision.EasyDeepLearning.EClassifier.Classify | ( | self, | |
| eVision.EBaseROI | img ) |
Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object.
The method throws an exception if the input image does not fulfill the input specification.
Remarks:
Classifying a set of images is usually faster than classifying each image sequentially.
To maximize the classification speed on a GPU, eVision.EasyDeepLearning.EDeepLearningTool.BatchSize and the size of the set of input images must be equal to the value returned by eVision.EasyDeepLearning.EDeepLearningTool.BatchSizeForMaximumInferenceSpeed.
| img | Image to classify |
| eVision.EasyDeepLearning.EClassificationResult eVision.EasyDeepLearning.EClassifier.Classify | ( | self, | |
| eVision.EBaseROI | img, | ||
| eVision.ERegion | mask ) |
Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object.
The method throws an exception if the input image does not fulfill the input specification.
Remarks:
Classifying a set of images is usually faster than classifying each image sequentially.
To maximize the classification speed on a GPU, eVision.EasyDeepLearning.EDeepLearningTool.BatchSize and the size of the set of input images must be equal to the value returned by eVision.EasyDeepLearning.EDeepLearningTool.BatchSizeForMaximumInferenceSpeed.
| img | Image to classify |
| mask | Mask of image to classify |
| eVision.EasyDeepLearning.EClassificationResult eVision.EasyDeepLearning.EClassifier.Classify | ( | self, | |
| eVision.EBaseROI | img, | ||
| eVision.ERegion | mask, | ||
| eVision.EFrame | frame ) |
Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object.
The method throws an exception if the input image does not fulfill the input specification.
Remarks:
Classifying a set of images is usually faster than classifying each image sequentially.
To maximize the classification speed on a GPU, eVision.EasyDeepLearning.EDeepLearningTool.BatchSize and the size of the set of input images must be equal to the value returned by eVision.EasyDeepLearning.EDeepLearningTool.BatchSizeForMaximumInferenceSpeed.
| img | Image to classify |
| mask | Mask of image to classify |
| frame | Frame associated with the mask. |
| list[eVision._eVision.EasyDeepLearning.EClassificationResult] eVision.EasyDeepLearning.EClassifier.Classify | ( | self, | |
| list[eVision._eVision.EBaseROI | None] | imgList ) |
Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object.
The method throws an exception if the input image does not fulfill the input specification.
Remarks:
Classifying a set of images is usually faster than classifying each image sequentially.
To maximize the classification speed on a GPU, eVision.EasyDeepLearning.EDeepLearningTool.BatchSize and the size of the set of input images must be equal to the value returned by eVision.EasyDeepLearning.EDeepLearningTool.BatchSizeForMaximumInferenceSpeed.
| imgList | Vector of images to classify |
| list[eVision._eVision.EasyDeepLearning.EClassificationResult] eVision.EasyDeepLearning.EClassifier.Classify | ( | self, | |
| list[eVision._eVision.EBaseROI | None] | imgList, | ||
| eVision.ERegion | mask ) |
Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object.
The method throws an exception if the input image does not fulfill the input specification.
Remarks:
Classifying a set of images is usually faster than classifying each image sequentially.
To maximize the classification speed on a GPU, eVision.EasyDeepLearning.EDeepLearningTool.BatchSize and the size of the set of input images must be equal to the value returned by eVision.EasyDeepLearning.EDeepLearningTool.BatchSizeForMaximumInferenceSpeed.
| imgList | Vector of images to classify |
| mask | Mask of image to classify |
| list[eVision._eVision.EasyDeepLearning.EClassificationResult] eVision.EasyDeepLearning.EClassifier.Classify | ( | self, | |
| list[eVision._eVision.EBaseROI | None] | imgList, | ||
| eVision.ERegion | mask, | ||
| eVision.EFrame | frame ) |
Classifies images and returns the complete results as an eVision.EasyDeepLearning.EClassificationResult object.
The method throws an exception if the input image does not fulfill the input specification.
Remarks:
Classifying a set of images is usually faster than classifying each image sequentially.
To maximize the classification speed on a GPU, eVision.EasyDeepLearning.EDeepLearningTool.BatchSize and the size of the set of input images must be equal to the value returned by eVision.EasyDeepLearning.EDeepLearningTool.BatchSizeForMaximumInferenceSpeed.
| imgList | Vector of images to classify |
| mask | Mask of image to classify |
| frame | Frame associated with the mask. |
| bool eVision.EasyDeepLearning.EClassifier.ComputeHeatmapWithResult | ( | self | ) |
Whether to always compute the heatmap along the result when applying the tool.
If true, the heatmap is available through eVision.EasyDeepLearning.EClassificationResult.Heatmap.
| eVision.EasyDeepLearning.EClassifier.ComputeHeatmapWithResult | ( | self, | |
| bool | value ) |
Whether to always compute the heatmap along the result when applying the tool.
If true, the heatmap is available through eVision.EasyDeepLearning.EClassificationResult.Heatmap.
| bool eVision.EasyDeepLearning.EClassifier.ComputeOODWithResult | ( | self | ) |
Whether to compute the OOD parameters while training.
Also determines whether the OOD score is computed alongside the result when applying the tool. If true, the OOD score is available through eVision.EasyDeepLearning.EClassificationResult.OODScore.
| eVision.EasyDeepLearning.EClassifier.ComputeOODWithResult | ( | self, | |
| bool | value ) |
Whether to compute the OOD parameters while training.
Also determines whether the OOD score is computed alongside the result when applying the tool. If true, the OOD score is available through eVision.EasyDeepLearning.EClassificationResult.OODScore.
| bool eVision.EasyDeepLearning.EClassifier.EnableAutomaticImageReformat | ( | self | ) |
Enable automatic image reformat (true by default).
| eVision.EasyDeepLearning.EClassifier.EnableAutomaticImageReformat | ( | self, | |
| bool | value ) |
Enable automatic image reformat (true by default).
| bool eVision.EasyDeepLearning.EClassifier.EnableHistogramEqualization | ( | self | ) |
Enable histogram equalization of all images passing through the classifier.
(false by default)
| eVision.EasyDeepLearning.EClassifier.EnableHistogramEqualization | ( | self, | |
| bool | value ) |
Enable histogram equalization of all images passing through the classifier.
(false by default)
| eVision.EasyDeepLearning.EClassificationMetrics eVision.EasyDeepLearning.EClassifier.Evaluate | ( | self, | |
| eVision.EasyDeepLearning.EDataset | dataset ) |
Evaluates the eVision.EasyDeepLearning.EClassifier using the given eVision.EasyDeepLearning.EDataset.
Remarks:
This method computes various metrics (see eVision.EasyDeepLearning.EClassificationMetrics on the given dataset.
The method ignores the label weights and the data augmentation settings of the given dataset. However, the label weights can be taken into consideration in the returned eVision.EasyDeepLearning.EClassificationMetrics object.
License(s): EasyClassify
| dataset | eVision.EasyDeepLearning.EDataset with which to evaluate the classifier |
|
static |
Get the i-th available models to be used with eVision.EasyDeepLearning.EClassifier.ModelType.
| i | Index of the model between 0 and eVision.EasyDeepLearning.EClassifier.GetNumAvailableModelTypes - 1. |
| eVision.EImageC24 eVision.EasyDeepLearning.EClassifier.GetColorizedHeatMap | ( | self, | |
| eVision.EBaseROI | image, | ||
| str | label ) |
Gets a colorized heatmap associated with the given label.
A heatmap is an image that indicates which pixels in the original image best explain the given label.
| image | A reference to the image we want to generate the heatmap from. |
| label | A reference to the string representing the label we want to explain for the given image. |
| eVision.EImageC24A eVision.EasyDeepLearning.EClassifier.GetColorizedHeatmapWithTransparency | ( | self, | |
| eVision.EBaseROI | image, | ||
| str | label, | ||
| float | minAlpha, | ||
| float | maxAlpha ) |
Colorized heatmap with transparency.
When the minimum and maximum alpha values are different from each other, the transparency value for a pixel will depend on the value of the heatmap at that pixel. The range of heatmap values [0, 255] will be mapped to the range [minAlpha, maxAlpha].
| image | A reference to the image we want to generate the heatmap from. |
| label | A reference to the string representing the label we want to explain for the given image. |
| minAlpha | Minimum transparency value. |
| maxAlpha | Maximum transparency value. |
| eVision.EImageC24A eVision.EasyDeepLearning.EClassifier.GetColorizedHeatmapWithTransparency | ( | self, | |
| eVision.EBaseROI | image, | ||
| str | label, | ||
| float | minAlpha, | ||
| float | maxAlpha, | ||
| eVision.EasyDeepLearning.EHeatmapColormap | colormap ) |
Colorized heatmap with transparency.
When the minimum and maximum alpha values are different from each other, the transparency value for a pixel will depend on the value of the heatmap at that pixel. The range of heatmap values [0, 255] will be mapped to the range [minAlpha, maxAlpha].
| image | A reference to the image we want to generate the heatmap from. |
| label | A reference to the string representing the label we want to explain for the given image. |
| minAlpha | Minimum transparency value. |
| maxAlpha | Maximum transparency value. |
| colormap | Color map |
| eVision.EImageBW8 eVision.EasyDeepLearning.EClassifier.GetHeatMap | ( | self, | |
| eVision.EBaseROI | image, | ||
| str | label ) |
Gets a heatmap associated with the given label.
A heatmap is an image that indicates which pixels in the original image best explain the given label.
| image | A reference to the image we want to generate the heatmap from. |
| label | A reference to the string representing the label we want to explain for the given image. |
|
static |
Number of available models for training an EasyClassify tool.
| eVision.EasyDeepLearning.EClassificationMetrics eVision.EasyDeepLearning.EClassifier.GetTrainingMetrics | ( | self, | |
| int | id ) |
Gets the metrics obtained with the training dataset at the given iteration.
The iterations are indexed between 0 and eVision.EasyDeepLearning.EDeepLearningTool.NumTrainedIterations - 1.
| id | The iteration index |
| eVision.EasyDeepLearning.EClassificationMetrics eVision.EasyDeepLearning.EClassifier.GetValidationMetrics | ( | self, | |
| int | id ) |
Gets the metrics obtained with the validation dataset at the given iteration.
The iterations are indexed between 0 and eVision.EasyDeepLearning.EDeepLearningTool.NumTrainedIterations - 1.
| id | The iteration index |
| bool eVision.EasyDeepLearning.EClassifier.HasOODParameters | ( | self | ) |
Checks whether the OOD parameters have been learned.
| bool eVision.EasyDeepLearning.EClassifier.HasPretrainedModel | ( | self | ) |
Whether a pre-trained model for the current configuration can be found.
| int eVision.EasyDeepLearning.EClassifier.Height | ( | self | ) |
Height for input images of the classifier.
By default, this value will be set to 224 if it wasn't explicitly set before training.
Remarks:
If the classifier is not trained or the value was not explicitly set, its value will be 0.
| eVision.EasyDeepLearning.EClassifier.Height | ( | self, | |
| int | value ) |
Height for input images of the classifier.
By default, this value will be set to 224 if it wasn't explicitly set before training.
Remarks:
If the classifier is not trained or the value was not explicitly set, its value will be 0.
| None eVision.EasyDeepLearning.EClassifier.LearnOODParameters | ( | self, | |
| eVision.EasyDeepLearning.EDataset | trainList, | ||
| eVision.EasyDeepLearning.EDataset | valList ) |
Learns OOD parameters using training data.
The dataset must correspond to the dataset used to train the classifier.
| trainList | List of images used for training the EClassifier. |
| valList | List of images used as validation during the training of the EClassifier. |
| None eVision.EasyDeepLearning.EClassifier.LearnOODParameters | ( | self, | |
| list[eVision._eVision.EBaseROI | None] | trainList, | ||
| list[eVision._eVision.EBaseROI | None] | valList ) |
Learns OOD parameters using training data.
The dataset must correspond to the dataset used to train the classifier.
| trainList | List of images used for training the EClassifier. |
| valList | List of images used as validation during the training of the EClassifier. |
| None eVision.EasyDeepLearning.EClassifier.LoadAsPretrained | ( | self, | |
| str | path ) |
Loads the classifier and use it as a pre-trained model.
| path | Path to the pre-trained model. |
| None eVision.EasyDeepLearning.EClassifier.LoadOnnxModel | ( | self, | |
| str | path ) |
Loads the ONNX model for inference.
The methods will automatically create labels according to the number of classes in the ONNX model. The labels are named according to their position, i.e. "0", "1", etc. You can change the labels afterward using the method eVision.EasyDeepLearning.EDeepLearningTool.SetLabel.
| None eVision.EasyDeepLearning.EClassifier.LoadOnnxModelAsPretrained | ( | self, | |
| str | path ) |
Loads the ONNX model as a pre-trained model.
This method loads the architecture of the neural network as well as the trained weights in the model but discards the weights and parameters of some of the last layers to allow retraining on a new dataset with a different number of labels.
| int eVision.EasyDeepLearning.EClassifier.MinimumHeight | ( | self | ) |
Minimum height for input images of the classifier.
This value is equal to 1 for standard networks.
| int eVision.EasyDeepLearning.EClassifier.MinimumWidth | ( | self | ) |
Minimum width for input images of the classifier.
This value is equal to 1 for standard networks.
| str eVision.EasyDeepLearning.EClassifier.ModelType | ( | self | ) |
Model type for training.
Default: "Normal".
The list of available models is available through eVision.EasyDeepLearning.EClassifier.GetAvailableModelTypes.
| eVision.EasyDeepLearning.EClassifier.ModelType | ( | self, | |
| str | value ) |
Model type for training.
Default: "Normal".
The list of available models is available through eVision.EasyDeepLearning.EClassifier.GetAvailableModelTypes.
| float eVision.EasyDeepLearning.EClassifier.OODThreshold | ( | self | ) |
Out-Of-Distribution (OOD) threshold below which an image is considered to be OOD.
Remarks:
If training has been carried out with eVision.EasyDeepLearning.EClassifier.ComputeOODWithResult set to True, the parameters have been automatically initialized. Otherwise, call eVision.EasyDeepLearning.EClassifier.LearnOODParameters with the training data before calling this method.
The OOD threshold is automatically initialized during learning. If needed, the parameter can also be changed manually.
| eVision.EasyDeepLearning.EClassifier.OODThreshold | ( | self, | |
| float | value ) |
Out-Of-Distribution (OOD) threshold below which an image is considered to be OOD.
Remarks:
If training has been carried out with eVision.EasyDeepLearning.EClassifier.ComputeOODWithResult set to True, the parameters have been automatically initialized. Otherwise, call eVision.EasyDeepLearning.EClassifier.LearnOODParameters with the training data before calling this method.
The OOD threshold is automatically initialized during learning. If needed, the parameter can also be changed manually.
| None eVision.EasyDeepLearning.EClassifier.SerializeSettings | ( | self, | |
| eVision.ESerializer | None | serializer ) |
Serializes the classifier settings.
| serializer | Pointer to eVision.ESerializer |
Reimplemented from eVision.EasyDeepLearning.EDeepLearningTool.
| eVision.EasyDeepLearning.EDeepLearningToolType eVision.EasyDeepLearning.EClassifier.ToolType | ( | self | ) |
Type of the deep learning tool.
Reimplemented from eVision.EasyDeepLearning.EDeepLearningTool.
| None eVision.EasyDeepLearning.EClassifier.Train | ( | self, | |
| eVision.EasyDeepLearning.EDataset | dataset ) |
Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations.
At the end of the training, the deep learning tool is in the state it was at the iteration that gave the minimum validation error. See eVision.EasyDeepLearning.EDeepLearningTool.BestIteration.
If no iterations is given, the training will stop automatically.
Remarks:
License(s): EasyClassify
| dataset | eVision.EasyDeepLearning.EDataset with which to train and validate the deep learning tool |
| None eVision.EasyDeepLearning.EClassifier.Train | ( | self, | |
| eVision.EasyDeepLearning.EDataset | dataset, | ||
| eVision.EasyDeepLearning.EDataAugmentation | dataAugmentation ) |
Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations.
At the end of the training, the deep learning tool is in the state it was at the iteration that gave the minimum validation error. See eVision.EasyDeepLearning.EDeepLearningTool.BestIteration.
If no iterations is given, the training will stop automatically.
Remarks:
License(s): EasyClassify
| dataset | eVision.EasyDeepLearning.EDataset with which to train and validate the deep learning tool |
| dataAugmentation | Data augmentation to use during training |
| None eVision.EasyDeepLearning.EClassifier.Train | ( | self, | |
| eVision.EasyDeepLearning.EDataset | dataset, | ||
| eVision.EasyDeepLearning.EDataAugmentation | dataAugmentation, | ||
| int | iterations ) |
Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations.
At the end of the training, the deep learning tool is in the state it was at the iteration that gave the minimum validation error. See eVision.EasyDeepLearning.EDeepLearningTool.BestIteration.
If no iterations is given, the training will stop automatically.
Remarks:
License(s): EasyClassify
| dataset | eVision.EasyDeepLearning.EDataset with which to train and validate the deep learning tool |
| dataAugmentation | Data augmentation to use during training |
| iterations | Number of iterations for training. |
| None eVision.EasyDeepLearning.EClassifier.Train | ( | self, | |
| eVision.EasyDeepLearning.EDataset | dataset, | ||
| int | iterations ) |
Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations.
At the end of the training, the deep learning tool is in the state it was at the iteration that gave the minimum validation error. See eVision.EasyDeepLearning.EDeepLearningTool.BestIteration.
If no iterations is given, the training will stop automatically.
Remarks:
License(s): EasyClassify
| dataset | eVision.EasyDeepLearning.EDataset with which to train and validate the deep learning tool |
| iterations | Number of iterations for training. |
| None eVision.EasyDeepLearning.EClassifier.Train | ( | self, | |
| eVision.EasyDeepLearning.EDataset | trainingDataset, | ||
| eVision.EasyDeepLearning.EDataset | validationDataset ) |
Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations.
At the end of the training, the deep learning tool is in the state it was at the iteration that gave the minimum validation error. See eVision.EasyDeepLearning.EDeepLearningTool.BestIteration.
If no iterations is given, the training will stop automatically.
Remarks:
License(s): EasyClassify
| trainingDataset | eVision.EasyDeepLearning.EDataset with which to train the deep learning tool |
| validationDataset | eVision.EasyDeepLearning.EDataset with which to validate the deep learning tool |
| None eVision.EasyDeepLearning.EClassifier.Train | ( | self, | |
| eVision.EasyDeepLearning.EDataset | trainingDataset, | ||
| eVision.EasyDeepLearning.EDataset | validationDataset, | ||
| eVision.EasyDeepLearning.EDataAugmentation | dataAugmentation ) |
Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations.
At the end of the training, the deep learning tool is in the state it was at the iteration that gave the minimum validation error. See eVision.EasyDeepLearning.EDeepLearningTool.BestIteration.
If no iterations is given, the training will stop automatically.
Remarks:
License(s): EasyClassify
| trainingDataset | eVision.EasyDeepLearning.EDataset with which to train the deep learning tool |
| validationDataset | eVision.EasyDeepLearning.EDataset with which to validate the deep learning tool |
| dataAugmentation | Data augmentation to use during training |
| None eVision.EasyDeepLearning.EClassifier.Train | ( | self, | |
| eVision.EasyDeepLearning.EDataset | trainingDataset, | ||
| eVision.EasyDeepLearning.EDataset | validationDataset, | ||
| eVision.EasyDeepLearning.EDataAugmentation | dataAugmentation, | ||
| int | iterations ) |
Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations.
At the end of the training, the deep learning tool is in the state it was at the iteration that gave the minimum validation error. See eVision.EasyDeepLearning.EDeepLearningTool.BestIteration.
If no iterations is given, the training will stop automatically.
Remarks:
License(s): EasyClassify
| trainingDataset | eVision.EasyDeepLearning.EDataset with which to train the deep learning tool |
| validationDataset | eVision.EasyDeepLearning.EDataset with which to validate the deep learning tool |
| dataAugmentation | Data augmentation to use during training |
| iterations | Number of iterations for training. |
| None eVision.EasyDeepLearning.EClassifier.Train | ( | self, | |
| eVision.EasyDeepLearning.EDataset | trainingDataset, | ||
| eVision.EasyDeepLearning.EDataset | validationDataset, | ||
| int | iterations ) |
Trains the eVision.EasyDeepLearning.EClassifier with the given dataset for the specified number of iterations.
At the end of the training, the deep learning tool is in the state it was at the iteration that gave the minimum validation error. See eVision.EasyDeepLearning.EDeepLearningTool.BestIteration.
If no iterations is given, the training will stop automatically.
Remarks:
License(s): EasyClassify
| trainingDataset | eVision.EasyDeepLearning.EDataset with which to train the deep learning tool |
| validationDataset | eVision.EasyDeepLearning.EDataset with which to validate the deep learning tool |
| iterations | Number of iterations for training. |
| bool eVision.EasyDeepLearning.EClassifier.UsePretrainedModel | ( | self | ) |
Whether to use a pre-trained model when training.
Default: true if the pre-trained model are found on the disk.
| eVision.EasyDeepLearning.EClassifier.UsePretrainedModel | ( | self, | |
| bool | value ) |
Whether to use a pre-trained model when training.
Default: true if the pre-trained model are found on the disk.
| int eVision.EasyDeepLearning.EClassifier.Width | ( | self | ) |
Width for input images of the classifier.
By default, this value will be set to 224 if it wasn't explicitly set before training.
Remarks:
If the classifier is not trained or the value was not explicitly set, its value will be 0.
| eVision.EasyDeepLearning.EClassifier.Width | ( | self, | |
| int | value ) |
Width for input images of the classifier.
By default, this value will be set to 224 if it wasn't explicitly set before training.
Remarks:
If the classifier is not trained or the value was not explicitly set, its value will be 0.