Public Member Functions | Private Member Functions | Private Attributes | List of all members
ProbabilisticSceneRecognition::TopologyEvaluator Class Reference

#include <TopologyEvaluator.h>

Inheritance diagram for ProbabilisticSceneRecognition::TopologyEvaluator:
Inheritance graph
[legend]

Public Member Functions

bool evaluate (boost::shared_ptr< SceneModel::Topology > pTopology, bool pFullyMeshed=false)
 
 TopologyEvaluator (std::vector< boost::shared_ptr< ISM::ObjectSet >> pExamplesList, std::vector< boost::shared_ptr< SceneObjectLearner >> pLearners, double pRecognitionThreshold)
 
 ~TopologyEvaluator ()
 
- Public Member Functions inherited from ProbabilisticSceneRecognition::AbstractTopologyEvaluator
void eraseInvalidTestSet (unsigned int pIndex)
 
void eraseValidTestSet (unsigned int pIndex)
 
std::vector< boost::shared_ptr< TestSet > > getInvalidTestSets ()
 
double getRecognitionThreshold ()
 
std::vector< boost::shared_ptr< TestSet > > getValidTestSets ()
 
void setInvalidTestSets (const std::vector< boost::shared_ptr< TestSet >> &pInvalidTestSets)
 
void setRecognitionThreshold (double pRecognitionThreshold)
 
void setValidTestSets (const std::vector< boost::shared_ptr< TestSet >> &pValidTestSets)
 

Private Member Functions

double getProbability (boost::shared_ptr< TestSet > pEvidence)
 
std::pair< double, double > recognize (boost::shared_ptr< TestSet > pEvidence, bool pFullyMeshed=false)
 
void update (boost::shared_ptr< SceneModel::TreeNode > pTree)
 
void xmlOutput (boost::shared_ptr< SceneModel::Topology > pTopology)
 

Private Attributes

bool mCreateRuntimeLog
 
std::vector< boost::shared_ptr< ISM::ObjectSet > > mExamplesList
 
ForegroundSceneContent mForegroundSceneContent
 
std::string mFrameId
 
std::string mInferenceAlgorithm
 
std::vector< boost::shared_ptr< SceneObjectLearner > > mLearners
 
boost::property_tree::ptree mModel
 
PrintHelper mPrintHelper
 
unsigned int mRunNumber
 
std::ofstream mRuntimeLogger
 
double mScaleFactor
 
double mSigmaMultiplier
 
bool mTargetingHelp
 
bool mVisualize
 
boost::shared_ptr< Visualization::ProbabilisticSceneVisualization > mVisualizer
 
std::string mXmlFilePath
 
std::string mXmlOutput
 

Additional Inherited Members

- Protected Attributes inherited from ProbabilisticSceneRecognition::AbstractTopologyEvaluator
std::vector< boost::shared_ptr< TestSet > > mInvalidTestSets
 
double mRecognitionThreshold
 
std::vector< boost::shared_ptr< TestSet > > mValidTestSets
 

Detailed Description

Tests learned models of topologies against valid and invalid test sets.

Definition at line 30 of file TopologyEvaluator.h.

Constructor & Destructor Documentation

ProbabilisticSceneRecognition::TopologyEvaluator::TopologyEvaluator ( std::vector< boost::shared_ptr< ISM::ObjectSet >>  pExamplesList,
std::vector< boost::shared_ptr< SceneObjectLearner >>  pLearners,
double  pRecognitionThreshold 
)

Constructor.

Parameters
pExamplesListlist of object observations (evidences) to train on.
pLearnerslearners to learn models to test.
pRecognitionThresholdthe threshold above (>) which a scene is considered recognized.

Definition at line 22 of file TopologyEvaluator.cpp.

ProbabilisticSceneRecognition::TopologyEvaluator::~TopologyEvaluator ( )

Desctuctor.

Definition at line 77 of file TopologyEvaluator.cpp.

Member Function Documentation

bool ProbabilisticSceneRecognition::TopologyEvaluator::evaluate ( boost::shared_ptr< SceneModel::Topology >  pTopology,
bool  pFullyMeshed = false 
)
virtual

Evaluate model learned on topology against test sets, write results to topology.

Parameters
pTopologyto evaluate.
pFullyMeshedwhether the topology to evaluate is the fully meshed one.
Returns
whether a new evaluation was neccessary.

Implements ProbabilisticSceneRecognition::AbstractTopologyEvaluator.

Definition at line 84 of file TopologyEvaluator.cpp.

double ProbabilisticSceneRecognition::TopologyEvaluator::getProbability ( boost::shared_ptr< TestSet pEvidence)
private

Returns the probability whether the given evidence represents the scene represented by the last learned model.

Parameters
pEvidencethe object observations to calculate the probability for.
Returns
the probability whether the given evidence represents the scene represented by the last learned model.

Definition at line 153 of file TopologyEvaluator.cpp.

std::pair< double, double > ProbabilisticSceneRecognition::TopologyEvaluator::recognize ( boost::shared_ptr< TestSet pEvidence,
bool  pFullyMeshed = false 
)
private

Runs recognition on evidence and returns probability recognition runtime. Also writes recognition runtime and probability to TestSet if the topology used to evaluate against is the fully meshed one.

Parameters
pEvidencethe TestSet to recognize
pFullyMeshedwhether the topology used to recognize is the fully meshed one, and whether to store recognition runtime and probability in TestSet
Returns
the probability and recognition runtime for this test set.

Definition at line 133 of file TopologyEvaluator.cpp.

void ProbabilisticSceneRecognition::TopologyEvaluator::update ( boost::shared_ptr< SceneModel::TreeNode >  pTree)
private

Update the model to represent the given tree.

Parameters
pTreetree to form the basis of the new model.

Definition at line 169 of file TopologyEvaluator.cpp.

void ProbabilisticSceneRecognition::TopologyEvaluator::xmlOutput ( boost::shared_ptr< SceneModel::Topology >  pTopology)
private

Output model in xml format.

Parameters
pTopologythe topology underlying the model to write and containing its evalution results.

Definition at line 201 of file TopologyEvaluator.cpp.

Member Data Documentation

bool ProbabilisticSceneRecognition::TopologyEvaluator::mCreateRuntimeLog
private

Whether to create a runtime log.

Definition at line 141 of file TopologyEvaluator.h.

std::vector<boost::shared_ptr<ISM::ObjectSet> > ProbabilisticSceneRecognition::TopologyEvaluator::mExamplesList
private

List of object observations (evidences) to train on.

Definition at line 88 of file TopologyEvaluator.h.

ForegroundSceneContent ProbabilisticSceneRecognition::TopologyEvaluator::mForegroundSceneContent
private

Used to do inference on the learned model.

Definition at line 114 of file TopologyEvaluator.h.

std::string ProbabilisticSceneRecognition::TopologyEvaluator::mFrameId
private

The name of the frame the objects should be transformed to.

Definition at line 155 of file TopologyEvaluator.h.

std::string ProbabilisticSceneRecognition::TopologyEvaluator::mInferenceAlgorithm
private

Algorithm to be used to combine inference results. from { "powerset", "summarized", "multiplied", "maximum" }

Definition at line 120 of file TopologyEvaluator.h.

std::vector<boost::shared_ptr<SceneObjectLearner> > ProbabilisticSceneRecognition::TopologyEvaluator::mLearners
private

Learners to learn models to test.

Definition at line 93 of file TopologyEvaluator.h.

boost::property_tree::ptree ProbabilisticSceneRecognition::TopologyEvaluator::mModel
private

xml property tree describing the partial model learned on the current topoloy.

Definition at line 136 of file TopologyEvaluator.h.

PrintHelper ProbabilisticSceneRecognition::TopologyEvaluator::mPrintHelper
private

Class used to print lines as headers, marked with dividers.

Definition at line 104 of file TopologyEvaluator.h.

unsigned int ProbabilisticSceneRecognition::TopologyEvaluator::mRunNumber
private

Number of the current evaluator run, increased whenever evaluate() is called. Used in file names when mXmlOutput is "file".

Definition at line 99 of file TopologyEvaluator.h.

std::ofstream ProbabilisticSceneRecognition::TopologyEvaluator::mRuntimeLogger
private

A logger for the runtimes for the scene objects.

Definition at line 109 of file TopologyEvaluator.h.

double ProbabilisticSceneRecognition::TopologyEvaluator::mScaleFactor
private

The visualization is pretty small, this scale factor enlarges it.

Definition at line 159 of file TopologyEvaluator.h.

double ProbabilisticSceneRecognition::TopologyEvaluator::mSigmaMultiplier
private

This factor determines the multiple of the standard deviation.

Definition at line 163 of file TopologyEvaluator.h.

bool ProbabilisticSceneRecognition::TopologyEvaluator::mTargetingHelp
private

Set true, to overwrite the visualization of results of intermediate inference runs and plot the target distributions instead.

Definition at line 151 of file TopologyEvaluator.h.

bool ProbabilisticSceneRecognition::TopologyEvaluator::mVisualize
private

Whether to visualize intermediate inference runs in rviz.

Definition at line 147 of file TopologyEvaluator.h.

boost::shared_ptr<Visualization::ProbabilisticSceneVisualization> ProbabilisticSceneRecognition::TopologyEvaluator::mVisualizer
private

Visualizer for the ForegroundSceneContent.

Definition at line 168 of file TopologyEvaluator.h.

std::string ProbabilisticSceneRecognition::TopologyEvaluator::mXmlFilePath
private

If pXmlOutput is "file", the path where to store the files.

Definition at line 131 of file TopologyEvaluator.h.

std::string ProbabilisticSceneRecognition::TopologyEvaluator::mXmlOutput
private

Type of output of the learned model in xml format. from { "none", "screen", "file" }

Definition at line 126 of file TopologyEvaluator.h.


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


asr_psm
Author(s): Braun Kai, Gehrung Joachim, Heizmann Heinrich, Meißner Pascal
autogenerated on Fri Nov 15 2019 04:00:09