steps.base.model.prediction_converter¶
prediction_converter
¶
Functions:
| Name | Description |
|---|---|
convert_predictions_to_coco |
Convert a list of Picsellia predictions into COCO format annotations. |
Attributes:
| Name | Type | Description |
|---|---|---|
PredictionType |
|
PredictionType = Union[PicselliaClassificationPrediction, PicselliaRectanglePrediction, PicselliaPolygonPrediction]
module-attribute
¶
convert_predictions_to_coco(predictions, dataset, use_id=False)
¶
Convert a list of Picsellia predictions into COCO format annotations.
Supports: - Classification (as single-class boxes covering full image) - Object detection (rectangle) - Segmentation (polygon)
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
list[PredictionType]
|
List of predictions (classification, detection or segmentation) |
required |
|
CocoDataset
|
Dataset containing image + category info |
required |
|
bool
|
If True, match images using asset.id_with_extension instead of asset.filename |
False
|
Returns:
| Type | Description |
|---|---|
CocoDataset
|
Updated CocoDataset |