Three minutes to take you to learn to calculate mAP in target detection

Code address: https://github.com/CV-deeplearning/calculate_detect_mAP.git

1. Popular understanding of mAP

      mAP: The average value of each category of AP.

      Well, some friends will ask: What does each category of AP mean? The answer is below.

      AP: The area enclosed by the PR curve and the coordinate axis. The larger the area, the better the detection effect of this category.

      For a detailed explanation of AP curve, please refer to my blog: Three minutes to take you to understand ROC curve and PR curve .

2. Code usage

      The overall catalog of the code is as follows:

         (1). Store your annotation files in the form of Pacal VOC in the ./data/Annotations/ directory;

         (2) .res.json saves the test results of your model. The format of res.json is as follows:

          (3). When your labels and data are ready, run: python calc_map.py, get the test results, and save the test results in res.txt. At the same time, the following information will be printed on the terminal:

 

Note: The above code can be used as a tool, welcome to start.

Guess you like

Origin blog.csdn.net/Guo_Python/article/details/113366278