12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152 |
- /**
- * @file FeatureLearningGeneric.cpp
- * @brief abstract interface for feature learning algorithms
- * @author Alexander Freytag
- * @date 16-04-2013 (dd-mm-yyyy)
- */
- #include <iostream>
- #include <vislearning/baselib/Preprocess.h>
- #include "FeatureLearningGeneric.h"
- using namespace OBJREC;
- using namespace std;
- using namespace NICE;
- FeatureLearningGeneric::FeatureLearningGeneric ( const Config *_conf, const std::string & _section )
- {
- this->section = _section;
- this->conf = _conf;
-
- this->cacheInitialCodebook = this->conf->gS(this->section, "cacheInitialCodebook", "");
- this-> b_loadInitialCodebook = this->conf->gB(this->section, "loadInitialCodebook", "");
- this-> b_saveInitialCodebook = this->conf->gB(this->section, "saveInitialCodebook", "");
-
- this->b_evaluationWhileFeatureLearning = this->conf->gB( this->section, "evaluationWhileFeatureLearning", false );
-
- Preprocess::Init ( _conf );
- }
- FeatureLearningGeneric::~FeatureLearningGeneric()
- {
- }
- void FeatureLearningGeneric::learnNewFeatures ( const std::string & _filename )
- {
- // Globals::setCurrentImgFN ( filename );
- // CachedExample *ce;
- // if ( imagetype == IMAGETYPE_RGB )
- // {
- // NICE::ColorImage img = Preprocess::ReadImgAdvRGB ( filename );
- // ce = new CachedExample ( img );
- // } else {
- //
- // NICE::Image img = Preprocess::ReadImgAdv ( filename );
- // ce = new CachedExample ( img );
- // }
- // fprintf ( stderr, "Starting Semantic Segmentation !\n" );
- // learnNewFeatures ( ce );
- // delete ce;
- }
|