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

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

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

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

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.

Protected Member Functions

eVision.EasyDeepLearning.EDeepLearningToolType _ToolType__getter (self)
 \cond
bool _UsePretrainedModel__getter (self)
 \cond
 _UsePretrainedModel__setter (self, bool value)
 Whether to use a pre-trained model when training.
int _Width__getter (self)
 \cond
 _Width__setter (self, int value)
 Width for input images of the classifier.
int _Height__getter (self)
 \cond
 _Height__setter (self, int value)
 Height for input images of the classifier.
int _Channels__getter (self)
 \cond
 _Channels__setter (self, int value)
 Number of channels for input images of the classifier.
bool _EnableAutomaticImageReformat__getter (self)
 \cond
 _EnableAutomaticImageReformat__setter (self, bool value)
 Enable automatic image reformat (true by default).
bool _EnableHistogramEqualization__getter (self)
 \cond
 _EnableHistogramEqualization__setter (self, bool value)
 Enable histogram equalization of all images passing through the classifier.
int _MinimumWidth__getter (self)
 \cond
int _MinimumHeight__getter (self)
 \cond
eVision.EasyDeepLearning.EClassifierCapacity _Capacity__getter (self)
 \cond
 _Capacity__setter (self, eVision.EasyDeepLearning.EClassifierCapacity value)
 Capacity of classifier to use.
str _ModelType__getter (self)
 \cond
 _ModelType__setter (self, str value)
 Model type for training.
float _OODThreshold__getter (self)
 \cond
 _OODThreshold__setter (self, float value)
 Out-Of-Distribution (OOD) threshold below which an image is considered to be OOD.
bool _ComputeHeatmapWithResult__getter (self)
 \cond
 _ComputeHeatmapWithResult__setter (self, bool value)
 Whether to always compute the heatmap along the result when applying the tool.
bool _ComputeOODWithResult__getter (self)
 \cond
 _ComputeOODWithResult__setter (self, bool value)
 Whether to compute the OOD parameters while training.
Protected Member Functions inherited from eVision.EasyDeepLearning.EDeepLearningTool
bool _EnableGPU__getter (self)
 \cond
 _EnableGPU__setter (self, bool value)
 Enable the use of a GPU for training and inference of the deep learning tool.
list[int] _GPUIndexes__getter (self)
 \cond
 _GPUIndexes__setter (self, list[int] value)
 Indexes of the GPUs to use for computations.
int _NumGPUs__getter (self)
 \cond
str _Engine__getter (self)
 \cond
 _Engine__setter (self, str value)
 Sets the engine with which to execute or train the neural network.
eVision.EasyDeepLearning.EDeepLearningInferencePrecision _InferencePrecision__getter (self)
 \cond
 _InferencePrecision__setter (self, eVision.EasyDeepLearning.EDeepLearningInferencePrecision value)
 Inference precision.
int _NumAvailableDevices__getter (self)
 \cond
list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] _AvailableDevices__getter (self)
 \cond
int _NumActiveDevices__getter (self)
 \cond
 _ActiveDeviceByName__setter (self, str value)
 \cond
 _ActiveDeviceById__setter (self, int value)
 \cond
list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] _ActiveDevices__getter (self)
 \cond
 _ActiveDevices__setter (self, list[eVision._eVision.EasyDeepLearning.EDeepLearningDevice] value)
 Devices with which to run or train the model.
 _ActiveDevicesById__setter (self, list[int] value)
 \cond
eVision.EasyDeepLearning.EDeepLearningExecutionSettings _ExecutionSettings__getter (self)
 \cond
 _ExecutionSettings__setter (self, eVision.EasyDeepLearning.EDeepLearningExecutionSettings value)
 Execution settings of the tool (engine, device(s), inference precision, batch size settings).
eVision.EasyDeepLearning.EDeepLearningDevice _EngineSetupDataDevice__getter (self)
 \cond
eVision.EasyDeepLearning.EDeepLearningInferencePrecision _EngineSetupDataInferencePrecision__getter (self)
 \cond
int _EngineSetupDataBatchSize__getter (self)
 \cond
bool _OptimizeBatchSize__getter (self)
 \cond
 _OptimizeBatchSize__setter (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__getter (self)
 \cond
int _BatchSize__getter (self)
 \cond
 _BatchSize__setter (self, int value)
 Batch size.
float _CurrentTrainingProgression__getter (self)
 \cond
int _CurrentTrainingFinishedIterations__getter (self)
 \cond
int _CurrentTrainingNumIterations__getter (self)
 \cond
int _NumTrainedIterations__getter (self)
 \cond
int _BestIteration__getter (self)
 \cond
int _ImageCacheSize__getter (self)
 \cond
 _ImageCacheSize__setter (self, int value)
 Size in byte of the image cache.
str _Path__getter (self)
 \cond
str _InferenceModelPath__getter (self)
 \cond
str _TrainingModelPath__getter (self)
 \cond
str _SettingsPath__getter (self)
 \cond
int _AutoSavePeriod__getter (self)
 \cond
 _AutoSavePeriod__setter (self, int value)
 Auto-save period.
eVision.EasyDeepLearning.EDeepLearningLearningRateType _LearningRateType__getter (self)
 \cond
list[float] _LearningRateParameters__getter (self)
 \cond
bool _EnableDeterministicTraining__getter (self)
 \cond
 _EnableDeterministicTraining__setter (self, bool value)
 Whether to use deterministic training algorithm that allows to repeatable training results.
int _DeterministicTrainingRandomSeed__getter (self)
 \cond
 _DeterministicTrainingRandomSeed__setter (self, int value)
 Random seed to use when eVision.EasyDeepLearning.EDeepLearningTool.EnableDeterministicTraining is set to true.
int _NumLabels__getter (self)
 \cond

Properties

 ToolType = property(_ToolType__getter, None)
 \endcond
 UsePretrainedModel = property(_UsePretrainedModel__getter, _UsePretrainedModel__setter)
 \endcond
 Width = property(_Width__getter, _Width__setter)
 \endcond
 Height = property(_Height__getter, _Height__setter)
 \endcond
 Channels = property(_Channels__getter, _Channels__setter)
 \endcond
 EnableAutomaticImageReformat = property(_EnableAutomaticImageReformat__getter, _EnableAutomaticImageReformat__setter)
 \endcond
 EnableHistogramEqualization = property(_EnableHistogramEqualization__getter, _EnableHistogramEqualization__setter)
 \endcond
 MinimumWidth = property(_MinimumWidth__getter, None)
 \endcond
 MinimumHeight = property(_MinimumHeight__getter, None)
 \endcond
 Capacity = property(_Capacity__getter, _Capacity__setter)
 \endcond
 ModelType = property(_ModelType__getter, _ModelType__setter)
 \endcond
 OODThreshold = property(_OODThreshold__getter, _OODThreshold__setter)
 \endcond
 ComputeHeatmapWithResult = property(_ComputeHeatmapWithResult__getter, _ComputeHeatmapWithResult__setter)
 \endcond
 ComputeOODWithResult = property(_ComputeOODWithResult__getter, _ComputeOODWithResult__setter)
 \endcond
Properties inherited from eVision.EasyDeepLearning.EDeepLearningTool
 ToolType = property(_ToolType__getter, None)
 \endcond
 EnableGPU = property(_EnableGPU__getter, _EnableGPU__setter)
 \endcond
 GPUIndexes = property(_GPUIndexes__getter, _GPUIndexes__setter)
 \endcond
 NumGPUs = property(_NumGPUs__getter, None)
 \endcond
 Engine = property(_Engine__getter, _Engine__setter)
 \endcond
 InferencePrecision = property(_InferencePrecision__getter, _InferencePrecision__setter)
 \endcond
 NumAvailableDevices = property(_NumAvailableDevices__getter, None)
 \endcond
 AvailableDevices = property(_AvailableDevices__getter, None)
 \endcond
 NumActiveDevices = property(_NumActiveDevices__getter, None)
 \endcond
 ActiveDeviceByName = property(None, _ActiveDeviceByName__setter)
 \endcond
 ActiveDeviceById = property(None, _ActiveDeviceById__setter)
 \endcond
 ActiveDevices = property(_ActiveDevices__getter, _ActiveDevices__setter)
 \endcond
 ActiveDevicesById = property(None, _ActiveDevicesById__setter)
 \endcond
 ExecutionSettings = property(_ExecutionSettings__getter, _ExecutionSettings__setter)
 \endcond
 EngineSetupDataDevice = property(_EngineSetupDataDevice__getter, None)
 \endcond
 EngineSetupDataInferencePrecision = property(_EngineSetupDataInferencePrecision__getter, None)
 \endcond
 EngineSetupDataBatchSize = property(_EngineSetupDataBatchSize__getter, None)
 \endcond
 OptimizeBatchSize = property(_OptimizeBatchSize__getter, _OptimizeBatchSize__setter)
 \endcond
 BatchSizeForMaximumInferenceSpeed = property(_BatchSizeForMaximumInferenceSpeed__getter, None)
 \endcond
 BatchSize = property(_BatchSize__getter, _BatchSize__setter)
 \endcond
 CurrentTrainingProgression = property(_CurrentTrainingProgression__getter, None)
 \endcond
 CurrentTrainingFinishedIterations = property(_CurrentTrainingFinishedIterations__getter, None)
 \endcond
 CurrentTrainingNumIterations = property(_CurrentTrainingNumIterations__getter, None)
 \endcond
 NumTrainedIterations = property(_NumTrainedIterations__getter, None)
 \endcond
 BestIteration = property(_BestIteration__getter, None)
 \endcond
 ImageCacheSize = property(_ImageCacheSize__getter, _ImageCacheSize__setter)
 \endcond
 Path = property(_Path__getter, None)
 \endcond
 InferenceModelPath = property(_InferenceModelPath__getter, None)
 \endcond
 TrainingModelPath = property(_TrainingModelPath__getter, None)
 \endcond
 SettingsPath = property(_SettingsPath__getter, None)
 \endcond
 AutoSavePeriod = property(_AutoSavePeriod__getter, _AutoSavePeriod__setter)
 \endcond
 LearningRateType = property(_LearningRateType__getter, None)
 \endcond
 LearningRateParameters = property(_LearningRateParameters__getter, None)
 \endcond
 EnableDeterministicTraining = property(_EnableDeterministicTraining__getter, _EnableDeterministicTraining__setter)
 \endcond
 DeterministicTrainingRandomSeed = property(_DeterministicTrainingRandomSeed__getter, _DeterministicTrainingRandomSeed__setter)
 \endcond
 NumLabels = property(_NumLabels__getter, None)
 \endcond

Detailed Description

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

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EasyDeepLearning.EClassifier.__init__ ( self)

◆ __init__() [2/2]

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

Copy constructor of a eVision.EasyDeepLearning.EClassifier object.

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

Member Function Documentation

◆ _Capacity__getter()

eVision.EasyDeepLearning.EClassifierCapacity eVision.EasyDeepLearning.EClassifier._Capacity__getter ( self)
protected

\cond

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

Deprecated
Deprecated in version 22.12. Scheduled to be removed in version 27.6.

◆ _Capacity__setter()

eVision.EasyDeepLearning.EClassifier._Capacity__setter ( self,
eVision.EasyDeepLearning.EClassifierCapacity value )
protected

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

Deprecated
Deprecated in version 22.12. Scheduled to be removed in version 27.6.

◆ _Channels__getter()

int eVision.EasyDeepLearning.EClassifier._Channels__getter ( self)
protected

\cond

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.

◆ _Channels__setter()

eVision.EasyDeepLearning.EClassifier._Channels__setter ( self,
int value )
protected

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.

◆ _ComputeHeatmapWithResult__getter()

bool eVision.EasyDeepLearning.EClassifier._ComputeHeatmapWithResult__getter ( self)
protected

\cond

Whether to always compute the heatmap along the result when applying the tool. If true, the heatmap is available through eVision.EasyDeepLearning.EClassificationResult.Heatmap.

◆ _ComputeHeatmapWithResult__setter()

eVision.EasyDeepLearning.EClassifier._ComputeHeatmapWithResult__setter ( self,
bool value )
protected

Whether to always compute the heatmap along the result when applying the tool.

If true, the heatmap is available through eVision.EasyDeepLearning.EClassificationResult.Heatmap.

◆ _ComputeOODWithResult__getter()

bool eVision.EasyDeepLearning.EClassifier._ComputeOODWithResult__getter ( self)
protected

\cond

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.

◆ _ComputeOODWithResult__setter()

eVision.EasyDeepLearning.EClassifier._ComputeOODWithResult__setter ( self,
bool value )
protected

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.

◆ _EnableAutomaticImageReformat__getter()

bool eVision.EasyDeepLearning.EClassifier._EnableAutomaticImageReformat__getter ( self)
protected

\cond

Enable automatic image reformat (true by default).

◆ _EnableAutomaticImageReformat__setter()

eVision.EasyDeepLearning.EClassifier._EnableAutomaticImageReformat__setter ( self,
bool value )
protected

Enable automatic image reformat (true by default).

◆ _EnableHistogramEqualization__getter()

bool eVision.EasyDeepLearning.EClassifier._EnableHistogramEqualization__getter ( self)
protected

\cond

Enable histogram equalization of all images passing through the classifier. (false by default)

◆ _EnableHistogramEqualization__setter()

eVision.EasyDeepLearning.EClassifier._EnableHistogramEqualization__setter ( self,
bool value )
protected

Enable histogram equalization of all images passing through the classifier.

(false by default)

◆ _Height__getter()

int eVision.EasyDeepLearning.EClassifier._Height__getter ( self)
protected

\cond

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.

◆ _Height__setter()

eVision.EasyDeepLearning.EClassifier._Height__setter ( self,
int value )
protected

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.

◆ _MinimumHeight__getter()

int eVision.EasyDeepLearning.EClassifier._MinimumHeight__getter ( self)
protected

\cond

Minimum height for input images of the classifier. This value is equal to 1 for standard networks.

◆ _MinimumWidth__getter()

int eVision.EasyDeepLearning.EClassifier._MinimumWidth__getter ( self)
protected

\cond

Minimum width for input images of the classifier. This value is equal to 1 for standard networks.

◆ _ModelType__getter()

str eVision.EasyDeepLearning.EClassifier._ModelType__getter ( self)
protected

\cond

Model type for training. Default: "Normal".

The list of available models is available through eVision.EasyDeepLearning.EClassifier.GetAvailableModelTypes.

◆ _ModelType__setter()

eVision.EasyDeepLearning.EClassifier._ModelType__setter ( self,
str value )
protected

Model type for training.

Default: "Normal".

The list of available models is available through eVision.EasyDeepLearning.EClassifier.GetAvailableModelTypes.

◆ _OODThreshold__getter()

float eVision.EasyDeepLearning.EClassifier._OODThreshold__getter ( self)
protected

\cond

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.

◆ _OODThreshold__setter()

eVision.EasyDeepLearning.EClassifier._OODThreshold__setter ( self,
float value )
protected

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.

◆ _ToolType__getter()

eVision.EasyDeepLearning.EDeepLearningToolType eVision.EasyDeepLearning.EClassifier._ToolType__getter ( self)
protected

\cond

Type of the deep learning tool.

Reimplemented from eVision.EasyDeepLearning.EDeepLearningTool.

◆ _UsePretrainedModel__getter()

bool eVision.EasyDeepLearning.EClassifier._UsePretrainedModel__getter ( self)
protected

\cond

Whether to use a pre-trained model when training.

Default: true if the pre-trained model are found on the disk.

◆ _UsePretrainedModel__setter()

eVision.EasyDeepLearning.EClassifier._UsePretrainedModel__setter ( self,
bool value )
protected

Whether to use a pre-trained model when training.

Default: true if the pre-trained model are found on the disk.

◆ _Width__getter()

int eVision.EasyDeepLearning.EClassifier._Width__getter ( self)
protected

\cond

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.

◆ _Width__setter()

eVision.EasyDeepLearning.EClassifier._Width__setter ( self,
int value )
protected

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.

◆ Classify() [1/6]

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.

Parameters
imgImage to classify

◆ Classify() [2/6]

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.

Parameters
imgImage to classify
maskMask of image to classify

◆ Classify() [3/6]

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.

Parameters
imgImage to classify
maskMask of image to classify
frameFrame associated with the mask.

◆ Classify() [4/6]

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.

Parameters
imgListVector of images to classify

◆ Classify() [5/6]

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.

Parameters
imgListVector of images to classify
maskMask of image to classify

◆ Classify() [6/6]

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.

Parameters
imgListVector of images to classify
maskMask of image to classify
frameFrame associated with the mask.

◆ Evaluate()

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

Parameters
dataseteVision.EasyDeepLearning.EDataset with which to evaluate the classifier

◆ GetAvailableModelTypes()

str eVision.EasyDeepLearning.EClassifier.GetAvailableModelTypes ( int i)
static

Get the i-th available models to be used with eVision.EasyDeepLearning.EClassifier.ModelType.

Parameters
iIndex of the model between 0 and eVision.EasyDeepLearning.EClassifier.GetNumAvailableModelTypes - 1.

◆ GetColorizedHeatMap()

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.

Parameters
imageA reference to the image we want to generate the heatmap from.
labelA reference to the string representing the label we want to explain for the given image.

◆ GetColorizedHeatmapWithTransparency() [1/2]

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

Parameters
imageA reference to the image we want to generate the heatmap from.
labelA reference to the string representing the label we want to explain for the given image.
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.

◆ GetColorizedHeatmapWithTransparency() [2/2]

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

Parameters
imageA reference to the image we want to generate the heatmap from.
labelA reference to the string representing the label we want to explain for the given image.
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.
colormapColor map

◆ GetHeatMap()

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.

Parameters
imageA reference to the image we want to generate the heatmap from.
labelA reference to the string representing the label we want to explain for the given image.

◆ GetNumAvailableModelTypes()

int eVision.EasyDeepLearning.EClassifier.GetNumAvailableModelTypes ( )
static

Number of available models for training an EasyClassify tool.

◆ GetTrainingMetrics()

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.

Parameters
idThe iteration index

◆ GetValidationMetrics()

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.

Parameters
idThe iteration index

◆ HasOODParameters()

bool eVision.EasyDeepLearning.EClassifier.HasOODParameters ( self)

Checks whether the OOD parameters have been learned.

◆ HasPretrainedModel()

bool eVision.EasyDeepLearning.EClassifier.HasPretrainedModel ( self)

Whether a pre-trained model for the current configuration can be found.

◆ LearnOODParameters() [1/2]

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.

Parameters
trainListList of images used for training the EClassifier.
valListList of images used as validation during the training of the EClassifier.

◆ LearnOODParameters() [2/2]

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.

Parameters
trainListList of images used for training the EClassifier.
valListList of images used as validation during the training of the EClassifier.

◆ LoadAsPretrained()

None eVision.EasyDeepLearning.EClassifier.LoadAsPretrained ( self,
str path )

Loads the classifier and use it as a pre-trained model.

Parameters
pathPath to the pre-trained model.

◆ LoadOnnxModel()

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.

◆ LoadOnnxModelAsPretrained()

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.

◆ SerializeSettings()

None eVision.EasyDeepLearning.EClassifier.SerializeSettings ( self,
eVision.ESerializer | None serializer )

Serializes the classifier settings.

Parameters
serializerPointer to eVision.ESerializer

Reimplemented from eVision.EasyDeepLearning.EDeepLearningTool.

◆ Train() [1/8]

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

Parameters
dataseteVision.EasyDeepLearning.EDataset with which to train and validate the deep learning tool

◆ Train() [2/8]

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

Parameters
dataseteVision.EasyDeepLearning.EDataset with which to train and validate the deep learning tool
dataAugmentationData augmentation to use during training

◆ Train() [3/8]

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

Parameters
dataseteVision.EasyDeepLearning.EDataset with which to train and validate the deep learning tool
dataAugmentationData augmentation to use during training
iterationsNumber of iterations for training.

◆ Train() [4/8]

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

Parameters
dataseteVision.EasyDeepLearning.EDataset with which to train and validate the deep learning tool
iterationsNumber of iterations for training.

◆ Train() [5/8]

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

Parameters
trainingDataseteVision.EasyDeepLearning.EDataset with which to train the deep learning tool
validationDataseteVision.EasyDeepLearning.EDataset with which to validate the deep learning tool

◆ Train() [6/8]

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

Parameters
trainingDataseteVision.EasyDeepLearning.EDataset with which to train the deep learning tool
validationDataseteVision.EasyDeepLearning.EDataset with which to validate the deep learning tool
dataAugmentationData augmentation to use during training

◆ Train() [7/8]

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

Parameters
trainingDataseteVision.EasyDeepLearning.EDataset with which to train the deep learning tool
validationDataseteVision.EasyDeepLearning.EDataset with which to validate the deep learning tool
dataAugmentationData augmentation to use during training
iterationsNumber of iterations for training.

◆ Train() [8/8]

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

Parameters
trainingDataseteVision.EasyDeepLearning.EDataset with which to train the deep learning tool
validationDataseteVision.EasyDeepLearning.EDataset with which to validate the deep learning tool
iterationsNumber of iterations for training.

Property Documentation

◆ Capacity

eVision.EasyDeepLearning.EClassifier.Capacity = property(_Capacity__getter, _Capacity__setter)
static

\endcond

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

Deprecated
Deprecated in version 22.12. Scheduled to be removed in version 27.6.

◆ Channels

eVision.EasyDeepLearning.EClassifier.Channels = property(_Channels__getter, _Channels__setter)
static

\endcond

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.

◆ ComputeHeatmapWithResult

eVision.EasyDeepLearning.EClassifier.ComputeHeatmapWithResult = property(_ComputeHeatmapWithResult__getter, _ComputeHeatmapWithResult__setter)
static

\endcond

Whether to always compute the heatmap along the result when applying the tool. If true, the heatmap is available through eVision.EasyDeepLearning.EClassificationResult.Heatmap.

◆ ComputeOODWithResult

eVision.EasyDeepLearning.EClassifier.ComputeOODWithResult = property(_ComputeOODWithResult__getter, _ComputeOODWithResult__setter)
static

\endcond

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.

◆ EnableAutomaticImageReformat

eVision.EasyDeepLearning.EClassifier.EnableAutomaticImageReformat = property(_EnableAutomaticImageReformat__getter, _EnableAutomaticImageReformat__setter)
static

\endcond

Enable automatic image reformat (true by default).

◆ EnableHistogramEqualization

eVision.EasyDeepLearning.EClassifier.EnableHistogramEqualization = property(_EnableHistogramEqualization__getter, _EnableHistogramEqualization__setter)
static

\endcond

Enable histogram equalization of all images passing through the classifier. (false by default)

◆ Height

eVision.EasyDeepLearning.EClassifier.Height = property(_Height__getter, _Height__setter)
static

\endcond

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.

◆ MinimumHeight

eVision.EasyDeepLearning.EClassifier.MinimumHeight = property(_MinimumHeight__getter, None)
static

\endcond

Minimum height for input images of the classifier. This value is equal to 1 for standard networks.

◆ MinimumWidth

eVision.EasyDeepLearning.EClassifier.MinimumWidth = property(_MinimumWidth__getter, None)
static

\endcond

Minimum width for input images of the classifier. This value is equal to 1 for standard networks.

◆ ModelType

eVision.EasyDeepLearning.EClassifier.ModelType = property(_ModelType__getter, _ModelType__setter)
static

\endcond

Model type for training. Default: "Normal".

The list of available models is available through eVision.EasyDeepLearning.EClassifier.GetAvailableModelTypes.

◆ OODThreshold

eVision.EasyDeepLearning.EClassifier.OODThreshold = property(_OODThreshold__getter, _OODThreshold__setter)
static

\endcond

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.

◆ ToolType

eVision.EasyDeepLearning.EClassifier.ToolType = property(_ToolType__getter, None)
static

\endcond

Type of the deep learning tool.

◆ UsePretrainedModel

eVision.EasyDeepLearning.EClassifier.UsePretrainedModel = property(_UsePretrainedModel__getter, _UsePretrainedModel__setter)
static

\endcond

Whether to use a pre-trained model when training.

Default: true if the pre-trained model are found on the disk.

◆ Width

eVision.EasyDeepLearning.EClassifier.Width = property(_Width__getter, _Width__setter)
static

\endcond

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.