diff --git a/openbr/core/core.cpp b/openbr/core/core.cpp index ecdc3b6..1378302 100644 --- a/openbr/core/core.cpp +++ b/openbr/core/core.cpp @@ -41,7 +41,6 @@ struct AlgorithmCore void train(const File &input, const QString &model) { - qDebug() << input; TemplateList data(TemplateList::fromGallery(input)); if (transform.isNull()) qFatal("Null transform."); diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index ec78c8b..d1ee53a 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -390,12 +390,12 @@ TemplateList TemplateList::fromGallery(const br::File &gallery) if (gallery.getBool("leaveOneOut")) { QStringList subjects; for (int i = 0; i < newTemplates.size(); i++) { - QString subject = newTemplates.at(i).file.get("Subject"); + QString subject = newTemplates.at(i).file.get("Label"); // Have we seen this subject before? if (subjects.contains(subject)) { subjects.append(subject); // Get indices belonging to this subject - QList subjectIndices = newTemplates.find("Subject",subject); + QList subjectIndices = newTemplates.find("Label",subject); for (int j = 0; j < subjectIndices.size(); j++) { // Set subject partitions newTemplates[subjectIndices[j]].file.set("Partition",j); diff --git a/openbr/plugins/cascade.cpp b/openbr/plugins/cascade.cpp index f9d8178..e05d9d2 100644 --- a/openbr/plugins/cascade.cpp +++ b/openbr/plugins/cascade.cpp @@ -84,7 +84,6 @@ class CascadeTransform : public UntrainableMetaTransform foreach (const Template &t, src) { const bool enrollAll = t.file.getBool("enrollAll"); - qDebug() << enrollAll; for (int i=0; i rects; diff --git a/openbr/plugins/eyes.cpp b/openbr/plugins/eyes.cpp index 5316705..cdef8df 100644 --- a/openbr/plugins/eyes.cpp +++ b/openbr/plugins/eyes.cpp @@ -182,8 +182,8 @@ private: float second_eye_y = (right_rect.y + maxLoc.y)*gray.rows/height+roi.y; dst.m() = src.m(); - //dst.file.appendPoint(QPointF(first_eye_x, first_eye_y)); - //dst.file.appendPoint(QPointF(second_eye_x, second_eye_y)); + dst.file.appendPoint(QPointF(first_eye_x, first_eye_y)); + dst.file.appendPoint(QPointF(second_eye_x, second_eye_y)); dst.file.set("First_Eye", QPointF(first_eye_x, first_eye_y)); dst.file.set("Second_Eye", QPointF(second_eye_x, second_eye_y)); } diff --git a/openbr/plugins/landmarks.cpp b/openbr/plugins/landmarks.cpp index 41da7d7..020dec1 100644 --- a/openbr/plugins/landmarks.cpp +++ b/openbr/plugins/landmarks.cpp @@ -313,7 +313,8 @@ class LoadLandmarksTransform : public UntrainableTransform { dst = src; - QString path = Globals->path + "/" + src.file.baseName() + ".dat"; + // Assume the fiduciary file has the same basename as src + QString path = filePath + "/" + src.file.baseName() + ".dat"; QFile f(path); if (!f.open(QIODevice::ReadOnly)) qFatal("Unable to open %s for reading.", qPrintable(path)); @@ -329,6 +330,8 @@ class LoadLandmarksTransform : public UntrainableTransform } } + if (landmarks.size() < 35) qFatal("Unrecognized landmark set format."); + dst.file.set("rightEye", landmarks[16]); dst.file.set("leftEye", landmarks[18]); diff --git a/openbr/plugins/output.cpp b/openbr/plugins/output.cpp index d87c518..f2a3be4 100644 --- a/openbr/plugins/output.cpp +++ b/openbr/plugins/output.cpp @@ -365,12 +365,9 @@ class evalOutput : public MatrixOutput ~evalOutput() { - qDebug() << "here"; - if (data.data) { const QString csv = QString(file.name).replace(".eval", ".csv"); if ((Globals->crossValidate == 0) || (!crossValidate)) { - qDebug() << "here"; Evaluate(data, BEE::makeMask(targetFiles, queryFiles), csv); } else { QFutureSynchronizer futures; diff --git a/openbr/plugins/validate.cpp b/openbr/plugins/validate.cpp index a776574..4f33d58 100644 --- a/openbr/plugins/validate.cpp +++ b/openbr/plugins/validate.cpp @@ -52,11 +52,7 @@ class CrossValidateTransform : public MetaTransform // even if the partitions are different if (leaveOneOut) { QList subjectIndices = partitionedData.find("Subject",partitionedData.at(j).file.get("Subject")); - qDebug() << i << subjectIndices.size(); - if (i > subjectIndices.size()) { - qDebug() << i%subjectIndices.size(); - removed.append(subjectIndices[i%subjectIndices.size()]); - } + if (i > subjectIndices.size()) removed.append(subjectIndices[i%subjectIndices.size()]); } else if (partitions[j] == i) removed.append(j); typedef QPair Pair;