core.services.model.evaluator.model_evaluator¶
model_evaluator
¶
Classes:
Name | Description |
---|---|
ModelEvaluator |
Evaluates model predictions and logs metrics into a Picsellia experiment. |
ModelEvaluator(experiment, inference_type)
¶
Evaluates model predictions and logs metrics into a Picsellia experiment.
Supports classification, detection (rectangle), OCR, and segmentation (polygon) evaluations, including COCO-style and sklearn metrics.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
Experiment
|
The experiment where results will be logged. |
required |
|
InferenceType
|
Type of inference (classification, detection, etc.). |
required |
Methods:
Name | Description |
---|---|
evaluate |
Add and compute evaluation metrics from a list of predictions. |
add_evaluation |
Add a single prediction to the experiment as evaluation. |
compute_coco_metrics |
Compute COCO metrics and log them into the experiment. |
compute_classification_metrics |
Compute sklearn classification metrics (acc, precision, recall, F1). |
Attributes:
Name | Type | Description |
---|---|---|
experiment |
|
|
inference_type |
|
|
experiment_logger |
|
experiment = experiment
instance-attribute
¶
inference_type = inference_type
instance-attribute
¶
experiment_logger = BaseLogger(experiment=experiment, metric_mapping=MetricMapping())
instance-attribute
¶
evaluate(picsellia_predictions)
¶
Add and compute evaluation metrics from a list of predictions.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
list
|
List of PicselliaPrediction objects. |
required |
add_evaluation(evaluation)
¶
Add a single prediction to the experiment as evaluation.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
|
PicselliaClassificationPrediction | PicselliaRectanglePrediction | PicselliaPolygonPrediction | PicselliaOCRPrediction
|
A prediction (classification, rectangle, OCR, or polygon). |
required |