Is it possible to use evaluateDetectionPrecision to calculate precision and recall at a specific confidence threshold
2 views (last 30 days)
Show older comments
Pedro José Carrinho Ribeiro
on 27 Oct 2021
Commented: Pedro José Carrinho Ribeiro
on 9 Nov 2021
Hi,
So I wanted to use evaluateDetectionPrecision function (here) to evaluate a detector. However, I wanted to obtain precision and recall at a specific confidence threshold, let's say 0.25. How can i do this?
The problem I have is that the precision and recall values that evaluateDetectionPrecision() outputs are the vectors to build the plot of the precision-recall curve. Do I just remove the boxes with confidence < 0.25 to zero before using the function evaluateDetectionPrecision(). And anotate the value of the last element of the recall and precision vector:
[ap, recall, precision] = evaluateDetectionPrecision(results, blds);
my_recall = recall(end)
my_precision = precision(end)
Thanks in advance.
0 Comments
Answers (1)
Anshika Chaurasia
on 6 Nov 2021
Hi,
To calculate precision and recall at a specific threshold, you can set 'Threshold' as 0.25 (let's say) in detect function of the detector:
results = detect(detector,I,'Threshold',0.25)
[ap, recall, precision] = evaluateDetectionPrecision(results, blds);
The above threshold is detection threshold and hence, detections that have scores less than this threshold value will be removed.
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!