Implements a pixel-level CRF model for multi-class image segmentation (pixel labeling).
More...
|
| drwnPixelSegModel () |
| default constructor
|
|
| drwnPixelSegModel (const drwnPixelSegModel &model) |
| copy constructor
|
|
const char * | type () const |
| returns object type as a string (e.g., Foo::type() { return "Foo"; })
|
|
virtual void | clear () |
| clear learned model parameters
|
|
virtual bool | save (drwnXMLNode &xml) const |
| write object to XML node (see also write)
|
|
virtual bool | load (drwnXMLNode &xml) |
| read object from XML node (see also read)
|
|
int | numLabels () const |
| return the number of labels that this model has been trained to recognize
|
|
void | setFeatureGenerator (const drwnSegImagePixelFeatures &featureGenerator) |
| set the object used to generate pixel features from the image instance
|
|
const drwnSegImagePixelFeatures & | getFeatureGenerator () const |
| return the object used to generate pixel features from the image instance
|
|
void | learnTrainingClassWeights (const vector< string > &baseNames) |
| learn the training class weights by counting class occurrance
|
|
void | learnBoostedPixelModels (const vector< string > &baseNames, int subSample=0) |
| learn boosted classifiers for predicting classes from pixel features
|
|
void | learnPixelUnaryModel (const vector< string > &baseNames, int subSample=0) |
| learn unary potentials for calibrating pixel predictions
|
|
void | learnPixelContrastWeight (const vector< string > &baseNames) |
| learn the weight of the pairwise constrast term
|
|
void | learnPixelContrastWeight (double weight) |
| set the weight of the pairwise contrast term
|
|
void | learnLongRangePairwiseWeight (const vector< string > &baseNames, double threshold, unsigned radius=4) |
| learn the weight of the long range pairwise term
|
|
void | learnLongRangePairwiseWeight (double weight, double threshold, unsigned radius=4) |
| set the weight of the long range pairwise term
|
|
void | learnRobustPottsWeight (const vector< string > &baseNames) |
| learn the weight of the robust potts consistency term
|
|
void | learnRobustPottsWeight (double weight) |
| set the weight of the robust potts consistency term
|
|
void | learnPixelContrastAndRobustPottsWeights (const vector< string > &baseNames) |
| learn the weights of the pairwise contrast and robust potts consistency terms jointly
|
|
void | learnPixelContrastAndLongRangeWeights (const vector< string > &baseNames, double threshold, unsigned radius=4) |
| learn the contrast and long-range weights jointly
|
|
double | getPairwiseContrastWeight () const |
| get the weight of the pairwise contrast term
|
|
double | getLongRangePairwiseWeight () const |
| get the weight of the long range pairwise term
|
|
double | getRobustPottsWeight () const |
| get the weight of the robust potts term
|
|
void | cacheUnaryPotentials (drwnSegImageInstance *instance) const |
| cache the unary potentials inside the instance object
|
|
void | cacheLongRangeEdges (drwnSegImageInstance *instance) const |
| cache the long-range edges inside the instance object
|
|
double | inferPixelLabels (drwnSegImageInstance *instance) const |
| infer the pixel labels using learned model parameters and store the predicted labels inside the instance object
|
|
virtual double | inferPixelLabels (const vector< string > &baseNames, vector< MatrixXi > &predictedLabels) const |
| infer pixel labels for a set of images and return predicted labels in predictedLabels
|
|
virtual double | energy (drwnSegImageInstance *instance) const |
| return the energy of a given labeling according to the model parameters
|
|
bool | write (const char *filename) const |
| write object to file (calls save)
|
|
bool | read (const char *filename) |
| read object from file (calls load)
|
|
void | dump () const |
| print object's current state to standard output (for debugging)
|
|
|
void | computeBoostedResponses (const vector< double > &x, vector< double > &y) const |
| compute boosted pixel features y as a function of raw features x
|
|
void | cacheBoostedPixelResponses (drwnSegImageInstance &instance) const |
| cache all boosted pixel features in instance More...
|
|
void | buildSampledTrainingSet (const vector< string > &baseNames, const char *labelExt, int nLabels, vector< vector< double > > &featureVectors, vector< int > &featureLabels, int subSample, bool bRawFeatures) const |
| dataset creation for training
|
|
void | crossValidateWeights (const vector< string > &baseNames, const vector< double > &pairwiseContrastValues, const vector< double > &robustPottsValues, const vector< double > &longRangeValues) |
| cross-validate pairwise contrast and robust potts weights
|
|
Implements a pixel-level CRF model for multi-class image segmentation (pixel labeling).
The model supports a contrast-sensitive pairwise smoothness prior, long range pairwise terms determined from patch matching, and a higher-order robust generalized potts consistency prior. The pairwise smoothness prior is defined over an 8-connected neighbourhood for each pixel. The robust potts prior is implemented on the superpixels defined in each drwnSegImageInstance.
- See also
- drwnSegImageInstance
-
Multi-class Image Segmentation