From 3f09f0baf4aaaa20d1cfc7f350099b5efd1a2099 Mon Sep 17 00:00:00 2001 From: Charles Otto Date: Mon, 20 May 2013 21:12:17 -0400 Subject: [PATCH] Remove some special casing of label and some dated comments --- openbr/frvt2012.cpp | 1 - openbr/openbr_plugin.cpp | 2 +- openbr/plugins/eigen3.cpp | 2 +- openbr/plugins/gallery.cpp | 5 +---- openbr/plugins/meta.cpp | 2 -- 5 files changed, 3 insertions(+), 9 deletions(-) diff --git a/openbr/frvt2012.cpp b/openbr/frvt2012.cpp index baf0b85..ac47ac8 100644 --- a/openbr/frvt2012.cpp +++ b/openbr/frvt2012.cpp @@ -141,7 +141,6 @@ int32_t SdkEstimator::estimate_gender(const ONEFACE &input_face, int8_t &gender, TemplateList templates; templates.append(templateFromONEFACE(input_face)); templates >> *frvt2012_gender_transform.data(); - // TODO: lookup gender strings/expected int outputs -cao mf = gender = templates.first().file.get("Subject") == "Male" ? 0 : 1; return templates.first().file.failed() ? 4 : 0; } diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 3f1acf8..e5fb8e3 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -434,7 +434,7 @@ TemplateList TemplateList::fromGallery(const br::File &gallery) } // indexes some property, assigns an integer id to each unique value of propName -// stores the index values in "Label" of the output template list -cao +// stores the index values in "Label" of the output template list TemplateList TemplateList::relabel(const TemplateList &tl, const QString & propName) { const QList originalLabels = tl.get(propName); diff --git a/openbr/plugins/eigen3.cpp b/openbr/plugins/eigen3.cpp index ba193e7..b179591 100644 --- a/openbr/plugins/eigen3.cpp +++ b/openbr/plugins/eigen3.cpp @@ -329,7 +329,7 @@ class LDATransform : public Transform void train(const TemplateList &_trainingSet) { - // creates "Label" -cao + // creates "Label" TemplateList trainingSet = TemplateList::relabel(_trainingSet, "Subject"); int instances = trainingSet.size(); diff --git a/openbr/plugins/gallery.cpp b/openbr/plugins/gallery.cpp index 7b7393b..030f250 100644 --- a/openbr/plugins/gallery.cpp +++ b/openbr/plugins/gallery.cpp @@ -517,10 +517,7 @@ class csvGallery : public Gallery static QString getCSVElement(const QString &key, const QVariant &value, bool header) { - if ((key == "Label") && !header) { - // problem -cao - return value.value(); - } else if (value.canConvert()) { + if (value.canConvert()) { if (header) return key; else return value.value(); } else if (value.canConvert()) { diff --git a/openbr/plugins/meta.cpp b/openbr/plugins/meta.cpp index ad39280..f00676c 100644 --- a/openbr/plugins/meta.cpp +++ b/openbr/plugins/meta.cpp @@ -453,8 +453,6 @@ private: const QString &file = src.file; if (cache.contains(file)) { dst = cache[file]; - // don't get this -cao -// dst.file.set("Label", src.file.value("Label")); } else { transform->project(src, dst); cacheLock.lock(); -- libgit2 0.21.4