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];