Skip to content

Commit

Permalink
Removed personal debug statements, added filename filtering to empty …
Browse files Browse the repository at this point in the history
…gallery
  • Loading branch information
sklum committed Jul 31, 2013
1 parent e7c3e62 commit fa4557b
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 14 deletions.
9 changes: 1 addition & 8 deletions openbr/core/bee.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<biometric-signature name=\"" + file.name +"\">");
lines.append("\t<biometric-signature name=\"" + file.get<QString>("Subject",file.fileName()) +"\">");
lines.append("\t\t<presentation file-name=\"" + file.name + "\" " + metadata.join(" ") + "/>");
lines.append("\t</biometric-signature>");
}
Expand Down Expand Up @@ -273,11 +273,6 @@ cv::Mat BEE::makeMask(const br::FileList &targets, const br::FileList &queries,
QList<int> targetPartitions = targets.crossValidationPartitions();
QList<int> 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<queries.size(); i++) {
const QString &fileA = queries[i];
Expand All @@ -303,8 +298,6 @@ cv::Mat BEE::makeMask(const br::FileList &targets, const br::FileList &queries,
}
}

qDebug() << mask.row(0);

return mask;
}

Expand Down
3 changes: 0 additions & 3 deletions openbr/core/eval.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -119,9 +119,6 @@ float Evaluate(const Mat &simmat, const Mat &mask, const QString &csv)
}
}

qDebug() << genuineCount;
qDebug() << impostorCount;

if (numNaNs > 0) qWarning("Encountered %d NaN scores!", numNaNs);
if (genuineCount == 0) qFatal("No genuine scores!");
if (impostorCount == 0) qFatal("No impostor scores!");
Expand Down
2 changes: 1 addition & 1 deletion openbr/plugins/gallery.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}
Expand Down
2 changes: 1 addition & 1 deletion openbr/plugins/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ class ShowTransform : public TimeVaryingTransform

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<QString>(s);
newTitle = newTitle + s + ": " + out + " ";
Expand Down
2 changes: 2 additions & 0 deletions openbr/plugins/output.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,8 +442,10 @@ class rankOutput : public MatrixOutput

typedef QPair<int,int> 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);
}
};
Expand Down
3 changes: 2 additions & 1 deletion openbr/plugins/validate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ class FilterDistance : public Distance
foreach (const QString &key, Globals->filters.keys()) {
bool keep = false;
const QString metadata = a.file.get<QString>(key, "");
if (metadata.isEmpty() || Globals->filters[key].isEmpty()) continue;
if (Globals->filters[key].isEmpty()) continue;
if (metadata.isEmpty()) return -std::numeric_limits<float>::max();
foreach (const QString &value, Globals->filters[key]) {
if (metadata == value) {
keep = true;
Expand Down

0 comments on commit fa4557b

Please sign in to comment.