CVBpy 15.0
ClassificationPredictor Class Reference

Predictor to classify patterns with. More...

Inherits PredictorBaseEx.

Public Member Functions

Tuple[cvb.polimago.ClassificationResult, List[float]] classify (self, cvb.Image img, cvb.Point2D pos)
 Classify a location inside an image. More...
 
- Public Member Functions inherited from PredictorBase
bool is_compatible (self, cvb.Image img, cvb.Point2D pos)
 Verify the compatibility of a CVB image with this classifier. More...
 
- Public Member Functions inherited from PolimagoFactoryCreatedObject
None save (self, str file_name)
 Save this object into a file. More...
 

Properties

 classes = property
 List[str]: Class labels available in this predictor.
 
 classification = property
 int: The classification type for which this classifier has been generated (see cvb.polimago.ClassificationType).
 
 num_classes = property
 int: Number of classes a classification predictor has been trained for.
 
 output_dimension = property
 int: Dimension of results generated by this predictor.
 
- Properties inherited from PredictorBaseEx
 feature_resolution = property
 int: Feature resolution value with which the classifier was trained.
 
- Properties inherited from PolimagoFactoryCreatedObject
 correction = property
 cvb.Point2D: Correction factors in X and Y direction required to rescale the input images for projection onto the retina.
 
 feature_window_extent = property
 cvb.Rect: The feature window extent that has been used during classifier training.
 
 file_name = property
 str: Name of the file the object has been loaded from (or empty string if the object was not loaded).
 
 image_planes = property
 int: Intercept weight that has been used for generating this object.
 
 interpolation = property
 int: Interpolation setting used for generating this object (see cvb.polimago.InterpolationType).
 
 lambda_ = property
 float: Regularization value that has been used for generating this object.
 
 offset = property
 float: Intercept weight that has been used for generating this object.
 
 preprocessing = property
 str: Preprocessing code with which this object was generated.
 
 retina_size = property
 cvb.Size2D: Size of the 'Retina' in pixels. More...
 

Detailed Description

Predictor to classify patterns with.

Load a saved Polimago classification predictor from a file.

Parameters

file_name : str Name of the file to be loaded.

Member Function Documentation

◆ classify()

Tuple[cvb.polimago.ClassificationResult, List[float]] classify (   self,
cvb.Image  img,
cvb.Point2D  pos 
)

Classify a location inside an image.

Parameters

img : cvb.Image Image to classify in.

pos : cvb.Point2D Position to classify.

Returns

Tuple[cvb.polimago.ClassificationResult, List[float]] Tuple containing the classification result and list of floats with confidence distribution.