diff --git a/openbr/plugins/misc.cpp b/openbr/plugins/misc.cpp index d17edd1..37f8896 100644 --- a/openbr/plugins/misc.cpp +++ b/openbr/plugins/misc.cpp @@ -295,7 +295,9 @@ class GroundTruthTransform : public UntrainableMetaTransform { Q_OBJECT Q_PROPERTY(QString groundTruth READ get_groundTruth WRITE set_groundTruth RESET reset_groundTruth STORED false) + Q_PROPERTY(QStringList keys READ get_keys WRITE set_keys RESET reset_keys STORED false) BR_PROPERTY(QString, groundTruth, "") + BR_PROPERTY(QStringList, keys, QStringList()) QMap files; @@ -308,7 +310,7 @@ class GroundTruthTransform : public UntrainableMetaTransform void project(const Template &src, Template &dst) const { dst = src; - dst.file.append(files[dst.file.baseName()].localMetadata()); + foreach(const QString &key, keys) dst.file.set(key,files[dst.file.baseName()].value(key)); } }; diff --git a/openbr/plugins/turk.cpp b/openbr/plugins/turk.cpp index c40932d..44115fd 100644 --- a/openbr/plugins/turk.cpp +++ b/openbr/plugins/turk.cpp @@ -78,13 +78,8 @@ class MapTransform : public UntrainableTransform QMap map; foreach(const QString &s, inputVariables) { - // Get checks if the variant stored in m_metdata can be - // converted to the type T. For some reason, you cannot - // convert from a QVariant to a QVariant. Thus, this transform - // has to assume that the metadata we want to organize can be - // converted to a float, resulting in a loss of generality :-(. if (t.file.contains(s)) { - map.insert(s,t.file.get(s)); + map.insert(s,t.file.value(s)); mappedT.file.remove(s); } } diff --git a/scripts/attributes.sh b/scripts/attributes.sh index 4b94936..07962c9 100755 --- a/scripts/attributes.sh +++ b/scripts/attributes.sh @@ -1,6 +1,6 @@ #!/bin/bash -BASE="Open+GroundTruth(../../sigsets/CUHK-VHDC/CUFSF/target.xml)+Rename(NEC3RightEye,Affine_0)+Rename(NEC3LeftEye,Affine_1)+Affine(192,240,.345,.475,-1,-1,-1,-1,Cubic)+Cvt(Gray)" +BASE="Open+GroundTruth(../../sigsets/CUHK-VHDC/CUFSF/target.xml,[NEC3RightEye,NEC3LeftEye])+Rename(NEC3RightEye,Affine_0)+Rename(NEC3LeftEye,Affine_1)+Affine(192,240,.345,.475,-1,-1,-1,-1,Cubic)+Cvt(Gray)" NOSE="RectFromStasmNoseWithBridge+ROI+Resize(76,52,Cubic)+Normalize(L2)+PCA(0.95)+Cat" MOUTH="RectFromStasmMouth+ROI+Resize(36,104,Cubic)+Normalize(L2)+PCA(0.95)+Cat" EYES="RectFromStasmEyes+ROI+Resize(24,136,Cubic)+Normalize(L2)+PCA(0.95)+Cat" @@ -90,11 +90,11 @@ Turk(chinsize,[shortchin,longchin],3)],indices=[0,1,2,3,4,5,6,7,8,9,10,11,12,13, -path ../../img/CUHK-VHDC/CUFSF/target/ -train results30v2.turk models/all fi -br -crossValidate 2 -path ../../img/CUHK-VHDC/CUFSF/target/ -algorithm models/all -compare results30v2.turk results30v2.turk simmat/eyes.mtx +br -crossValidate 2 -path ../../img/CUHK-VHDC/CUFSF/target/ -algorithm models/all -compare results30v2.turk results30v2.turk simmat/all.mtx -br -crossValidate 2 -setHeader simmat/eyes.mtx ../../sigsets/CUHK-VHDC/CUFSF/target.xml ../../sigsets/CUHK-VHDC/CUFSF/query.xml -br -crossValidate 2 -convert Output simmat/eyes.mtx output/eyes.rank -br -crossValidate 2 -convert Output simmat/eyes.mtx algorithm_dataset/eyes_CUFSF%1.eval +br -crossValidate 2 -setHeader simmat/all.mtx ../../sigsets/CUHK-VHDC/CUFSF/target.xml ../../sigsets/CUHK-VHDC/CUFSF/query.xml +br -crossValidate 2 -convert Output simmat/all.mtx output/all.rank +br -crossValidate 2 -convert Output simmat/all.mtx algorithm_dataset/all_CUFSF%1.eval # Not trained on: earpitch, earsize, neck thickness # Not used for comparison: gender, eyelashvisbility