From fe4366bcfb8c4b464e6ec450dd70d1548abc9502 Mon Sep 17 00:00:00 2001 From: Jordan Cheney Date: Tue, 26 May 2015 17:18:00 -0400 Subject: [PATCH] Train, store, and load representations as necessary --- openbr/plugins/classification/boostedforest.cpp | 6 ++++++ 1 file changed, 6 insertions(+), 0 deletions(-) diff --git a/openbr/plugins/classification/boostedforest.cpp b/openbr/plugins/classification/boostedforest.cpp index cc90ad1..35ddf3e 100644 --- a/openbr/plugins/classification/boostedforest.cpp +++ b/openbr/plugins/classification/boostedforest.cpp @@ -106,6 +106,8 @@ class BoostedForestClassifier : public Classifier void train(const QList &images, const QList &labels) { + representation->train(images, labels); + CascadeBoostParams params(CvBoost::GENTLE, minTAR, maxFAR, trimRate, maxDepth, maxWeakCount); FeatureEvaluator featureEvaluator; @@ -180,6 +182,8 @@ class BoostedForestClassifier : public Classifier void load(QDataStream &stream) { + representation->load(stream); + stream >> threshold; int numClassifiers; stream >> numClassifiers; for (int i = 0; i < numClassifiers; i++) { @@ -191,6 +195,8 @@ class BoostedForestClassifier : public Classifier void store(QDataStream &stream) const { + representation->store(stream); + stream << threshold; stream << classifiers.size(); foreach (const Node *classifier, classifiers) -- libgit2 0.21.4