Why do we sort confidence scores when calculating MAP in Object Detection? This question is specific to object detection's metric Mean Average Precision.
I sieved through multiple articles like the one by Jonathon and here by Kaggler Tito.
One part I cannot grasp immediately is the need to sort the confidence scores of the bounding box in descending order. What is the reason behind sorting here?
Is it because we want to have a cumulative precision and recall based on the cut-off threshold by the confidence scores since we are discarding all predictions under a certain confidence score?
If this is the case I still don't see how they handle ties in this manner? It will be good if someone can enlighten me on why sorting is needed. The reason might be very simple, so simple that after reading > 10 articles, I cannot find an explanation on why they sort.


Is it because we want to have a cumulative precision and recall based on the >cut-off threshold by the confidence scores since we are discarding all
predictions under a certain confidence score?

Yes, basically for calculating the mAP you need to calculate the area under the PR curve, and to plot the PR curve you need the confidence score of all the results.
You set a confidence score, calculate Precison and Recall of the results that have confidence > threshold and repeat the process for all threshold between 0 and 1. Sorting them is just for easier understanding or faster retrieving at running time (binary search maybe?) i think, you can just ignore it i think, it's not so relevant.
This is what i understood, basically everyone says different things or avoid specific explantions about this
Look at this https://github.com/rafaelpadilla/Object-Detection-Metrics
I didnt understand the second part of the answer, sorry
