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

An eVision.EasyDeepLearning.EClassificationResult object represents the result of a classification. More...

Public Member Functions

None __init__ (self)
 Constructs a non-valid eVision.EasyDeepLearning.EClassificationResult.
None __init__ (self, eVision.EasyDeepLearning.EClassificationResult other)
 Copy constructor of an eVision.EasyDeepLearning.EClassificationResult object.
bool IsValid (self)
 Indicates whether the result was produced by eVision.EasyDeepLearning.EClassifier.
float GetProbability (self, str label)
 Gets the probability corresponding to the given label.
int GetRanking (self, str label)
 Gets the ranking corresponding to the given label.
str GetLabel (self, int labelId)
 Classification label.
eVision.ERGBColor GetLabelColor (self, int i)
 Color of a label.
eVision.ERGBColor GetLabelColor (self, str label)
 Color of a label.
bool HasGroundtruth (self)
 Whether the result has a ground truth.
bool HasHeatmap (self)
 Whether the result contains a heatmap.
eVision.EImageC24 GetColorizedHeatmap (self, eVision.EasyDeepLearning.EHeatmapColormap colormap)
 Colorized heatmap with no transparency.
eVision.EImageC24 GetColorizedHeatmap (self)
 Colorized heatmap with no transparency.
eVision.EImageC24A GetColorizedHeatmapWithTransparency (self, float alpha, eVision.EasyDeepLearning.EHeatmapColormap colormap)
 Colorized heatmap with transparency.
eVision.EImageC24A GetColorizedHeatmapWithTransparency (self, float alpha)
 Colorized heatmap with transparency.
eVision.EImageC24A GetColorizedHeatmapWithTransparency (self)
 Colorized heatmap with transparency.
eVision.EImageC24A GetColorizedHeatmapWithTransparency (self, float minAlpha, float maxAlpha, eVision.EasyDeepLearning.EHeatmapColormap colormap)
 Colorized heatmap with transparency.
eVision.EImageC24A GetColorizedHeatmapWithTransparency (self, float minAlpha, float maxAlpha)
 Colorized heatmap with transparency.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float zoomX, float zoomY, float panX, float panY)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float zoomX, float zoomY, float panX)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float zoomX, float zoomY)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float zoomX)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float minAlpha, float maxAlpha, eVision.EasyDeepLearning.EHeatmapColormap colormap, float zoomX, float zoomY, float panX, float panY)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float minAlpha, float maxAlpha, eVision.EasyDeepLearning.EHeatmapColormap colormap, float zoomX, float zoomY, float panX)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float minAlpha, float maxAlpha, eVision.EasyDeepLearning.EHeatmapColormap colormap, float zoomX, float zoomY)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float minAlpha, float maxAlpha, eVision.EasyDeepLearning.EHeatmapColormap colormap, float zoomX)
 Draw the heatmap.
None DrawHeatmap (self, eVision.EDrawAdapter|None graphicsContext, float minAlpha, float maxAlpha, eVision.EasyDeepLearning.EHeatmapColormap colormap)
 Draw the heatmap.
bool HasOODScore (self)
 Whether the result contains an OOD score.
bool IsOOD (self)
 Whether the result is OOD.
int BestLabelId (self)
 Gets the most probable label id.
str BestLabel (self)
 Gets the most probable label.
float BestProbability (self)
 Gets the probability associated with the most probable label.
int NumLabels (self)
 Number of labels for which we have a probability or a ranking.
str GroundtruthLabel (self)
 Ground truth label.
eVision.EImageBW8 Heatmap (self)
 Heatmap.
float OODScore (self)
 Get the OOD score.
float OODThreshold (self)
 Get the OOD threshold.
 OODThreshold (self, float value)
 Get the OOD threshold.

Detailed Description

An eVision.EasyDeepLearning.EClassificationResult object represents the result of a classification.

The most probable label and its probability are accessible through the methods eVision.EasyDeepLearning.EClassificationResult.BestLabel and eVision.EasyDeepLearning.EClassificationResult.BestProbability. The probability and ranking of all labels are accessible through the eVision.EasyDeepLearning.EClassificationResult.GetProbability and eVision.EasyDeepLearning.EClassificationResult.GetRanking methods.

Remarks:

License(s): BasicTypes

Constructor & Destructor Documentation

◆ __init__() [1/2]

None eVision.EasyDeepLearning.EClassificationResult.__init__ ( self)

◆ __init__() [2/2]

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

Copy constructor of an eVision.EasyDeepLearning.EClassificationResult object.

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

Member Function Documentation

◆ BestLabel()

str eVision.EasyDeepLearning.EClassificationResult.BestLabel ( self)

Gets the most probable label.

◆ BestLabelId()

int eVision.EasyDeepLearning.EClassificationResult.BestLabelId ( self)

Gets the most probable label id.

◆ BestProbability()

float eVision.EasyDeepLearning.EClassificationResult.BestProbability ( self)

Gets the probability associated with the most probable label.

◆ DrawHeatmap() [1/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.

◆ DrawHeatmap() [2/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float minAlpha,
float maxAlpha,
eVision.EasyDeepLearning.EHeatmapColormap colormap )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.
colormapColor map

◆ DrawHeatmap() [3/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float minAlpha,
float maxAlpha,
eVision.EasyDeepLearning.EHeatmapColormap colormap,
float zoomX )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.
colormapColor map
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.

◆ DrawHeatmap() [4/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float minAlpha,
float maxAlpha,
eVision.EasyDeepLearning.EHeatmapColormap colormap,
float zoomX,
float zoomY )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.
colormapColor map
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, to provide isotropic zooming.

◆ DrawHeatmap() [5/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float minAlpha,
float maxAlpha,
eVision.EasyDeepLearning.EHeatmapColormap colormap,
float zoomX,
float zoomY,
float panX )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.
colormapColor map
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawHeatmap() [6/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float minAlpha,
float maxAlpha,
eVision.EasyDeepLearning.EHeatmapColormap colormap,
float zoomX,
float zoomY,
float panX,
float panY )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.
colormapColor map
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ DrawHeatmap() [7/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float zoomX )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.

◆ DrawHeatmap() [8/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float zoomX,
float zoomY )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, to provide isotropic zooming.

◆ DrawHeatmap() [9/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float zoomX,
float zoomY,
float panX )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.

◆ DrawHeatmap() [10/10]

None eVision.EasyDeepLearning.EClassificationResult.DrawHeatmap ( self,
eVision.EDrawAdapter | None graphicsContext,
float zoomX,
float zoomY,
float panX,
float panY )

Draw the heatmap.

By default, the heatmap will be in the eVision.EasyDeepLearning.EHeatmapColormap.Jet colormap with a 0.5 transparency.

Parameters
graphicsContextHandle of the device context on which to draw.
zoomXHorizontal zooming factor. A value greater than 1 means zoom in. By default, true scale is used.
zoomYVertical zooming factor. A value greater than 1 means zoom in. If set to 0, the default value, the horizontal zooming factor is used instead, to provide isotropic zooming.
panXHorizontal panning value expressed in pixels. By default, no panning occurs.
panYVertical panning value expressed in pixels. By default, no panning occurs.

◆ GetColorizedHeatmap() [1/2]

eVision.EImageC24 eVision.EasyDeepLearning.EClassificationResult.GetColorizedHeatmap ( self)

Colorized heatmap with no transparency.

◆ GetColorizedHeatmap() [2/2]

eVision.EImageC24 eVision.EasyDeepLearning.EClassificationResult.GetColorizedHeatmap ( self,
eVision.EasyDeepLearning.EHeatmapColormap colormap )

Colorized heatmap with no transparency.

Parameters
colormapColor map

◆ GetColorizedHeatmapWithTransparency() [1/5]

eVision.EImageC24A eVision.EasyDeepLearning.EClassificationResult.GetColorizedHeatmapWithTransparency ( self)

Colorized heatmap with transparency.

When a minimum and maximum alpha values are given, 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].

◆ GetColorizedHeatmapWithTransparency() [2/5]

eVision.EImageC24A eVision.EasyDeepLearning.EClassificationResult.GetColorizedHeatmapWithTransparency ( self,
float alpha )

Colorized heatmap with transparency.

When a minimum and maximum alpha values are given, 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
alphaTransparency to apply everywhere

◆ GetColorizedHeatmapWithTransparency() [3/5]

eVision.EImageC24A eVision.EasyDeepLearning.EClassificationResult.GetColorizedHeatmapWithTransparency ( self,
float alpha,
eVision.EasyDeepLearning.EHeatmapColormap colormap )

Colorized heatmap with transparency.

When a minimum and maximum alpha values are given, 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
alphaTransparency to apply everywhere
colormapColor map

◆ GetColorizedHeatmapWithTransparency() [4/5]

eVision.EImageC24A eVision.EasyDeepLearning.EClassificationResult.GetColorizedHeatmapWithTransparency ( self,
float minAlpha,
float maxAlpha )

Colorized heatmap with transparency.

When a minimum and maximum alpha values are given, 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
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.

◆ GetColorizedHeatmapWithTransparency() [5/5]

eVision.EImageC24A eVision.EasyDeepLearning.EClassificationResult.GetColorizedHeatmapWithTransparency ( self,
float minAlpha,
float maxAlpha,
eVision.EasyDeepLearning.EHeatmapColormap colormap )

Colorized heatmap with transparency.

When a minimum and maximum alpha values are given, 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
minAlphaMinimum transparency value.
maxAlphaMaximum transparency value.
colormapColor map

◆ GetLabel()

str eVision.EasyDeepLearning.EClassificationResult.GetLabel ( self,
int labelId )

Classification label.

The labels are indexed from 0 to eVision.EasyDeepLearning.EClassificationResult.NumLabels.

Parameters
labelIdId of the label

◆ GetLabelColor() [1/2]

eVision.ERGBColor eVision.EasyDeepLearning.EClassificationResult.GetLabelColor ( self,
int i )

Color of a label.

Remarks:

The label color is controlled at the tool level. To change a color in a result, change the label color in the tool.

Parameters
iIndex of the label for which to get the color (between 0 and eVision.EasyDeepLearning.EClassificationResult.NumLabels - 1)

◆ GetLabelColor() [2/2]

eVision.ERGBColor eVision.EasyDeepLearning.EClassificationResult.GetLabelColor ( self,
str label )

Color of a label.

Remarks:

The label color is controlled at the tool level. To change a color in a result, change the label color in the tool.

Parameters
labelLabel for which to get the color

◆ GetProbability()

float eVision.EasyDeepLearning.EClassificationResult.GetProbability ( self,
str label )

Gets the probability corresponding to the given label.

Parameters
labelThe label

◆ GetRanking()

int eVision.EasyDeepLearning.EClassificationResult.GetRanking ( self,
str label )

Gets the ranking corresponding to the given label.

The ranking goes from 1 (most probable label) to eVision.EasyDeepLearning.EDeepLearningTool.NumLabels (least probable label).

Parameters
labelThe label

◆ GroundtruthLabel()

str eVision.EasyDeepLearning.EClassificationResult.GroundtruthLabel ( self)

Ground truth label.

◆ HasGroundtruth()

bool eVision.EasyDeepLearning.EClassificationResult.HasGroundtruth ( self)

Whether the result has a ground truth.

◆ HasHeatmap()

bool eVision.EasyDeepLearning.EClassificationResult.HasHeatmap ( self)

Whether the result contains a heatmap.

◆ HasOODScore()

bool eVision.EasyDeepLearning.EClassificationResult.HasOODScore ( self)

Whether the result contains an OOD score.

◆ Heatmap()

eVision.EImageBW8 eVision.EasyDeepLearning.EClassificationResult.Heatmap ( self)

Heatmap.

◆ IsOOD()

bool eVision.EasyDeepLearning.EClassificationResult.IsOOD ( self)

Whether the result is OOD.

◆ IsValid()

bool eVision.EasyDeepLearning.EClassificationResult.IsValid ( self)

Indicates whether the result was produced by eVision.EasyDeepLearning.EClassifier.

A default constructed eVision.EasyDeepLearning.EClassificationResult is not valid.

◆ NumLabels()

int eVision.EasyDeepLearning.EClassificationResult.NumLabels ( self)

Number of labels for which we have a probability or a ranking.

◆ OODScore()

float eVision.EasyDeepLearning.EClassificationResult.OODScore ( self)

Get the OOD score.

◆ OODThreshold() [1/2]

float eVision.EasyDeepLearning.EClassificationResult.OODThreshold ( self)

Get the OOD threshold.

◆ OODThreshold() [2/2]

eVision.EasyDeepLearning.EClassificationResult.OODThreshold ( self,
float value )

Get the OOD threshold.