diff --git a/openbr/core/bee.cpp b/openbr/core/bee.cpp index 8823038..c6cb254 100644 --- a/openbr/core/bee.cpp +++ b/openbr/core/bee.cpp @@ -102,7 +102,7 @@ void BEE::writeSigset(const QString &sigset, const br::FileList &files, bool ign if ((key == "Index") || (key == "Subject")) continue; metadata.append(key+"=\""+QtUtils::toString(file.value(key))+"\""); } - lines.append("\t"); + lines.append("\t("Subject",file.fileName()) +"\">"); lines.append("\t\t"); lines.append("\t"); } @@ -273,11 +273,6 @@ cv::Mat BEE::makeMask(const br::FileList &targets, const br::FileList &queries, QList targetPartitions = targets.crossValidationPartitions(); QList queryPartitions = queries.crossValidationPartitions(); - qDebug() << "Targets: " << targetLabels << "\n"; - qDebug() << "Targets: " << targetPartitions << "\n"; - qDebug() << "Queries: " << queryLabels << "\n"; - qDebug() << "Queries: " << queryPartitions << "\n"; - Mat mask(queries.size(), targets.size(), CV_8UC1); for (int i=0; i 0) qWarning("Encountered %d NaN scores!", numNaNs); if (genuineCount == 0) qFatal("No genuine scores!"); if (impostorCount == 0) qFatal("No impostor scores!"); diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 0102a0f..18f04e0 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -168,7 +168,7 @@ class EmptyGallery : public Gallery QRegExp re(regexp); re.setPatternSyntax(QRegExp::Wildcard); for (int i=templates.size()-1; i>=0; i--) { - if (!re.exactMatch(templates[i].file.suffix())) { + if (!re.exactMatch(templates[i].file.fileName())) { templates.removeAt(i); } } diff --git a/openbr/plugins/gui.cpp b/openbr/plugins/gui.cpp index 569412b..e7357c9 100644 --- a/openbr/plugins/gui.cpp +++ b/openbr/plugins/gui.cpp @@ -215,7 +215,7 @@ public: foreach (const QString & s, keys) { if (s.compare("name", Qt::CaseInsensitive) == 0) { - newTitle = newTitle + s + ": " + t.file.name + " "; + newTitle = newTitle + s + ": " + t.file.fileName() + " "; } else if (t.file.contains(s)) { QString out = t.file.get(s); newTitle = newTitle + s + ": " + out + " "; diff --git a/openbr/plugins/output.cpp b/openbr/plugins/output.cpp index d570088..2b75582 100644 --- a/openbr/plugins/output.cpp +++ b/openbr/plugins/output.cpp @@ -442,8 +442,10 @@ class rankOutput : public MatrixOutput typedef QPair RankPair; foreach (const RankPair &pair, Common::Sort(ranks, false)) + // pair.first == rank retrieved, pair.second == original position lines.append(queryFiles[pair.second].name + " " + QString::number(pair.first) + " " + QString::number(scores[pair.second]) + " " + targetFiles[positions[pair.second]].name); + QtUtils::writeFile(file, lines); } }; diff --git a/openbr/plugins/validate.cpp b/openbr/plugins/validate.cpp index 68c603e..8b3a174 100644 --- a/openbr/plugins/validate.cpp +++ b/openbr/plugins/validate.cpp @@ -116,7 +116,8 @@ class FilterDistance : public Distance foreach (const QString &key, Globals->filters.keys()) { bool keep = false; const QString metadata = a.file.get(key, ""); - if (metadata.isEmpty() || Globals->filters[key].isEmpty()) continue; + if (Globals->filters[key].isEmpty()) continue; + if (metadata.isEmpty()) return -std::numeric_limits::max(); foreach (const QString &value, Globals->filters[key]) { if (metadata == value) { keep = true;