Commit 3f09f0baf4aaaa20d1cfc7f350099b5efd1a2099
1 parent
4fd55360
Remove some special casing of label and some dated comments
Remove special casing of label in cache, and getCSVElement
Showing
5 changed files
with
3 additions
and
9 deletions
openbr/frvt2012.cpp
| @@ -141,7 +141,6 @@ int32_t SdkEstimator::estimate_gender(const ONEFACE &input_face, int8_t &gender, | @@ -141,7 +141,6 @@ int32_t SdkEstimator::estimate_gender(const ONEFACE &input_face, int8_t &gender, | ||
| 141 | TemplateList templates; | 141 | TemplateList templates; |
| 142 | templates.append(templateFromONEFACE(input_face)); | 142 | templates.append(templateFromONEFACE(input_face)); |
| 143 | templates >> *frvt2012_gender_transform.data(); | 143 | templates >> *frvt2012_gender_transform.data(); |
| 144 | - // TODO: lookup gender strings/expected int outputs -cao | ||
| 145 | mf = gender = templates.first().file.get<QString>("Subject") == "Male" ? 0 : 1; | 144 | mf = gender = templates.first().file.get<QString>("Subject") == "Male" ? 0 : 1; |
| 146 | return templates.first().file.failed() ? 4 : 0; | 145 | return templates.first().file.failed() ? 4 : 0; |
| 147 | } | 146 | } |
openbr/openbr_plugin.cpp
| @@ -434,7 +434,7 @@ TemplateList TemplateList::fromGallery(const br::File &gallery) | @@ -434,7 +434,7 @@ TemplateList TemplateList::fromGallery(const br::File &gallery) | ||
| 434 | } | 434 | } |
| 435 | 435 | ||
| 436 | // indexes some property, assigns an integer id to each unique value of propName | 436 | // indexes some property, assigns an integer id to each unique value of propName |
| 437 | -// stores the index values in "Label" of the output template list -cao | 437 | +// stores the index values in "Label" of the output template list |
| 438 | TemplateList TemplateList::relabel(const TemplateList &tl, const QString & propName) | 438 | TemplateList TemplateList::relabel(const TemplateList &tl, const QString & propName) |
| 439 | { | 439 | { |
| 440 | const QList<QString> originalLabels = tl.get<QString>(propName); | 440 | const QList<QString> originalLabels = tl.get<QString>(propName); |
openbr/plugins/eigen3.cpp
| @@ -329,7 +329,7 @@ class LDATransform : public Transform | @@ -329,7 +329,7 @@ class LDATransform : public Transform | ||
| 329 | 329 | ||
| 330 | void train(const TemplateList &_trainingSet) | 330 | void train(const TemplateList &_trainingSet) |
| 331 | { | 331 | { |
| 332 | - // creates "Label" -cao | 332 | + // creates "Label" |
| 333 | TemplateList trainingSet = TemplateList::relabel(_trainingSet, "Subject"); | 333 | TemplateList trainingSet = TemplateList::relabel(_trainingSet, "Subject"); |
| 334 | 334 | ||
| 335 | int instances = trainingSet.size(); | 335 | int instances = trainingSet.size(); |
openbr/plugins/gallery.cpp
| @@ -517,10 +517,7 @@ class csvGallery : public Gallery | @@ -517,10 +517,7 @@ class csvGallery : public Gallery | ||
| 517 | 517 | ||
| 518 | static QString getCSVElement(const QString &key, const QVariant &value, bool header) | 518 | static QString getCSVElement(const QString &key, const QVariant &value, bool header) |
| 519 | { | 519 | { |
| 520 | - if ((key == "Label") && !header) { | ||
| 521 | - // problem -cao | ||
| 522 | - return value.value<QString>(); | ||
| 523 | - } else if (value.canConvert<QString>()) { | 520 | + if (value.canConvert<QString>()) { |
| 524 | if (header) return key; | 521 | if (header) return key; |
| 525 | else return value.value<QString>(); | 522 | else return value.value<QString>(); |
| 526 | } else if (value.canConvert<QPointF>()) { | 523 | } else if (value.canConvert<QPointF>()) { |
openbr/plugins/meta.cpp
| @@ -453,8 +453,6 @@ private: | @@ -453,8 +453,6 @@ private: | ||
| 453 | const QString &file = src.file; | 453 | const QString &file = src.file; |
| 454 | if (cache.contains(file)) { | 454 | if (cache.contains(file)) { |
| 455 | dst = cache[file]; | 455 | dst = cache[file]; |
| 456 | - // don't get this -cao | ||
| 457 | -// dst.file.set("Label", src.file.value("Label")); | ||
| 458 | } else { | 456 | } else { |
| 459 | transform->project(src, dst); | 457 | transform->project(src, dst); |
| 460 | cacheLock.lock(); | 458 | cacheLock.lock(); |