Public Member Functions | Public Attributes | Friends

MultinomialObservationModel Class Reference
[Auxilliary Tools]

Auxilliary Tool: Multionomial Observation Model, as described in Butko and Movellan, CVPR 2009 (see Related Publications). This data structure maintains the mapping between object detector output and the probability that the target object is located at every grid-cell. More...

#include <MultinomialObservationModel.h>

Inherited by MOMultinomialObservationModel.

List of all members.

Public Member Functions

 MultinomialObservationModel (CvSize gridSize)
 Constructor: Create an observation model with space allocated to hold parameters for a grid of size gridSize. The probabilities are set according to some simple heuristic.
 MultinomialObservationModel (MultinomialObservationModel *modelToCopy)
 Deep Copy Constructor: Create an observation model that is identical to the one copied.
virtual ~MultinomialObservationModel ()
 Default Destructor.
virtual void setObservationProbability (CvPoint searchPoint, IplImage *faceCount)
 Given an observation (output of the object detector at each grid cell), estimate the relative likelihood that each grid cell's output was caused by the object being located there. The results of this computation are stored in the observationProbability variable.
void resetCounts ()
 Reset the experience-counts used to estimate the multinomial parameters. Sets all counts to 1.
virtual void updateProbTableCounts (CvPoint searchPoint, IplImage *faceCount, CvRect faceLocation)
 Add evidence from one event to the count-tables that maintain the Dirichlet distribution over the multinomial parameters.
void normalizeProbTables ()
 Estimate the Maximum A Posterior multinomial parameters based on the events seen so far, and use this as the probability distribution estimate in the future.
void combineEvidence (MultinomialObservationModel *otherModel)
 Combine the evidence from two models (merge their counts and subtract off the extra priors).

Public Attributes

IplImage * observationProbability
 The results of "setObservationProbability" are stored in this variable. Each location contains the probabilty of the entire observation vector if the object were located at that location (up to a factor that is constant for every element).

Friends

std::ostream & operator<< (std::ostream &ofs, MultinomialObservationModel *a)
 Write the probabilities and counts to a file stream, so we can read them in later.
std::istream & operator>> (std::istream &ifs, MultinomialObservationModel *a)
 Read the probabilities and counts from a file stream, so we don't lose our earlier models.

Detailed Description

Auxilliary Tool: Multionomial Observation Model, as described in Butko and Movellan, CVPR 2009 (see Related Publications). This data structure maintains the mapping between object detector output and the probability that the target object is located at every grid-cell.

An observation model consists of grid-height*grid-width*2 multinomial distributions, each with 10 outcomes. The proportiaonal likelihood that the counts of object-detector firings in a single grid-cell was caused by the object, instead of generated spontaneously, is p(count|object,xdist-to-fixation,ydist-to-fixation) / p(count|noobject,xdist-to-fixation,ydist-to-fixation).

Author:
Nicholas Butko
Date:
2010
Version:
0.4

Constructor & Destructor Documentation

MultinomialObservationModel::~MultinomialObservationModel (  ) [virtual]

Default Destructor.

Deallocates all memory associated with the haar detector.


Member Function Documentation

void MultinomialObservationModel::combineEvidence ( MultinomialObservationModel otherModel )

Combine the evidence from two models (merge their counts and subtract off the extra priors).

Parameters:
otherModelA second MultinomialObservationModel that has been fit to different data than this one: We can estimate the model for the combined set of data by simply adding the counts, and subtracting duplicate priors. In this way, we can efficiently compose models fit to different subsets of a larger dataset (e.g. for cross-validation).

In general, this functionality should be accessed indirectly, through the MIPOMDP cobineModels() function.

void MultinomialObservationModel::normalizeProbTables (  )

Estimate the Maximum A Posterior multinomial parameters based on the events seen so far, and use this as the probability distribution estimate in the future.

Simply updating the counts does not change the estimate of outcome probabilities. This only happens when normalizeProbTables() is called.

In general, this functionality should be accessed indirectly, through the MIPOMDP trainObservationModel() function or addDataToObservationModel() function.

void MultinomialObservationModel::resetCounts (  )

Reset the experience-counts used to estimate the multinomial parameters. Sets all counts to 1.

The multinomial distribution probabilities are estimated from experience counts. The table of counts forms a dirichlet posterior over the parameters of the multinomials. When the counts are reset to 1, there is a flat prior over multinomial parameters, and all outcomes are seen as equally likely. This is a particularly bad model, and will make it impossible to figure out the location of the face, so only call resetCounts if you're then going to call updateProbTableCounts for enough images to build up a good model.

In general, this functionality should be accessed indirectly, through the MIPOMDP resetModel() function.

void MultinomialObservationModel::setObservationProbability ( CvPoint  searchPoint,
IplImage *  faceCount 
) [virtual]

Given an observation (output of the object detector at each grid cell), estimate the relative likelihood that each grid cell's output was caused by the object being located there. The results of this computation are stored in the observationProbability variable.

Parameters:
searchPointThe point that was the center of fixation when the object detector was applied to the image.
faceCountAn "image" of counts with the size of the grid. This is the number of target objects detected with centers in each grid cell as a result of applying the object detector.
void MultinomialObservationModel::updateProbTableCounts ( CvPoint  searchPoint,
IplImage *  faceCount,
CvRect  faceLocation 
) [virtual]

Add evidence from one event to the count-tables that maintain the Dirichlet distribution over the multinomial parameters.

Given a fixation point and a face location, the resulting object detector output forms a collection of random events. We add these outcomes to a table of counts of witnessed events, and build up a model of how likely each event is.

In general, this functionality should be accessed indirectly, through the MIPOMDP trainObservationModel() function or addDataToObservationModel() function.


The documentation for this class was generated from the following files: