diff --git a/openbr/core/core.cpp b/openbr/core/core.cpp index 7a91123..4144beb 100644 --- a/openbr/core/core.cpp +++ b/openbr/core/core.cpp @@ -33,6 +33,7 @@ struct AlgorithmCore }; QSharedPointer transform; + QSharedPointer simplifiedTransform; QSharedPointer comparison; QSharedPointer distance; QSharedPointer progressCounter; @@ -82,6 +83,8 @@ struct AlgorithmCore } qDebug("Training Time: %s", qPrintable(QtUtils::toTime(Globals->startTime.elapsed()/1000.0f))); + bool junk; + simplifiedTransform = QSharedPointer(transform->simplify(junk)); } void store(const QString &model) const @@ -167,7 +170,8 @@ struct AlgorithmCore Gallery *temp = Gallery::make(input); qint64 total = temp->totalSize(); - Transform *enroll = transform.data(); + Transform *enroll = simplifiedTransform.data(); + if (multiProcess) enroll = wrapTransform(enroll, "ProcessWrapper"); @@ -443,9 +447,10 @@ struct AlgorithmCore QString compareRegionDesc; QList enrollCompare; enrollCompare.append(comparison.data()); + // if we have to enroll the row gallery, add that transform to the list if (needEnrollRows) - enrollCompare.prepend(this->transform.data()); + enrollCompare.prepend(simplifiedTransform.data()); Transform *compareRegionBase = pipeTransforms(enrollCompare); // If in multi-process mode, wrap the enroll+compare structure in a ProcessWrapper. @@ -523,13 +528,18 @@ private: void init(const QString &description) { - if (loadOrExpand(description)) + bool junk; + + if (loadOrExpand(description)) { + simplifiedTransform = QSharedPointer(transform->simplify(junk)); return; + } // check if the description is an abbreviation or model file with additional arguments supplied File parsed("."+description); if (loadOrExpand(parsed.suffix())) { applyAdditionalProperties(parsed, transform.data()); + simplifiedTransform = QSharedPointer(transform->simplify(junk)); return; } @@ -541,6 +551,8 @@ private: //! [Creating the template generation and comparison methods] transform = QSharedPointer(Transform::make(words[0], NULL)); + simplifiedTransform = QSharedPointer(transform->simplify(junk)); + if (words.size() > 1) { if (!compareTransform) { distance = QSharedPointer(Distance::make(words[1], NULL)); diff --git a/openbr/core/eval.cpp b/openbr/core/eval.cpp index 27ac297..b171541 100644 --- a/openbr/core/eval.cpp +++ b/openbr/core/eval.cpp @@ -81,6 +81,8 @@ static cv::Mat constructMatchingMask(const cv::Mat &scores, const FileList &targ // otherwise, we fail else qFatal("Unable to construct mask for %d by %d score matrix from %d element query set, and %d element target set ", scores.rows, scores.cols, query.length(), target.length()); + + return cv::Mat(); } float Evaluate(const cv::Mat &scores, const FileList &target, const FileList &query, const QString &csv, int partition) diff --git a/openbr/openbr_plugin.cpp b/openbr/openbr_plugin.cpp index 2c29737..0f9330b 100644 --- a/openbr/openbr_plugin.cpp +++ b/openbr/openbr_plugin.cpp @@ -649,7 +649,7 @@ QString Object::description(bool expanded) return objectName() + (argumentString.isEmpty() ? "" : ("(" + argumentString + ")")); } -void Object::store(QDataStream &stream, bool force) const +void Object::store(QDataStream &stream) const { // Start from 1 to skip QObject::objectName for (int i=1; ipropertyCount(); i++) { @@ -660,14 +660,14 @@ void Object::store(QDataStream &stream, bool force) const const QString type = property.typeName(); if (type == "QList") { foreach (Transform *transform, property.read(this).value< QList >()) - transform->store(stream, force); + transform->store(stream); } else if (type == "QList") { foreach (Distance *distance, property.read(this).value< QList >()) - distance->store(stream, force); + distance->store(stream); } else if (type == "br::Transform*") { - property.read(this).value()->store(stream, force); + property.read(this).value()->store(stream); } else if (type == "br::Distance*") { - property.read(this).value()->store(stream, force); + property.read(this).value()->store(stream); } else if (type == "bool") { stream << property.read(this).toBool(); } else if (type == "int") { diff --git a/openbr/openbr_plugin.h b/openbr/openbr_plugin.h index f54e83f..3e36599 100644 --- a/openbr/openbr_plugin.h +++ b/openbr/openbr_plugin.h @@ -589,14 +589,14 @@ public: File file; /*!< \brief The file used to construct the plugin. */ virtual void init() {} /*!< \brief Overload this function instead of the default constructor to initialize the derived class. It should be safe to call this function multiple times. */ - virtual void store(QDataStream &stream, bool force = false) const; /*!< \brief Serialize the object. If force is true, classes must serialize directly on the stream not to e.g. a separate file. */ + virtual void store(QDataStream &stream) const; /*!< \brief Serialize the object. If force is true, classes must serialize directly on the stream not to e.g. a separate file. */ virtual void load(QDataStream &stream); /*!< \brief Deserialize the object. Default implementation calls init() after deserialization. */ /*!< \brief Serialize an object created via the plugin system, including the string used to build the base object, allowing re-creation of the object without knowledge of its base string*/ virtual void serialize(QDataStream &stream, bool force) { stream << description(force); - store(stream, force); + store(stream); } QStringList parameters() const; /*!< \brief A string describing the parameters the object takes. */ @@ -1290,6 +1290,8 @@ public: return res; } + virtual Transform * simplify(bool & newTransform) { newTransform = false; return this; } + protected: Transform(bool independent = true, bool trainable = true); /*!< \brief Construct a transform. */ inline Transform *make(const QString &description) { return make(description, this); } /*!< \brief Make a subtransform. */ diff --git a/openbr/plugins/cascade.cpp b/openbr/plugins/cascade.cpp index e6fa835..d91ac89 100644 --- a/openbr/plugins/cascade.cpp +++ b/openbr/plugins/cascade.cpp @@ -415,7 +415,7 @@ class CascadeTransform : public MetaTransform } // TODO: Remove this code when ready to break binary compatibility - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { int size = 1; stream << size; diff --git a/openbr/plugins/cluster.cpp b/openbr/plugins/cluster.cpp index cf47a70..24bea1f 100644 --- a/openbr/plugins/cluster.cpp +++ b/openbr/plugins/cluster.cpp @@ -69,7 +69,7 @@ class KMeansTransform : public Transform reindex(); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << centers; } @@ -131,7 +131,7 @@ class KNNTransform : public Transform dst.file.set("Nearest", gallery[sortedScores[0].second].file.name); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << gallery; } @@ -196,7 +196,7 @@ class RandomCentroidsTransform : public Transform reindex(); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << centers; } diff --git a/openbr/plugins/distance.cpp b/openbr/plugins/distance.cpp index a01ed8a..7ad1dd7 100644 --- a/openbr/plugins/distance.cpp +++ b/openbr/plugins/distance.cpp @@ -251,13 +251,14 @@ private: default: qFatal("Invalid operation."); } + return 0; } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << distances.size(); foreach (Distance *distance, distances) - distance->store(stream, force); + distance->store(stream); } void load(QDataStream &stream) @@ -328,9 +329,9 @@ class NegativeLogPlusOneDistance : public Distance return -log(distance->compare(a,b)+1); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - distance->store(stream, force); + distance->store(stream); } void load(QDataStream &stream) @@ -488,9 +489,9 @@ class GalleryCompareTransform : public Transform gallery = data; } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - br::Object::store(stream, force); + br::Object::store(stream); stream << gallery; } diff --git a/openbr/plugins/eigen3.cpp b/openbr/plugins/eigen3.cpp index f3caa60..c546a48 100644 --- a/openbr/plugins/eigen3.cpp +++ b/openbr/plugins/eigen3.cpp @@ -119,7 +119,7 @@ private: outMap = eVecs.transpose() * (inMap - mean); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << keep << drop << whiten << originalRows << mean << eVals << eVecs; } @@ -295,9 +295,9 @@ class DFFSTransform : public Transform dst.file.set("DFFS", sqrt(pca.residualReconstructionError((*cvtFloat)(src)))); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - pca.store(stream, force); + pca.store(stream); } void load(QDataStream &stream) @@ -525,7 +525,7 @@ class LDATransform : public Transform dst.m().at(0,0) = dst.m().at(0,0) / stdDev; } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << pcaKeep; stream << directLDA; @@ -631,10 +631,10 @@ class SparseLDATransform : public Transform ldaSparse.project(Template(src.file, inSelect), dst); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << pcaKeep; - ldaSparse.store(stream, force); + ldaSparse.store(stream); stream << dimsOut; stream << selections; } diff --git a/openbr/plugins/frames.cpp b/openbr/plugins/frames.cpp index 752dd7f..100df34 100644 --- a/openbr/plugins/frames.cpp +++ b/openbr/plugins/frames.cpp @@ -43,7 +43,7 @@ private: buffer.clear(); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { (void) stream; } diff --git a/openbr/plugins/independent.cpp b/openbr/plugins/independent.cpp index 3ac80ae..c4fb3b9 100644 --- a/openbr/plugins/independent.cpp +++ b/openbr/plugins/independent.cpp @@ -94,6 +94,12 @@ class DownsampleTrainingTransform : public Transform BR_PROPERTY(QStringList, subjects, QStringList()) + Transform *simplify(bool &newTForm) + { + Transform * res = transform->simplify(newTForm); + return res; + } + void project(const Template &src, Template &dst) const { transform->project(src,dst); @@ -145,6 +151,54 @@ class IndependentTransform : public MetaTransform return true; } + Transform * simplify(bool & newTransform) + { + newTransform = false; + bool newChild = false; + Transform * temp = transform->simplify(newChild); + if (temp == transform) { + return this; + } + IndependentTransform* indep = new IndependentTransform(); + indep->transform = temp; + + bool subInd = false; + IndependentTransform * test = dynamic_cast (temp); + if (test) { + // child was independent? this changes things... + subInd = true; + indep->transform = test->transform; + for (int i=0; i < transforms.size(); i++) { + bool newThing = false; + IndependentTransform * probe = dynamic_cast (transforms[i]->simplify(newThing)); + indep->transforms.append(probe->transform); + if (newThing) + probe->setParent(indep); + } + indep->file = indep->transform->file; + indep->trainable = indep->transform->trainable; + indep->setObjectName(indep->transform->objectName()); + + return indep; + } + + if (newChild) + indep->transform->setParent(indep); + + for (int i=0; i < transforms.size();i++) { + bool subTform = false; + indep->transforms.append(transforms[i]->simplify(subTform)); + if (subTform) + indep->transforms[i]->setParent(indep); + } + + indep->file = indep->transform->file; + indep->trainable = indep->transform->trainable; + indep->setObjectName(indep->transform->objectName()); + + return indep; + } + void init() { transforms.clear(); @@ -230,12 +284,12 @@ class IndependentTransform : public MetaTransform } } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { const int size = transforms.size(); stream << size; for (int i=0; istore(stream, force); + transforms[i]->store(stream); } void load(QDataStream &stream) @@ -296,10 +350,10 @@ class SingletonTransform : public MetaTransform transform->project(src, dst); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { if (transform->parent() == this) - transform->store(stream, force); + transform->store(stream); } void load(QDataStream &stream) diff --git a/openbr/plugins/integral.cpp b/openbr/plugins/integral.cpp index fe00573..f6117a0 100644 --- a/openbr/plugins/integral.cpp +++ b/openbr/plugins/integral.cpp @@ -251,12 +251,12 @@ class RecursiveIntegralSamplerTransform : public Transform } } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - transform->store(stream, force); + transform->store(stream); stream << (subTransform != NULL); if (subTransform != NULL) - subTransform->store(stream, force); + subTransform->store(stream); } void load(QDataStream &stream) diff --git a/openbr/plugins/landmarks.cpp b/openbr/plugins/landmarks.cpp index caafc29..993312d 100644 --- a/openbr/plugins/landmarks.cpp +++ b/openbr/plugins/landmarks.cpp @@ -125,7 +125,7 @@ class ProcrustesTransform : public Transform } } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << meanShape; } @@ -299,7 +299,7 @@ class ProcrustesAlignTransform : public Transform dst.file.set("ProcrustesBound", QRectF(0, 0, width + 2 * padding, (qRound(width / aspectRatio) + 2 * padding))); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << referenceShape; stream << minX; diff --git a/openbr/plugins/meta.cpp b/openbr/plugins/meta.cpp index c0b3bd3..82b4076 100644 --- a/openbr/plugins/meta.cpp +++ b/openbr/plugins/meta.cpp @@ -487,10 +487,10 @@ class LoadStoreTransform : public MetaTransform BR_PROPERTY(QString, description2, "Identity") BR_PROPERTY(QString, fileName, QString()) +public: Transform *transform; QString baseName; -public: LoadStoreTransform() : transform(NULL) {} QString description(bool expanded = false) @@ -500,6 +500,12 @@ public: return br::Object::description(expanded); } + Transform * simplify(bool & newTForm) + { + Transform * res = transform->simplify(newTForm); + return res; + } + bool setPropertyRecursive(const QString &name, QVariant value) { if (br::Object::setPropertyRecursive(name, value)) @@ -508,22 +514,15 @@ public: } private: - virtual void store(QDataStream &stream, bool force = false) const - { - if (force) { - transform->store(stream, force); - } - - br::Object::store(stream, false); - } - void init() { if (transform != NULL) return; if (fileName.isEmpty()) baseName = QRegExp("^[a-zA-Z0-9]+$").exactMatch(description2) ? description2 : QtUtils::shortTextHash(description2); else baseName = fileName; - if (!tryLoad()) transform = make(description2); - else trainable = false; + if (!tryLoad()) + transform = make(description2); + else + trainable = false; } bool timeVarying() const diff --git a/openbr/plugins/normalize.cpp b/openbr/plugins/normalize.cpp index 80609b5..449ca61 100644 --- a/openbr/plugins/normalize.cpp +++ b/openbr/plugins/normalize.cpp @@ -167,7 +167,7 @@ private: divide(dst, a, dst); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << a << b; } @@ -256,7 +256,7 @@ class RowWiseMeanCenterTransform : public Transform dst = m; } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << mean; } diff --git a/openbr/plugins/openbr_internal.h b/openbr/plugins/openbr_internal.h index 09b3c24..8ef6060 100644 --- a/openbr/plugins/openbr_internal.h +++ b/openbr/plugins/openbr_internal.h @@ -19,7 +19,7 @@ protected: private: Transform *clone() const { return const_cast(this); } void train(const TemplateList &data) { (void) data; } - void store(QDataStream &stream, bool force) const { (void) stream; (void) force; } + void store(QDataStream &stream) const { (void) stream; } void load(QDataStream &stream) { (void) stream; } }; @@ -201,6 +201,33 @@ public: this->trainable = transform->trainable; } + virtual Transform * simplify(bool & newTransform) + { + newTransform = false; + bool newChild = false; + Transform * temp = transform->simplify(newTransform); + if (temp == transform) + return this; + + if (!temp) + return NULL; + + // else make a copy to point at the new transform + Transform * child = transform; + transform = NULL; + WrapperTransform *output = dynamic_cast(Transform::make(description(), NULL)); + transform = child; + + output->transform = temp; + + if (newChild) + temp->setParent(output); + + newTransform = true; + return output; + } + + bool setPropertyRecursive(const QString &name, QVariant value) { if (br::Object::setPropertyRecursive(name, value)) @@ -220,21 +247,10 @@ public: return this; } newTransform = true; - - QString name = metaObject()->className(); - name.replace("Transform",""); - name += "(Identity"; - - QStringList arguments = this->arguments(); - if (!arguments.isEmpty()) { - name += ","; - name += this->arguments().join(","); - } - - name += ")"; - name.replace("br::",""); - - WrapperTransform *output = dynamic_cast(Transform::make(name, NULL)); + Transform * temp = transform; + transform = NULL; + WrapperTransform *output = dynamic_cast(Transform::make(description(), NULL)); + transform = temp; if (output == NULL) qFatal("Dynamic cast failed!"); @@ -309,21 +325,10 @@ public: } newTransform = true; - QString name = metaObject()->className(); - - name.replace("Transform",""); - name += "([]"; - - QStringList arguments = this->arguments(); - if (!arguments.isEmpty()) { - name += ","; - name += this->arguments().join(","); - } - - name += ")"; - name.replace("br::",""); - - CompositeTransform *output = dynamic_cast(Transform::make(name, NULL)); + QList temp = transforms; + transforms = QList(); + CompositeTransform *output = dynamic_cast(Transform::make(description(), NULL)); + transforms = temp; if (output == NULL) qFatal("Dynamic cast failed!"); @@ -342,6 +347,51 @@ public: return output; } + virtual Transform * simplify(bool & newTransform) + { + newTransform = false; + QList newTransforms; + bool anyNew = false; + + QList newChildren; + for (int i=0; i < transforms.size();i++) + { + bool newChild = false; + Transform * temp = transforms[i]->simplify(newChild); + if (temp == NULL) { + anyNew = true; + continue; + } + newTransforms.append(temp); + newChildren.append(newChild); + if (temp != transforms[i]) + anyNew = true; + } + + if (newTransforms.empty() ) + return NULL; + + if (!anyNew) + return this; + + // make a copy of the current object, with empty transforms + QList children = transforms; + transforms = QList (); + CompositeTransform *output = dynamic_cast(Transform::make(description(false), NULL)); + transforms = children; + + output->transforms = newTransforms; + for (int i=0;i < newChildren.size();i++) + { + if (newChildren[i]) + output->transforms[i]->setParent(output); + } + output->init(); + + newTransform = true; + return output; + } + bool setPropertyRecursive(const QString &name, QVariant value) { if (br::Object::setPropertyRecursive(name, value)) diff --git a/openbr/plugins/pp5.cpp b/openbr/plugins/pp5.cpp index 4739fae..8c6fcba 100644 --- a/openbr/plugins/pp5.cpp +++ b/openbr/plugins/pp5.cpp @@ -510,9 +510,9 @@ class PP5GalleryTransform: public UntrainableMetaTransform gallery = data; } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - br::Object::store(stream, force); + br::Object::store(stream); stream << gallery; } diff --git a/openbr/plugins/process.cpp b/openbr/plugins/process.cpp index e5933fc..1646a96 100644 --- a/openbr/plugins/process.cpp +++ b/openbr/plugins/process.cpp @@ -578,6 +578,7 @@ class ProcessWrapperTransform : public WrapperTransform QStringList argumentList; // We serialize and transmit the transform directly, so algorithm doesn't matter. + argumentList.append("-quiet"); argumentList.append("-algorithm"); argumentList.append("Identity"); if (!Globals->path.isEmpty()) { diff --git a/openbr/plugins/quality.cpp b/openbr/plugins/quality.cpp index 5cbff2d..0a02f40 100644 --- a/openbr/plugins/quality.cpp +++ b/openbr/plugins/quality.cpp @@ -62,9 +62,9 @@ class ImpostorUniquenessMeasureTransform : public Transform dst.file.set("Impostor_Uniqueness_Measure_Bin", ium < mean-stddev ? 0 : (ium < mean+stddev ? 1 : 2)); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - distance->store(stream, force); + distance->store(stream); stream << mean << stddev << impostors; } @@ -199,9 +199,9 @@ class MatchProbabilityDistance : public Distance return mp(score, gaussian); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - distance->store(stream, force); + distance->store(stream); stream << mp; } @@ -264,9 +264,9 @@ class ZScoreDistance : public Distance return score; } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - distance->store(stream, force); + distance->store(stream); stream << min << max << mean << stddev; } @@ -335,11 +335,11 @@ class HeatMapDistance : public Distance } } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << distances.size(); foreach (Distance *distance, distances) - distance->store(stream, force); + distance->store(stream); } void load(QDataStream &stream) diff --git a/openbr/plugins/quantize.cpp b/openbr/plugins/quantize.cpp index bf7477c..3091e09 100644 --- a/openbr/plugins/quantize.cpp +++ b/openbr/plugins/quantize.cpp @@ -99,7 +99,7 @@ class HistEqQuantizationTransform : public Transform } } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << thresholds; } @@ -174,7 +174,7 @@ class BayesianQuantizationDistance : public Distance return likelihood; } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << loglikelihoods; } @@ -527,7 +527,7 @@ private: dst.m().at(0,sizeof(quint16)+i) = getIndex(m.colRange(max(0, i*step-offset), (i+1)*step-offset), centers[i]); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << index << centers << ProductQuantizationLUTs[index]; } diff --git a/openbr/plugins/quantize2.cpp b/openbr/plugins/quantize2.cpp index 2ecea1c..8d05523 100644 --- a/openbr/plugins/quantize2.cpp +++ b/openbr/plugins/quantize2.cpp @@ -104,7 +104,7 @@ class BayesianQuantizationTransform : public Transform } } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << thresholds; } diff --git a/openbr/plugins/random.cpp b/openbr/plugins/random.cpp index 1bc4841..970061a 100644 --- a/openbr/plugins/random.cpp +++ b/openbr/plugins/random.cpp @@ -78,7 +78,7 @@ class RndSubspaceTransform : public Transform remap(src, dst, map, Mat(), INTER_NEAREST); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << fraction << weighted << map; } diff --git a/openbr/plugins/slidingwindow.cpp b/openbr/plugins/slidingwindow.cpp index 4dc89ef..1ae5663 100644 --- a/openbr/plugins/slidingwindow.cpp +++ b/openbr/plugins/slidingwindow.cpp @@ -79,9 +79,9 @@ private: } } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - transform->store(stream, force); + transform->store(stream); stream << windowHeight; } @@ -289,9 +289,9 @@ private: } } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { - transform->store(stream, force); + transform->store(stream); stream << aspectRatio << windowHeight; } void load(QDataStream &stream) diff --git a/openbr/plugins/svm.cpp b/openbr/plugins/svm.cpp index 79a6c5d..c374586 100644 --- a/openbr/plugins/svm.cpp +++ b/openbr/plugins/svm.cpp @@ -172,7 +172,7 @@ private: dst.file.set(outputVariable, reverseLookup[prediction]); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { storeSVM(svm, stream); stream << labelMap << reverseLookup; @@ -270,7 +270,7 @@ private: return svm.predict(delta.reshape(1, 1)); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { storeSVM(svm, stream); } diff --git a/openbr/plugins/validate.cpp b/openbr/plugins/validate.cpp index ef04661..1310d12 100644 --- a/openbr/plugins/validate.cpp +++ b/openbr/plugins/validate.cpp @@ -114,11 +114,11 @@ class CrossValidateTransform : public MetaTransform transforms[partition]->project(src, dst); } - void store(QDataStream &stream, bool force) const + void store(QDataStream &stream) const { stream << transforms.size(); foreach (Transform *transform, transforms) - transform->store(stream, force); + transform->store(stream); } void load(QDataStream &stream)