ObjectDetectionTpFpFn#

class ObjectDetectionTpFpFn[source]#

Calculate the TP, FP, FN and runs an evaluating function on the result.

Parameters
iou_thres: float, default: 0.5

Threshold of the IoU.

confidence_thres: float, default: 0.5

Threshold of the confidence.

evaluating_function: Union[Callable, str], default: “recall”

will run on each class result i.e func(tp, fp, fn)

__init__(*args, iou_thres: float = 0.5, confidence_thres: float = 0.5, evaluating_function: Union[Callable, str] = 'recall', averaging_method='per_class', **kwargs)[source]#
__new__(*args, **kwargs)#

Attributes

ObjectDetectionTpFpFn.required_output_keys

Methods

ObjectDetectionTpFpFn.attach(engine, name[, ...])

Attaches current metric to provided engine.

ObjectDetectionTpFpFn.calc_pairwise_ious(...)

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

ObjectDetectionTpFpFn.completed(engine, name)

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

ObjectDetectionTpFpFn.compute()

Compute metric value.

ObjectDetectionTpFpFn.detach(engine[, usage])

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

ObjectDetectionTpFpFn.get_confidences(detections)

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

ObjectDetectionTpFpFn.get_detection_areas(...)

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

ObjectDetectionTpFpFn.get_labels_areas(labels)

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

ObjectDetectionTpFpFn.group_class_detection_label(...)

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

ObjectDetectionTpFpFn.is_attached(engine[, ...])

Checks if current metric is attached to provided engine.

ObjectDetectionTpFpFn.iteration_completed(engine)

Helper method to update metric's computation.

ObjectDetectionTpFpFn.load_state_dict(state_dict)

Method replaces internal state of the class with provided state dict data.

ObjectDetectionTpFpFn.reset()

Reset metric state.

ObjectDetectionTpFpFn.started(engine)

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

ObjectDetectionTpFpFn.state_dict()

Method returns state dict with attributes of the metric specified in its _state_dict_all_req_keys attribute.

ObjectDetectionTpFpFn.update(output)

Update metric with batch of samples.