Is it possible to use evaluateDetectionPrecision to calculate precision and recall at a specific confidence threshold
4 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(1 个)
Anshika Chaurasia
2021-11-6
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.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!