Commit 6966dede5f091748ad1559cbc1bbd12df6a56e41

Authored by Scott Klum
1 parent abced759

Verbose eval bug fixes

openbr/core/eval.cpp
@@ -798,7 +798,7 @@ float EvalDetection(const QString &predictedGallery, const QString &truthGallery @@ -798,7 +798,7 @@ float EvalDetection(const QString &predictedGallery, const QString &truthGallery
798 798
799 if (Globals->verbose) { 799 if (Globals->verbose) {
800 qDebug("Total False negatives:"); 800 qDebug("Total False negatives:");
801 - const int numFalseNegatives = 50; 801 + const int numFalseNegatives = std::min(50, falseNegativeDetections.size());
802 for (int i=0; i<numFalseNegatives; i++) { 802 for (int i=0; i<numFalseNegatives; i++) {
803 Mat img = imread(qPrintable(Globals->path + "/" + falseNegativeDetections[i].filePath)); 803 Mat img = imread(qPrintable(Globals->path + "/" + falseNegativeDetections[i].filePath));
804 qDebug() << falseNegativeDetections[i]; 804 qDebug() << falseNegativeDetections[i];
openbr/core/evalutils.cpp
@@ -214,7 +214,7 @@ QStringList EvalUtils::computeDetectionResults(const QList&lt;ResolvedDetection&gt; &amp;d @@ -214,7 +214,7 @@ QStringList EvalUtils::computeDetectionResults(const QList&lt;ResolvedDetection&gt; &amp;d
214 { 214 {
215 float TP = 0, FP = 0, prevFP = -1, prevTP = -1; 215 float TP = 0, FP = 0, prevFP = -1, prevTP = -1;
216 216
217 - const int detectionsToKeep = 50; 217 + int detectionsToKeep = 50;
218 QList<ResolvedDetection> topFalsePositives, bottomTruePositives; 218 QList<ResolvedDetection> topFalsePositives, bottomTruePositives;
219 for (int i=0; i<detections.size(); i++) { 219 for (int i=0; i<detections.size(); i++) {
220 const ResolvedDetection &detection = detections[i]; 220 const ResolvedDetection &detection = detections[i];
@@ -281,6 +281,7 @@ QStringList EvalUtils::computeDetectionResults(const QList&lt;ResolvedDetection&gt; &amp;d @@ -281,6 +281,7 @@ QStringList EvalUtils::computeDetectionResults(const QList&lt;ResolvedDetection&gt; &amp;d
281 if (Globals->verbose) { 281 if (Globals->verbose) {
282 QtUtils::touchDir(QDir("./falsePos")); 282 QtUtils::touchDir(QDir("./falsePos"));
283 qDebug("Highest Scoring False Positives:"); 283 qDebug("Highest Scoring False Positives:");
  284 + detectionsToKeep = std::min(detectionsToKeep,topFalsePositives.size());
284 for (int i=0; i<detectionsToKeep; i++) { 285 for (int i=0; i<detectionsToKeep; i++) {
285 Mat img = imread(qPrintable(Globals->path + "/" + topFalsePositives[i].filePath)); 286 Mat img = imread(qPrintable(Globals->path + "/" + topFalsePositives[i].filePath));
286 qDebug() << topFalsePositives[i]; 287 qDebug() << topFalsePositives[i];