diff --git a/openbr/plugins/independent.cpp b/openbr/plugins/independent.cpp index 4a1ec03..156cc75 100644 --- a/openbr/plugins/independent.cpp +++ b/openbr/plugins/independent.cpp @@ -156,8 +156,8 @@ class IndependentTransform : public MetaTransform QFutureSynchronizer futures; for (int i=0; idata.at(i, j); if (score == -std::numeric_limits::max()) continue; - if (crossModality) if(src[i].file.get("MODALITY") == src[j].file.get("MODALITY")) continue; + if (crossModality && src[i].file.get("MODALITY") == src[j].file.get("MODALITY")) continue; if (labels[i] == labels[j]) genuineScores.append(score); else impostorScores.append(score); } diff --git a/openbr/plugins/validate.cpp b/openbr/plugins/validate.cpp index 0774565..d1f1dc0 100644 --- a/openbr/plugins/validate.cpp +++ b/openbr/plugins/validate.cpp @@ -104,15 +104,13 @@ class CrossValidateTransform : public MetaTransform // since it is assumed that the allPartitions // flag is only used during comparison // (i.e. only used when making a mask) - if (src.file.getBool("Train", false)) dst = src; - else { - // If we want to duplicate templates but use the same training data - // for all partitions (i.e. transforms.size() == 1), we need to - // restrict the partition - int partition = src.file.get("Partition", 0); - partition = (partition >= transforms.size()) ? 0 : partition; - transforms[partition]->project(src, dst); - } + + // If we want to duplicate templates but use the same training data + // for all partitions (i.e. transforms.size() == 1), we need to + // restrict the partition + int partition = src.file.get("Partition", 0); + partition = (partition >= transforms.size()) ? 0 : partition; + transforms[partition]->project(src, dst); } void store(QDataStream &stream) const