/** * @file SemSegConvolutionalTree.h * @brief Semantic Segmentation using Covolutional Trees * @author Sven Sickert * @date 10/17/2014 */ #ifndef SEMSEGCONVOLUTIONALTREEINCLUDE #define SEMSEGCONVOLUTIONALTREEINCLUDE // nice-core includes // nice-vislearning includes #include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h" // nice-semseg includes #include "SemanticSegmentation.h" namespace OBJREC { class SemSegConvolutionalTree : public SemanticSegmentation { private: /** pointer to config file */ const NICE::Config *conf; /** save / load trained classifier */ bool saveLoadData; /** file location of trained classifier */ std::string fileLocation; /** classifier for categorization */ FeaturePoolClassifier *fpc; public: /** simple constructor */ SemSegConvolutionalTree (); /** config constructor */ SemSegConvolutionalTree ( const NICE::Config *conf, const ClassNames *classNames ); /** simple destructor */ virtual ~SemSegConvolutionalTree(); /** * @brief Setup internal variables and objects used * @param conf Configuration file to specify variable settings * @param s_confSection Section in configuration file */ void initFromConfig ( const NICE::Config *_conf, const std::string & s_confSection = "SemSegConvolutionalTree" ); /** * @brief training function / learn classifier * @param md the data set */ void train ( const MultiDataset *md ); /** * @brief classification function @param ce image data @param segresult result of the semantic segmentation with a label for each pixel @param probabilities multi-channel image with one channel for each class and corresponding probabilities for each pixel */ void semanticseg ( CachedExample *ce, NICE::Image &segresult, NICE::MultiChannelImageT &probabilities ); ///////////////////// INTERFACE PERSISTENT ///////////////////// // interface specific methods for store and restore ///////////////////// INTERFACE PERSISTENT ///////////////////// /** * @brief Load segmentation object from external file (stream) */ virtual void restore ( std::istream & is, int format = 0 ); /** * @brief Save segmentation-object to external file (stream) */ virtual void store( std::ostream & os, int format = 0 ) const; /** * @brief Clear segmentation-object object */ virtual void clear (); }; } // namespace #endif