From c3f697335533a8588b61ba8002fabfc489072657 Mon Sep 17 00:00:00 2001 From: Brendan Klare Date: Sat, 14 Sep 2013 13:14:34 -0400 Subject: [PATCH] handle case where there are no FP --- openbr/core/eval.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/openbr/core/eval.cpp b/openbr/core/eval.cpp index 0562309..646177d 100644 --- a/openbr/core/eval.cpp +++ b/openbr/core/eval.cpp @@ -374,7 +374,7 @@ struct DetectionOperatingPoint static QStringList computeDetectionResults(const QList &detections, int totalPositives, bool discrete) { QList points; - float TP = 0, FP = 0, prevFP = 0; + float TP = 0, FP = 0, prevFP = -1; for (int i=0; i &detec FP += 1 - detection.overlap; } if ((i == detections.size()-1) || (detection.confidence > detections[i+1].confidence)) { - if (FP > prevFP) { + if (FP > prevFP || (i == detections.size()-1)) { points.append(DetectionOperatingPoint(TP, FP, totalPositives)); prevFP = FP; } -- libgit2 0.21.4