123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130 |
- #ifndef _INCLUDEFEATURELEARNING
- #define _INCLUDEFEATURELEARNING
- #define ROADWORKS fthrow(NICE::Exception, "Feature Learning -- not yet implemented!");
- #include <string>
- #include <core/basics/Config.h>
- #include <core/image/ImageT.h>
- #include <core/vector/VVector.h>
- #include <vislearning/cbaselib/CachedExample.h>
- namespace OBJREC
- {
-
- class FeatureLearningGeneric
- {
- protected:
-
-
-
-
-
- std::string section;
-
-
- const NICE::Config *conf;
-
-
- std::string cacheInitialCodebook;
-
- bool b_loadInitialCodebook;
-
- bool b_saveInitialCodebook;
-
-
- bool b_evaluationWhileFeatureLearning;
-
- bool b_showTrainingImages;
- bool b_showResults;
-
- std::string s_resultdir;
-
-
-
-
-
-
- virtual bool loadInitialCodebook ( ) = 0;
-
-
-
- virtual bool writeInitialCodebook ( ) = 0;
-
- public:
-
- FeatureLearningGeneric ( const NICE::Config *_conf, const std::string & _section = "featureLearning" );
-
- virtual ~FeatureLearningGeneric();
-
-
- virtual void learnNewFeatures ( const std::string & _filename) = 0;
-
- virtual NICE::FloatImage evaluateCurrentCodebookByDistance ( const std::string & _filename , const bool & beforeComputingNewFeatures = true) = 0;
-
- virtual NICE::ImageT<int> evaluateCurrentCodebookByAssignments ( const std::string & _filename , const bool & beforeComputingNewFeatures = true, const bool & _binaryShowLatestPrototype = false) = 0;
-
- virtual void evaluateCurrentCodebookByConfusionMatrix( NICE::Matrix & _confusionMat ) = 0;
-
- virtual NICE::VVector * getCurrentCodebook() = 0;
-
- };
- }
- #endif
|