mAP is used to measure the accuracy of object detectors. Itโ€™s calculated as the mean of average precisions found over each class.

Average Precision

Precision are recall are calculated as the following:

Average precision is calculated as follows.

  1. Rank all predictions in descending order of predicted confidence (IoU).

  2. Calculate precision and recall down the ranking. Recall increases while precision moves up and down in a zigzag pattern.

  3. Average precision is the area under the precision-recall curve,

  1. We can also smooth out the curve before calculating AP. In this case, we use a different formula: