|
@@ -9,16 +9,16 @@
|
|
|
|
|
|
#include "SemanticSegmentation.h"
|
|
#include "SemanticSegmentation.h"
|
|
|
|
|
|
-#include "objrec/classifier/classifierbase/FeaturePoolClassifier.h"
|
|
|
|
-#include "objrec/classifier/classifierbase/VecClassifier.h"
|
|
|
|
|
|
+#include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"
|
|
|
|
+#include "vislearning/classifier/classifierbase/VecClassifier.h"
|
|
|
|
|
|
#include "objrec/segmentation/RegionSegmentationMethod.h"
|
|
#include "objrec/segmentation/RegionSegmentationMethod.h"
|
|
|
|
|
|
-#include "objrec/math/mathbase/Featuretype.h"
|
|
|
|
|
|
+#include "vislearning/math/mathbase/Featuretype.h"
|
|
#include "objrec/features/regionfeatures/RegionFeatures.h"
|
|
#include "objrec/features/regionfeatures/RegionFeatures.h"
|
|
-#include "objrec/features/localfeatures/LocalFeature.h"
|
|
|
|
|
|
+#include "vislearning/features/localfeatures/LocalFeature.h"
|
|
|
|
|
|
-#include "objrec/math/ftransform/PCA.h"
|
|
|
|
|
|
+#include "vislearning/math/ftransform/PCA.h"
|
|
|
|
|
|
#include "objrec-froehlichexp/semseg/postsegmentation/PPGraphCut.h"
|
|
#include "objrec-froehlichexp/semseg/postsegmentation/PPGraphCut.h"
|
|
|
|
|
|
@@ -31,7 +31,7 @@ namespace OBJREC
|
|
//! destination for saving intermediate steps
|
|
//! destination for saving intermediate steps
|
|
bool save_cache, read_cache;
|
|
bool save_cache, read_cache;
|
|
std::string cache;
|
|
std::string cache;
|
|
- string classifiercache;
|
|
|
|
|
|
+ std::string classifiercache;
|
|
|
|
|
|
//! used ClassNames
|
|
//! used ClassNames
|
|
ClassNames cn;
|
|
ClassNames cn;
|
|
@@ -98,7 +98,7 @@ namespace OBJREC
|
|
* @param rg region graph
|
|
* @param rg region graph
|
|
* @param feats output features
|
|
* @param feats output features
|
|
*/
|
|
*/
|
|
- void getFeats(const NICE::ColorImage &cimg, const NICE::Matrix &mask, const RegionGraph &rg, vector<vector< FeatureType> > &feats) const;
|
|
|
|
|
|
+ void getFeats(const NICE::ColorImage &cimg, const NICE::Matrix &mask, const RegionGraph &rg, std::vector<std::vector< FeatureType> > &feats) const;
|
|
|
|
|
|
/**
|
|
/**
|
|
* computes or reads features and corresponding labels for learnHighLevel()
|
|
* computes or reads features and corresponding labels for learnHighLevel()
|
|
@@ -108,7 +108,7 @@ namespace OBJREC
|
|
* @param examples output examples (including label)
|
|
* @param examples output examples (including label)
|
|
* @param mode mode 1 for examples, mode 0 for VVector
|
|
* @param mode mode 1 for examples, mode 0 for VVector
|
|
*/
|
|
*/
|
|
- void computeLF(LabeledSet::Permutation perm, VVector &feats, vector<int> &label, Examples &examples, int mode);
|
|
|
|
|
|
+ void computeLF(LabeledSet::Permutation perm, VVector &feats, std::vector<int> &label, Examples &examples, int mode);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Computes HighLevel Codebooks (i.e. GMM or PCA) if necessary
|
|
* Computes HighLevel Codebooks (i.e. GMM or PCA) if necessary
|
|
@@ -120,21 +120,21 @@ namespace OBJREC
|
|
* trains the classifier
|
|
* trains the classifier
|
|
* @param feats features
|
|
* @param feats features
|
|
*/
|
|
*/
|
|
- void trainClassifier(vector<vector<FeatureType> > &feats, Examples &examples);
|
|
|
|
|
|
+ void trainClassifier(std::vector<std::vector<FeatureType> > &feats, Examples &examples);
|
|
|
|
|
|
/**
|
|
/**
|
|
* Convert features into examples
|
|
* Convert features into examples
|
|
* @param feats input features
|
|
* @param feats input features
|
|
* @param examples features as examples
|
|
* @param examples features as examples
|
|
*/
|
|
*/
|
|
- void getExample(const vector<vector<FeatureType> > &feats, Examples &examples);
|
|
|
|
|
|
+ void getExample(const std::vector<std::vector<FeatureType> > &feats, Examples &examples);
|
|
|
|
|
|
/**
|
|
/**
|
|
* create featurepool depending on used features
|
|
* create featurepool depending on used features
|
|
* @param feats input features
|
|
* @param feats input features
|
|
* @param fp feature pool
|
|
* @param fp feature pool
|
|
*/
|
|
*/
|
|
- void getFeaturePool( const vector<vector<FeatureType> > &feats, FeaturePool &fp);
|
|
|
|
|
|
+ void getFeaturePool( const std::vector<std::vector<FeatureType> > &feats, FeaturePool &fp);
|
|
|
|
|
|
/**
|
|
/**
|
|
* classify the given features
|
|
* classify the given features
|
|
@@ -142,14 +142,14 @@ namespace OBJREC
|
|
* @param examples examples
|
|
* @param examples examples
|
|
* @param probs probability for each region
|
|
* @param probs probability for each region
|
|
*/
|
|
*/
|
|
- void classify(const vector<vector<FeatureType> > &feats, Examples &examples, vector<vector<double> > &probs);
|
|
|
|
|
|
+ void classify(const std::vector<std::vector<FeatureType> > &feats, Examples &examples, std::vector<std::vector<double> > &probs);
|
|
|
|
|
|
/**
|
|
/**
|
|
* set the label of each region the to most probable class
|
|
* set the label of each region the to most probable class
|
|
* @param rg
|
|
* @param rg
|
|
* @param probs
|
|
* @param probs
|
|
*/
|
|
*/
|
|
- void labelRegions(RegionGraph &rg, vector<vector<double> > &probs);
|
|
|
|
|
|
+ void labelRegions(RegionGraph &rg, std::vector<std::vector<double> > &probs);
|
|
|
|
|
|
/**
|
|
/**
|
|
* set label of each pixel to label of corresponding region
|
|
* set label of each pixel to label of corresponding region
|
|
@@ -174,7 +174,7 @@ namespace OBJREC
|
|
* @param dim new dimension
|
|
* @param dim new dimension
|
|
* @param fn destination filename
|
|
* @param fn destination filename
|
|
*/
|
|
*/
|
|
- void initializePCA ( const VVector &feats, PCA &pca, int dim, string &fn );
|
|
|
|
|
|
+ void initializePCA ( const VVector &feats, PCA &pca, int dim, std::string &fn );
|
|
|
|
|
|
/**
|
|
/**
|
|
* transform features using a given pca
|
|
* transform features using a given pca
|