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

Supervised segmentation tool. More...

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

Public Member Functions

None __init__ (self)
 Constructs a eVision.EasyDeepLearning.ESupervisedSegmenter object.
None __init__ (self, eVision.EasyDeepLearning.ESupervisedSegmenter other)
 Copy constructor of a eVision.EasyDeepLearning.ESupervisedSegmenter object.
None SerializeSettings (self, eVision.ESerializer|None serializer)
 Serializes the settings of the supervised segmenter.
eVision.EasyDeepLearning.ESupervisedSegmenterMetrics GetTrainingMetrics (self, int iteration)
 Training metrics at the given iteration.
eVision.EasyDeepLearning.ESupervisedSegmenterMetrics GetValidationMetrics (self, int iteration)
 Validation metrics at the given iteration.
None Train (self, eVision.EasyDeepLearning.EDataset dataset)
 Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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.ESupervisedSegmenter 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.ESupervisedSegmenter 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.ESupervisedSegmenter with the given dataset for the specified number of iterations.
None Train (self, eVision.EasyDeepLearning.EDataset dataset, int iterations)
 Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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.ESupervisedSegmenter 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.ESupervisedSegmenter 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.ESupervisedSegmenter with the given dataset for the specified number of iterations.
eVision.EasyDeepLearning.ESupervisedSegmenterResult Apply (self, eVision.EBaseROI img)
 Applies the unsupervised segmenter on the given image and its mask region.
eVision.EasyDeepLearning.ESupervisedSegmenterResult Apply (self, eVision.EBaseROI img, eVision.ERegion mask)
 Applies the unsupervised segmenter on the given image and its mask region.
eVision.EasyDeepLearning.ESupervisedSegmenterResult Apply (self, eVision.EBaseROI img, eVision.EFrame frame)
 Applies the unsupervised segmenter on the given image and its mask region.
eVision.EasyDeepLearning.ESupervisedSegmenterResult Apply (self, eVision.EBaseROI img, eVision.EFrame frame, eVision.ERegion mask)
 Applies the unsupervised segmenter on the given image and its mask region.
None Apply (self, list[eVision._eVision.EBaseROI|None] imgs, list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterResult|None] results)
 Applies the unsupervised segmenter on the given image and its mask region.
None Apply (self, list[eVision._eVision.EBaseROI|None] imgs, list[eVision._eVision.ERegion|None] masks, list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterResult|None] results)
 Applies the unsupervised segmenter on the given image and its mask region.
None Apply (self, list[eVision._eVision.EBaseROI|None] imgs, eVision.EFrame frame, list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterResult|None] results)
 Applies the unsupervised segmenter on the given image and its mask region.
None Apply (self, list[eVision._eVision.EBaseROI|None] imgs, eVision.EFrame frame, list[eVision._eVision.ERegion|None] masks, list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterResult|None] results)
 Applies the unsupervised segmenter on the given image and its mask region.
eVision.EasyDeepLearning.ESupervisedSegmenterMetrics Evaluate (self, eVision.EasyDeepLearning.EDataset dataset)
 Evaluates the dataset.
int GetNumPatchesForImage (self, int imageWidth, int imageHeight)
 Number of patches that will be extracted from an input image to perform inference.
int Channels (self)
 Number of channels of input images.
eVision.EasyDeepLearning.EDeepLearningToolType ToolType (self)
 Type of the deep learning tool.
eVision.EasyDeepLearning.ESupervisedSegmenterCapacity Capacity (self)
 Capacity of the eVision.EasyDeepLearning.ESupervisedSegmenter.
 Capacity (self, eVision.EasyDeepLearning.ESupervisedSegmenterCapacity value)
 Capacity of the eVision.EasyDeepLearning.ESupervisedSegmenter.
bool ForceGrayscale (self)
 Forces the eVision.EasyDeepLearning.ESupervisedSegmenter to convert all images to grayscale (default: false).
 ForceGrayscale (self, bool value)
 Forces the eVision.EasyDeepLearning.ESupervisedSegmenter to convert all images to grayscale (default: false).
int PatchSize (self)
 Patch size (width and height of the patches processed by the neural network).
 PatchSize (self, int value)
 Patch size (width and height of the patches processed by the neural network).
float SamplingDensity (self)
 Sampling density (default value: 1.25, its value must be equal or greater than 1).
 SamplingDensity (self, float value)
 Sampling density (default value: 1.25, its value must be equal or greater than 1).
float Scale (self)
 Down-scaling applied to images before processing them.
 Scale (self, float value)
 Down-scaling applied to images before processing them.
float ClassificationThreshold (self)
 Classification threshold for determining whether an image contains blobs with a label different than background.
 ClassificationThreshold (self, float value)
 Classification threshold for determining whether an image contains blobs with a label different than background.
bool ScaleDisabledAtInference (self)
 Whether to apply the scale parameter at inference or not.
 ScaleDisabledAtInference (self, bool value)
 Whether to apply the scale parameter at inference or not.
float InferenceScale (self)
 The effective scale applied when performing inference.
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.
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.

Additional Inherited Members

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

Detailed Description

Supervised segmentation tool.

The supervised segmentation tool segments the pixels of an image into various labels by learning a deep learning model on a dataset of segmented images.

The tool can work with images of any resolution higher than eVision.EasyDeepLearning.ESupervisedSegmenter.PatchSize by merging the results obtained by applying the deep neural network using a sliding window algorithm. The overlap between the sliding windows is controlled by eVision.EasyDeepLearning.ESupervisedSegmenter.SamplingDensity.

For defect detection/foreground blobs detection, the supervised segmenter offers a tradeoff between a high good detection rate and a high defect detection rate through a classification threshold that can be configured after training (eVision.EasyDeepLearning.ESupervisedSegmenter.ClassificationThreshold).

Remarks:

License(s): EasySegment or EasySegmentInference

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EasyDeepLearning.ESupervisedSegmenter.__init__ ( self)

◆ __init__() [2/2]

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

Copy constructor of a eVision.EasyDeepLearning.ESupervisedSegmenter object.

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

Member Function Documentation

◆ Apply() [1/8]

eVision.EasyDeepLearning.ESupervisedSegmenterResult eVision.EasyDeepLearning.ESupervisedSegmenter.Apply ( self,
eVision.EBaseROI img )

Applies the unsupervised segmenter on the given image and its mask region.

We recommend to use pointer-based versions of this method to avoid unnecessary image and result copies.

Parameters
imgImage to classify and segment defects in.

◆ Apply() [2/8]

eVision.EasyDeepLearning.ESupervisedSegmenterResult eVision.EasyDeepLearning.ESupervisedSegmenter.Apply ( self,
eVision.EBaseROI img,
eVision.EFrame frame )

Applies the unsupervised segmenter on the given image and its mask region.

We recommend to use pointer-based versions of this method to avoid unnecessary image and result copies.

Parameters
imgImage to classify and segment defects in.
frameFrame of reference in which the region was defined

◆ Apply() [3/8]

eVision.EasyDeepLearning.ESupervisedSegmenterResult eVision.EasyDeepLearning.ESupervisedSegmenter.Apply ( self,
eVision.EBaseROI img,
eVision.EFrame frame,
eVision.ERegion mask )

Applies the unsupervised segmenter on the given image and its mask region.

We recommend to use pointer-based versions of this method to avoid unnecessary image and result copies.

Parameters
imgImage to classify and segment defects in.
frameFrame of reference in which the region was defined
maskMask region of the image.

◆ Apply() [4/8]

eVision.EasyDeepLearning.ESupervisedSegmenterResult eVision.EasyDeepLearning.ESupervisedSegmenter.Apply ( self,
eVision.EBaseROI img,
eVision.ERegion mask )

Applies the unsupervised segmenter on the given image and its mask region.

We recommend to use pointer-based versions of this method to avoid unnecessary image and result copies.

Parameters
imgImage to classify and segment defects in.
maskMask region of the image.

◆ Apply() [5/8]

None eVision.EasyDeepLearning.ESupervisedSegmenter.Apply ( self,
list[eVision._eVision.EBaseROI | None] imgs,
eVision.EFrame frame,
list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterResult | None] results )

Applies the unsupervised segmenter on the given image and its mask region.

We recommend to use pointer-based versions of this method to avoid unnecessary image and result copies.

Parameters
imgsVector of image to classify and segment defects in.
frameFrame of reference in which the region was defined
resultsVector of eVision.EasyDeepLearning.ESupervisedSegmenterResult to put the segmented defects.

◆ Apply() [6/8]

None eVision.EasyDeepLearning.ESupervisedSegmenter.Apply ( self,
list[eVision._eVision.EBaseROI | None] imgs,
eVision.EFrame frame,
list[eVision._eVision.ERegion | None] masks,
list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterResult | None] results )

Applies the unsupervised segmenter on the given image and its mask region.

We recommend to use pointer-based versions of this method to avoid unnecessary image and result copies.

Parameters
imgsVector of image to classify and segment defects in.
frameFrame of reference in which the region was defined
masksVector of mask regions for the images.
resultsVector of eVision.EasyDeepLearning.ESupervisedSegmenterResult to put the segmented defects.

◆ Apply() [7/8]

None eVision.EasyDeepLearning.ESupervisedSegmenter.Apply ( self,
list[eVision._eVision.EBaseROI | None] imgs,
list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterResult | None] results )

Applies the unsupervised segmenter on the given image and its mask region.

We recommend to use pointer-based versions of this method to avoid unnecessary image and result copies.

Parameters
imgsVector of image to classify and segment defects in.
resultsVector of eVision.EasyDeepLearning.ESupervisedSegmenterResult to put the segmented defects.

◆ Apply() [8/8]

None eVision.EasyDeepLearning.ESupervisedSegmenter.Apply ( self,
list[eVision._eVision.EBaseROI | None] imgs,
list[eVision._eVision.ERegion | None] masks,
list[eVision._eVision.EasyDeepLearning.ESupervisedSegmenterResult | None] results )

Applies the unsupervised segmenter on the given image and its mask region.

We recommend to use pointer-based versions of this method to avoid unnecessary image and result copies.

Parameters
imgsVector of image to classify and segment defects in.
masksVector of mask regions for the images.
resultsVector of eVision.EasyDeepLearning.ESupervisedSegmenterResult to put the segmented defects.

◆ Capacity() [1/2]

eVision.EasyDeepLearning.ESupervisedSegmenterCapacity eVision.EasyDeepLearning.ESupervisedSegmenter.Capacity ( self)

Capacity of the eVision.EasyDeepLearning.ESupervisedSegmenter.

A higher capacity makes the supervised segmenter capable of learning more information at the cost of a slower processing speed.

◆ Capacity() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenter.Capacity ( self,
eVision.EasyDeepLearning.ESupervisedSegmenterCapacity value )

Capacity of the eVision.EasyDeepLearning.ESupervisedSegmenter.

A higher capacity makes the supervised segmenter capable of learning more information at the cost of a slower processing speed.

◆ Channels()

int eVision.EasyDeepLearning.ESupervisedSegmenter.Channels ( self)

Number of channels of input images.

It can either be 1 for grayscale images or 3 for color images.

Remarks:

If the segmenter tool is not trained or the value was not explicitly set, its value will be 0.

◆ ClassificationThreshold() [1/2]

float eVision.EasyDeepLearning.ESupervisedSegmenter.ClassificationThreshold ( self)

Classification threshold for determining whether an image contains blobs with a label different than background.

By default, its value is set during training to maximize the weighted accuracy (see eVision.EasyDeepLearning.ESupervisedSegmenterMetrics).

◆ ClassificationThreshold() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenter.ClassificationThreshold ( self,
float value )

Classification threshold for determining whether an image contains blobs with a label different than background.

By default, its value is set during training to maximize the weighted accuracy (see eVision.EasyDeepLearning.ESupervisedSegmenterMetrics).

◆ Evaluate()

eVision.EasyDeepLearning.ESupervisedSegmenterMetrics eVision.EasyDeepLearning.ESupervisedSegmenter.Evaluate ( self,
eVision.EasyDeepLearning.EDataset dataset )

Evaluates the dataset.

Remarks:

License(s): EasySegment

Parameters
datasetDataset to evaluate

◆ ForceGrayscale() [1/2]

bool eVision.EasyDeepLearning.ESupervisedSegmenter.ForceGrayscale ( self)

Forces the eVision.EasyDeepLearning.ESupervisedSegmenter to convert all images to grayscale (default: false).

Setting this property to false will make the underlying neural network operates with the same number of channels as the images in the dataset used for training. Otherwise, color images will be converted to grayscale before using them.

◆ ForceGrayscale() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenter.ForceGrayscale ( self,
bool value )

Forces the eVision.EasyDeepLearning.ESupervisedSegmenter to convert all images to grayscale (default: false).

Setting this property to false will make the underlying neural network operates with the same number of channels as the images in the dataset used for training. Otherwise, color images will be converted to grayscale before using them.

◆ GetNumPatchesForImage()

int eVision.EasyDeepLearning.ESupervisedSegmenter.GetNumPatchesForImage ( self,
int imageWidth,
int imageHeight )

Number of patches that will be extracted from an input image to perform inference.

For EasyClassify and EasyLocate, this will always be equal to 1. For EasySegment, the number of patches will depend on the scale, patch size and sampling density parameters.

Parameters
imageWidthWidth of the image for which to get the number of patch
imageHeightHeight of the image for which to get the number of patch

Reimplemented from eVision.EasyDeepLearning.EDeepLearningTool.

◆ GetTrainingMetrics()

eVision.EasyDeepLearning.ESupervisedSegmenterMetrics eVision.EasyDeepLearning.ESupervisedSegmenter.GetTrainingMetrics ( self,
int iteration )

Training metrics at the given iteration.

Parameters
iterationIteration at which to get the metrics

◆ GetValidationMetrics()

eVision.EasyDeepLearning.ESupervisedSegmenterMetrics eVision.EasyDeepLearning.ESupervisedSegmenter.GetValidationMetrics ( self,
int iteration )

Validation metrics at the given iteration.

Parameters
iterationIteration at which to get the metrics

◆ InferenceScale()

float eVision.EasyDeepLearning.ESupervisedSegmenter.InferenceScale ( self)

The effective scale applied when performing inference.

If eVision.EasyDeepLearning.ESupervisedSegmenter.ScaleDisabledAtInference is true, it is equal to 1.0. Otherwise, it is equal to eVision.EasyDeepLearning.ESupervisedSegmenter.Scale.

◆ PatchSize() [1/2]

int eVision.EasyDeepLearning.ESupervisedSegmenter.PatchSize ( self)

Patch size (width and height of the patches processed by the neural network).

Remarks:

There are three supported patch size: 64x64, 128x128, and 256x256. By default, the patch size is 0 and it means that the patch size will be 128x128 if all images in the training and validation dataset have a higher resolution or the patch size will be 64x64.

◆ PatchSize() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenter.PatchSize ( self,
int value )

Patch size (width and height of the patches processed by the neural network).

Remarks:

There are three supported patch size: 64x64, 128x128, and 256x256. By default, the patch size is 0 and it means that the patch size will be 128x128 if all images in the training and validation dataset have a higher resolution or the patch size will be 64x64.

◆ SamplingDensity() [1/2]

float eVision.EasyDeepLearning.ESupervisedSegmenter.SamplingDensity ( self)

Sampling density (default value: 1.25, its value must be equal or greater than 1).

The sampling density is the parameter of the sliding window algorithm used for processing a whole image using subwindows of size eVision.EasyDeepLearning.ESupervisedSegmenter.PatchSize. It indicates how much overlap there will be between the image patches: the stride between two consecutive patches is eVision.EasyDeepLearning.ESupervisedSegmenter.PatchSize / eVision.EasyDeepLearning.ESupervisedSegmenter.SamplingDensity.

◆ SamplingDensity() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenter.SamplingDensity ( self,
float value )

Sampling density (default value: 1.25, its value must be equal or greater than 1).

The sampling density is the parameter of the sliding window algorithm used for processing a whole image using subwindows of size eVision.EasyDeepLearning.ESupervisedSegmenter.PatchSize. It indicates how much overlap there will be between the image patches: the stride between two consecutive patches is eVision.EasyDeepLearning.ESupervisedSegmenter.PatchSize / eVision.EasyDeepLearning.ESupervisedSegmenter.SamplingDensity.

◆ Scale() [1/2]

float eVision.EasyDeepLearning.ESupervisedSegmenter.Scale ( self)

Down-scaling applied to images before processing them.

Its value is between 0 and 1 (default value: 1).

◆ Scale() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenter.Scale ( self,
float value )

Down-scaling applied to images before processing them.

Its value is between 0 and 1 (default value: 1).

◆ ScaleDisabledAtInference() [1/2]

bool eVision.EasyDeepLearning.ESupervisedSegmenter.ScaleDisabledAtInference ( self)

Whether to apply the scale parameter at inference or not.

If you disable the scale at inference, make sure your images are already scaled. For example, if you trained with images of 1024x1024 and a scale of 0.5, the inference images should be 512 x 512 images with the same field of view as the training images.

◆ ScaleDisabledAtInference() [2/2]

eVision.EasyDeepLearning.ESupervisedSegmenter.ScaleDisabledAtInference ( self,
bool value )

Whether to apply the scale parameter at inference or not.

If you disable the scale at inference, make sure your images are already scaled. For example, if you trained with images of 1024x1024 and a scale of 0.5, the inference images should be 512 x 512 images with the same field of view as the training images.

◆ SerializeSettings()

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

Serializes the settings of the supervised segmenter.

Parameters
serializerPointer to eVision.ESerializer

Reimplemented from eVision.EasyDeepLearning.EDeepLearningTool.

◆ ToolType()

eVision.EasyDeepLearning.EDeepLearningToolType eVision.EasyDeepLearning.ESupervisedSegmenter.ToolType ( self)

Type of the deep learning tool.

Reimplemented from eVision.EasyDeepLearning.EDeepLearningTool.

◆ Train() [1/8]

None eVision.EasyDeepLearning.ESupervisedSegmenter.Train ( self,
eVision.EasyDeepLearning.EDataset dataset )

Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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): EasySegment

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

◆ Train() [2/8]

None eVision.EasyDeepLearning.ESupervisedSegmenter.Train ( self,
eVision.EasyDeepLearning.EDataset dataset,
eVision.EasyDeepLearning.EDataAugmentation dataAugmentation )

Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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): EasySegment

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.ESupervisedSegmenter.Train ( self,
eVision.EasyDeepLearning.EDataset dataset,
eVision.EasyDeepLearning.EDataAugmentation dataAugmentation,
int iterations )

Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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): EasySegment

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.ESupervisedSegmenter.Train ( self,
eVision.EasyDeepLearning.EDataset dataset,
int iterations )

Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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): EasySegment

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.ESupervisedSegmenter.Train ( self,
eVision.EasyDeepLearning.EDataset trainingDataset,
eVision.EasyDeepLearning.EDataset validationDataset )

Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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): EasySegment

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.ESupervisedSegmenter.Train ( self,
eVision.EasyDeepLearning.EDataset trainingDataset,
eVision.EasyDeepLearning.EDataset validationDataset,
eVision.EasyDeepLearning.EDataAugmentation dataAugmentation )

Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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): EasySegment

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.ESupervisedSegmenter.Train ( self,
eVision.EasyDeepLearning.EDataset trainingDataset,
eVision.EasyDeepLearning.EDataset validationDataset,
eVision.EasyDeepLearning.EDataAugmentation dataAugmentation,
int iterations )

Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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): EasySegment

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.ESupervisedSegmenter.Train ( self,
eVision.EasyDeepLearning.EDataset trainingDataset,
eVision.EasyDeepLearning.EDataset validationDataset,
int iterations )

Trains the eVision.EasyDeepLearning.ESupervisedSegmenter 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): EasySegment

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.