# Mean Average Precision (MAP) object detection metric

I am reading up on object detection metrics from this github repository. I have a slight confusion regarding the precision x recall curve mentioned under the Metrics heading. It says that

The Precision x Recall curve is a good way to evaluate the performance of an object detector as the confidence is changed by plotting a curve for each object class

Before this section, they mentioned that precision and recall is obtained through IOU intersection between the ground truth and detected bounding box, which is decided by a threshold value. In the quote above, they talk about confidence of the prediction which I believe is the probability of class score.

My question is whether the precision x recall curve is obtained by varying the threshold for IOU or by varying the threshold for the probability of class scores? I would think it is the former although I am not too sure about it.

Both confidence and IoU affect the precision-recall curve.

The IoU is deciding the True Positives and False Positives, which are used to get accumulated TP and FP, which are in turn used to get precision and recall values that are plotted on the curve.

Also, note that confidence value is also being used here (the detections are sorted by the confidence value).

The Precision x Recall curve is a good way to evaluate the performance of an object detector as the confidence is changed by plotting a curve for each object class.

I'd try to rephrase this sentence:

For a given class, if you plot model's precision value w.r.t. recall values, you'd get a precision-recall curve, that can be used to analyze the performance of the model.

For simplicity, if you assume your model to be a classifier, how do you get different recall and corresponding precision values. Answer: by changing the confidence threshold. As you change the confidence, the TP and FP will change thus giving you disparate precision and recall values that you can plot. That's how confidence is being used in precision-recall curve.

A trade-off exists between the TruePositiveRate and FalsePositiveRate, such that changing the threshold of classification will change the balance of predictions towards improving the TruePositiveRate at the expense of FalsePositiveRate, or the reverse case.