From 6966dede5f091748ad1559cbc1bbd12df6a56e41 Mon Sep 17 00:00:00 2001 From: Scott Klum Date: Mon, 14 May 2018 11:03:41 -0600 Subject: [PATCH] Verbose eval bug fixes --- openbr/core/eval.cpp | 2 +- openbr/core/evalutils.cpp | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/openbr/core/eval.cpp b/openbr/core/eval.cpp index 95de62c..0dae9f3 100755 --- a/openbr/core/eval.cpp +++ b/openbr/core/eval.cpp @@ -798,7 +798,7 @@ float EvalDetection(const QString &predictedGallery, const QString &truthGallery if (Globals->verbose) { qDebug("Total False negatives:"); - const int numFalseNegatives = 50; + const int numFalseNegatives = std::min(50, falseNegativeDetections.size()); for (int i=0; ipath + "/" + falseNegativeDetections[i].filePath)); qDebug() << falseNegativeDetections[i]; diff --git a/openbr/core/evalutils.cpp b/openbr/core/evalutils.cpp index 8b4634a..febf017 100644 --- a/openbr/core/evalutils.cpp +++ b/openbr/core/evalutils.cpp @@ -214,7 +214,7 @@ QStringList EvalUtils::computeDetectionResults(const QList &d { float TP = 0, FP = 0, prevFP = -1, prevTP = -1; - const int detectionsToKeep = 50; + int detectionsToKeep = 50; QList topFalsePositives, bottomTruePositives; for (int i=0; i &d if (Globals->verbose) { QtUtils::touchDir(QDir("./falsePos")); qDebug("Highest Scoring False Positives:"); + detectionsToKeep = std::min(detectionsToKeep,topFalsePositives.size()); for (int i=0; ipath + "/" + topFalsePositives[i].filePath)); qDebug() << topFalsePositives[i]; -- libgit2 0.21.4