ObjectDetectionAveragePrecision#

class ObjectDetectionAveragePrecision[source]#

Calculate average precision and recall for object detection.

Parameters
max_dets: Union[List[int], Tuple[int]], default: [1, 10, 100]

Maximum number of detections per class.

area_range: tuple, default: (32**2, 96**2)

Slices for small/medium/large buckets.

return_option: str, default: ‘ap’

ap: ap only, ar: ar only, None: all (not ignite complient)

__init__(*args, max_dets: Union[List[int], Tuple[int]] = (1, 10, 100), area_range: Tuple = (1024, 9216), return_option: Optional[str] = 'ap', average: str = 'none', iou_range: Tuple[float, float, float] = (0.5, 0.95, 10), **kwargs)[source]#
__new__(*args, **kwargs)#

Attributes

ObjectDetectionAveragePrecision.required_output_keys

Methods

ObjectDetectionAveragePrecision.attach(...)

Attaches current metric to provided engine.

ObjectDetectionAveragePrecision.calc_pairwise_ious(...)

Get a single result from group_class_detection_label and return a matrix of IoUs.

ObjectDetectionAveragePrecision.completed(...)

Helper method to compute metric's value and put into the engine.

ObjectDetectionAveragePrecision.compute()

Compute metric value.

ObjectDetectionAveragePrecision.detach(engine)

Detaches current metric from the engine and no metric's computation is done during the run.

ObjectDetectionAveragePrecision.filter_res(res)

Get the value of a result by the filtering values.

ObjectDetectionAveragePrecision.get_classes_scores_at(res)

Get the mean value of the classes scores and the result values.

ObjectDetectionAveragePrecision.get_confidences(...)

Get detections object of single image and should return confidence for each detection.

ObjectDetectionAveragePrecision.get_detection_areas(...)

Get detection object of single image and should return area for each detection.

ObjectDetectionAveragePrecision.get_labels_areas(labels)

Get labels object of single image and should return area for each label.

ObjectDetectionAveragePrecision.group_class_detection_label(...)

Group detection and labels in dict of format {class_id: {'detected' [...], 'ground_truth': [...] }}.

ObjectDetectionAveragePrecision.is_attached(engine)

Checks if current metric is attached to provided engine.

ObjectDetectionAveragePrecision.iteration_completed(engine)

Helper method to update metric's computation.

ObjectDetectionAveragePrecision.reset()

Reset metric state.

ObjectDetectionAveragePrecision.started(engine)

Helper method to start data gathering for metric's computation.

ObjectDetectionAveragePrecision.update(output)

Update metric with batch of samples.