Commit 430935ed54eef82cb09934aaf58cb1a92bb665a7

Authored by Ben Klein
1 parent 9ef4da29

Update eval.cpp

Showing 1 changed file with 4 additions and 2 deletions
openbr/core/eval.cpp
... ... @@ -222,7 +222,9 @@ float Evaluate(const Mat &simmat, const Mat &mask, const QString &csv, const QSt
222 222 if ((falsePositives > previousFalsePositives) &&
223 223 (truePositives > previousTruePositives)) {
224 224 operatingPoints.append(OperatingPoint(thresh, float(falsePositives)/impostorCount, float(truePositives)/genuineCount));
225   - if (floor(float(falsePositives)/impostorCount*1000+0.5)/1000 == floor((1-float(truePositives)/genuineCount)*1000+0.5)/1000) EERIndex = index-1;
  225 + if (EERIndex == 0) {
  226 + if (floor(float(falsePositives)/impostorCount*1000+0.5)/1000 == floor((1-float(truePositives)/genuineCount)*1000+0.5)/1000) EERIndex = index-1;
  227 + }
226 228 previousFalsePositives = falsePositives;
227 229 previousTruePositives = truePositives;
228 230 }
... ... @@ -242,7 +244,7 @@ float Evaluate(const Mat &simmat, const Mat &mask, const QString &csv, const QSt
242 244 lines.append("Metadata,"+QString::number(simmat.cols*simmat.rows-(genuineCount+impostorCount))+",Ignored");
243 245  
244 246 QString filePath = Globals->path;
245   - if (matches != 0) {
  247 + if (matches != 0 && EERIndex != 0) {
246 248 const FileList targetFiles = TemplateList::fromGallery(target).files();
247 249 const FileList queryFiles = TemplateList::fromGallery(query).files();
248 250 unsigned int count = 0;
... ...