meanAveragePrecision(predictions:annotations:confidenceThresholds:overlapThreshold:)
Calculates the mean average precision at the bounding box overlap threshold.
Declaration
func meanAveragePrecision<Scalar>(predictions: [[DetectedObject<Label>]], annotations: [ObjectDetectionAnnotation<Label>], confidenceThresholds: [Label : Float] = [:], overlapThreshold: Double = 0.5) -> Scalar where Scalar : BinaryFloatingPointParameters
- predictions:
A list of all the predictions from an object detection model. Each element in the list is a list of predictions from one image.
- annotations:
A list of all the annotations. Each element is an
ObjectDetectionAnnotationobject from one image. - confidenceThresholds:
Confidence thresholds for each label. The values will always be between 0.0 and 1.0. If any label does not have a threshold, the
defaultConfidenceThresholdis used for that label. The default value is[:]. - overlapThreshold:
The overlap threshold for the bounding boxes. The value will always be between 0.0 and 1.0. The default value is
0.5.
Return Value
The mean average precision at the overlap threshold.