1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- /**
- * @file SemSegNovelty.h
- * @brief semantic segmentation using the method from Csurka08
- * @author Björn Fröhlich
- * @date 04/24/2009
- */
- #ifndef SemSegNoveltyINCLUDE
- #define SemSegNoveltyINCLUDE
- #include "SemanticSegmentation.h"
- #include "SemSegTools.h"
- #include "vislearning/classifier/classifierbase/FeaturePoolClassifier.h"
- #include "vislearning/features/localfeatures/LFColorWeijer.h"
- /** @brief pixelwise labeling systems */
- namespace OBJREC {
- class SemSegNovelty : public SemanticSegmentation
- {
- protected:
- //! boolean whether to save the cache or not
- bool save_cache;
- //! boolean whether to read the cache or not, if read_cache is false, everything will be trained
- bool read_cache;
- //! The cached Data
- std::string cache;
-
- //! Classifier
- FeaturePoolClassifier *classifier;
-
- //! feature extraction
- LFColorWeijer *featExtract;
-
- //! Configuration File
- const NICE::Config *conf;
-
- //! distance between features for training
- int featdist;
-
- //! half of the window size for local features
- int whs;
-
- //! rectangle size for classification, 1 means pixelwise
- int testWSize;
-
- //! name of all classes
- ClassNames cn;
-
- //! set of forbidden/background classes
- std::set<int> forbidden_classes;
-
- //! where to save the uncertainty
- std::string uncertdir;
-
- public:
- /** constructor
- * @param conf needs a configfile
- * @param md and a MultiDataset (contains images and other things)
- */
- SemSegNovelty ( const NICE::Config *conf, const MultiDataset *md );
- /** simple destructor */
- virtual ~SemSegNovelty();
- /** The trainingstep
- * @param md and a MultiDataset (contains images and other things)
- */
- void train ( const MultiDataset *md );
- /** The main procedure. Input: Image, Output: Segmented Image with pixelwise labeles and the probabilities
- * @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<double> & probabilities );
- };
- } //namespace
- #endif
|