SemSegSTF.h 1.6 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  1. /**
  2. * @file SemSegSTF.h
  3. * @brief Localization system
  4. * @author Erik Rodner
  5. * @date 02/11/2008
  6. */
  7. #ifndef SemSegSTFINCLUDE
  8. #define SemSegSTFINCLUDE
  9. #include "SemanticSegmentation.h"
  10. #include "vislearning/classifier/fpclassifier/randomforest/DecisionNode.h"
  11. #include "vislearning/classifier/fpclassifier/randomforest/FPCRandomForests.h"
  12. namespace OBJREC {
  13. /** Localization system */
  14. class SemSegSTF : public SemanticSegmentation
  15. {
  16. protected:
  17. int numClasses;
  18. int maxdepthSegmentationForest;
  19. int maxdepthSegmentationForestScores;
  20. bool use_semantic_features;
  21. bool use_pixelpair_features;
  22. int subsamplex;
  23. int subsampley;
  24. bool read_seg_cache;
  25. bool read_pixel_cache;
  26. std::string cacheseg;
  27. std::string cachepixel;
  28. std::string resultsdatadir;
  29. double alphaDetectionPrior;
  30. double alphaImagePrior;
  31. int imagePriorMethod;
  32. int priorK;
  33. int detectionPriorMethod;
  34. /**
  35. assign all pixels with
  36. normalized entropy $E/log(n)$ above
  37. this threshold to the
  38. background class
  39. */
  40. double entropyThreshold;
  41. int backgroundModelType;
  42. std::map<DecisionNode *, std::pair<long, int> > index;
  43. FPCRandomForests *fpcSeg;
  44. FPCRandomForests *fpcPixel;
  45. std::map<std::string, LocalizationResult *> detresults;
  46. void fillCachePixel ( CachedExample *ce );
  47. void fillCacheSegmentation ( CachedExample *ce );
  48. public:
  49. /** simple constructor */
  50. SemSegSTF( const Config *conf,
  51. const MultiDataset *md );
  52. /** simple destructor */
  53. virtual ~SemSegSTF();
  54. void semanticseg ( CachedExample *ce,
  55. NICE::Image & segresult,
  56. NICE::MultiChannelImageT<double> & probabilities );
  57. };
  58. } // namespace
  59. #endif