Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

How to carry out the concept of mAP

2025-01-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/01 Report--

In this issue, the editor will bring you the concept of how to carry out mAP. The article is rich in content and analyzes and narrates it from a professional point of view. I hope you can get something after reading this article.

We can see many models on Github, all of which have evaluation indicators of map value, as shown in the following figure:

What on earth is this? I've been looking up information for a long time...

What is TP, TN, FP, FN

The English full name of TP is True Positives, which refers to the sample that is assigned as a positive sample and the right sample is assigned, which represents the positive sample that is correctly classified.

The English full name of TN refers to the sample that is assigned as a negative sample and the right sample is assigned, which represents the negative sample that is correctly classified.

The English full name of FP is False Positives, which refers to the samples that are assigned as positive samples but misassigned, which represent the negative samples that have been misclassified.

The English full name of FN is False Negatives, which refers to the samples that are assigned as negative samples but misassigned, which represents the positive samples that have been misclassified.

True Negatives

What are Precision and Recall?

Precision means precision.

Recall refers to the recall rate.

What do the two stand for respectively?

The specific meaning of Precision is: the part that the classifier thinks is a positive class and is indeed a positive class accounts for the proportion that the classifier thinks is a positive class.

The specific meaning of Recall is: the part that the classifier thinks is a positive class and is really a positive class accounts for the proportion of all really positive classes.

What is mAP?

When it comes to mAP, we should also talk about what AP is.

When it comes to AP, contact the Precision and Recall mentioned in the previous section.

For the task of target detection, each class can calculate its Precision and Recall. Through reasonable calculation, each class can get a Pmure R curve, and the area under the curve is the value of AP.

Suppose there are M pictures, for one of them, it has N detection targets, it has K detection classes, and S Bounding Box (BB) is obtained by using the detector, each BB contains the location of BB and the score C for K classes.

The IOU value of the corresponding BB can be obtained by using the location of the GroundTruth.

1. Step 1:

For each class I, we perform the following steps:

For all BB, calculate the IOU value of the location of BB and its most corresponding GroundTruth, marked as MaxIOU, and then set a threshold threshold, which is generally set to 0.5.

When MaxIOUthreshold thinks that the prediction box best corresponds to the real box.

At this time, it is divided into two categories:

When the category of the box belongs to type I, you can record that it belongs to True Positive, make it TPi = 1, and record the score C that belongs to class I.

When the category of the box is not type I, you can record that it belongs to False Positive, make it FPi = 1, and record the score C that it belongs to class I.

2. Step 2:

From step 1, we can get K * S scores C and the meta-ancestors of TP and FP. In python, we can form tuples in the shape of (CLJ TP, FP), and sort the K * S meta-ancestors according to the score C.

3. Step 3

Intercept the score from the largest to the smallest, and intercept the S with the highest score. Through this step, we can get whether each box successfully corresponds to the class to which it belongs, and calculate the recall and precision obtained by each interception.

(the TP+FN used by Recall here = N (the number of N targets that a picture has, all of which are really positive).

In this way, we get S recall and precision points, and we draw the PR curve.

The AP value can be obtained from the PR curve.

And mAP is to average all the AP values.

The above is the concept of how to carry out mAP shared by the editor. If you happen to have similar doubts, you might as well refer to the above analysis to understand. If you want to know more about it, you are welcome to follow the industry information channel.

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report