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

#include <CombinatorialOptimizer.h>

Public Member Functions

 CombinatorialOptimizer (std::vector< boost::shared_ptr< SceneObjectLearner >> pLearners, std::vector< std::string > pObjectTypes, std::vector< boost::shared_ptr< ISM::ObjectSet >> pExamplesList)
 
boost::shared_ptr< SceneModel::Topology > runOptimization ()
 
 ~CombinatorialOptimizer ()
 

Private Member Functions

void initCostFunction (const std::string &pType)
 
void initFullyMeshedTopologyAndFilterLoadedTestSets ()
 
void initNeighbourhoodFunction (const std::string &pType)
 
void initOptimizationAlgorithm (const std::string &pType)
 
void initStartingTopologies (unsigned int pNumberOfStartingTopologies, const std::string &pStartingTopologiesType)
 
void initStarTopologies ()
 
void initTestSets (const std::vector< std::string > &pObjectTypes, const std::vector< boost::shared_ptr< ISM::ObjectSet >> &pExamplesList)
 
void optimize (boost::shared_ptr< SceneModel::Topology > pStartingTopology, unsigned int pStartingTopologyNumber)
 

Private Attributes

boost::shared_ptr< SceneModel::Topology > mBestOptimizedTopology
 
boost::shared_ptr< ISM::CostFunction< boost::shared_ptr< SceneModel::Topology > > > mCostFunction
 
boost::shared_ptr< AbstractTopologyEvaluatormEvaluator
 
boost::shared_ptr< SceneModel::Topology > mFullyMeshedTopology
 
int mLoadedTestSetCount
 
double mMaxAverageRecognitionRuntime
 
unsigned int mMaxFalseNegatives
 
unsigned int mMaxFalsePositives
 
bool mMaxFNInitialized
 
bool mMaxFPInitialized
 
bool mMaxTimeInitialized
 
double mMinAverageRecognitionRuntime
 
unsigned int mMinFalseNegatives
 
unsigned int mMinFalsePositives
 
bool mMinFNInitialized
 
bool mMinFPInitialized
 
bool mMinTimeInitialized
 
boost::shared_ptr< ISM::NeighbourhoodFunction< boost::shared_ptr< SceneModel::Topology > > > mNeighbourhoodFunction
 
ros::NodeHandle mNodeHandle
 
boost::shared_ptr< ISM::OptimizationAlgorithm< boost::shared_ptr< SceneModel::Topology > > > mOptimizationAlgorithm
 
PrintHelper mPrintHelper
 
double mRandomRestartProbability
 
double mRecognitionThreshold
 
std::vector< boost::shared_ptr< SceneModel::Topology > > mStartingTopologies
 
std::vector< boost::shared_ptr< SceneModel::Topology > > mStarTopologies
 
int mTestSetCount
 
boost::shared_ptr< TopologyManagermTopologyManager
 
bool mUseFlexibleRecognitionThreshold
 
boost::shared_ptr< SceneModel::Topology > mWorstStarIfRequested
 

Detailed Description

Uses combinatorial optimization to train a relation graph that is optimal considering false negatives and average recognition runtime on random test sets.

Definition at line 48 of file CombinatorialOptimizer.h.

Constructor & Destructor Documentation

ProbabilisticSceneRecognition::CombinatorialOptimizer::CombinatorialOptimizer ( std::vector< boost::shared_ptr< SceneObjectLearner >>  pLearners,
std::vector< std::string >  pObjectTypes,
std::vector< boost::shared_ptr< ISM::ObjectSet >>  pExamplesList 
)

Constructor.

Parameters
pLearnersThe learners to be used to learn OCM models for the relation graphs considered.
pObjectTypesAll possible object types appearing in the relation graphs (once each)
pExamplesListThe list of evidences to train on.

Definition at line 23 of file CombinatorialOptimizer.cpp.

ProbabilisticSceneRecognition::CombinatorialOptimizer::~CombinatorialOptimizer ( )

Destructor.

Definition at line 160 of file CombinatorialOptimizer.cpp.

Member Function Documentation

void ProbabilisticSceneRecognition::CombinatorialOptimizer::initCostFunction ( const std::string &  pType)
private

Initialize the cost function used to judge topologies.

Parameters
pTypetype of the cost function to be used: only "WeightedSum".

Definition at line 371 of file CombinatorialOptimizer.cpp.

void ProbabilisticSceneRecognition::CombinatorialOptimizer::initFullyMeshedTopologyAndFilterLoadedTestSets ( )
private

Initialize the fully meshed topology used to divide the test sets into valid and invalid ones and find the worst recognition runtime. Also deals with loaded test sets, if those were not created by the program.

Definition at line 250 of file CombinatorialOptimizer.cpp.

void ProbabilisticSceneRecognition::CombinatorialOptimizer::initNeighbourhoodFunction ( const std::string &  pType)
private

Initialize neighbourhood function used to generate neighbours of currently selected topology during optimizations.

Parameters
pTypetype of the neighbourhood function to be used: only "TopologyManager".

Definition at line 400 of file CombinatorialOptimizer.cpp.

void ProbabilisticSceneRecognition::CombinatorialOptimizer::initOptimizationAlgorithm ( const std::string &  pType)
private

Initialize optimization algorithm to be used.

Parameters
pTypetype of the optimization algorithm to be used: from "HillClimbing", "RecordHunt", "SimulatedAnnealing".

Definition at line 410 of file CombinatorialOptimizer.cpp.

void ProbabilisticSceneRecognition::CombinatorialOptimizer::initStartingTopologies ( unsigned int  pNumberOfStartingTopologies,
const std::string &  pStartingTopologiesType 
)
private

Initialize starting topologies to perform optimization from.

Parameters
pNumberOfStartingTopologiesnumber of starting topologies to initialize.
pStartingTopologiesTypetype of algorithm to use to generate starting topologies.

Definition at line 337 of file CombinatorialOptimizer.cpp.

void ProbabilisticSceneRecognition::CombinatorialOptimizer::initStarTopologies ( )
private

Initialize the star topologies used to find the worst false positive numbers and fastest average runtimes.

Definition at line 300 of file CombinatorialOptimizer.cpp.

void ProbabilisticSceneRecognition::CombinatorialOptimizer::initTestSets ( const std::vector< std::string > &  pObjectTypes,
const std::vector< boost::shared_ptr< ISM::ObjectSet >> &  pExamplesList 
)
private

Initialize a test set generator and set evaluator test sets.

Parameters
pObjectTypesAll possible object types appearing in the relation graphs (once each)
pExamplesListThe list of evidences to train on.

Definition at line 208 of file CombinatorialOptimizer.cpp.

void ProbabilisticSceneRecognition::CombinatorialOptimizer::optimize ( boost::shared_ptr< SceneModel::Topology >  pStartingTopology,
unsigned int  pStartingTopologyNumber 
)
private

optimize from the given topology. Sets new mBestOptimizedTopology if a better one has been found.

Parameters
pStartingTopologyto optimize from.
pStartingTopologyNumberthe number of the starting topology, for output.

Definition at line 475 of file CombinatorialOptimizer.cpp.

boost::shared_ptr< SceneModel::Topology > ProbabilisticSceneRecognition::CombinatorialOptimizer::runOptimization ( )

Perform optimization.

Returns
the optimized relation graph topology.

Definition at line 163 of file CombinatorialOptimizer.cpp.

Member Data Documentation

boost::shared_ptr<SceneModel::Topology> ProbabilisticSceneRecognition::CombinatorialOptimizer::mBestOptimizedTopology
private

The best topology considered so far.

Definition at line 205 of file CombinatorialOptimizer.h.

boost::shared_ptr<ISM::CostFunction<boost::shared_ptr<SceneModel::Topology> > > ProbabilisticSceneRecognition::CombinatorialOptimizer::mCostFunction
private

The cost function used to judge topologies.

Definition at line 153 of file CombinatorialOptimizer.h.

boost::shared_ptr<AbstractTopologyEvaluator> ProbabilisticSceneRecognition::CombinatorialOptimizer::mEvaluator
private

Evaluator used to check the learned models of the topologies against the test sets.

Definition at line 148 of file CombinatorialOptimizer.h.

boost::shared_ptr<SceneModel::Topology> ProbabilisticSceneRecognition::CombinatorialOptimizer::mFullyMeshedTopology
private

fully meshed topology for all given object types.

Definition at line 138 of file CombinatorialOptimizer.h.

int ProbabilisticSceneRecognition::CombinatorialOptimizer::mLoadedTestSetCount
private

How many test sets loaded from the database to use at first. Reduced to test_set_count later, but since some loaded sets may be misclassified and removed, it can be useful to load more than test_set_count.

Definition at line 237 of file CombinatorialOptimizer.h.

double ProbabilisticSceneRecognition::CombinatorialOptimizer::mMaxAverageRecognitionRuntime
private

Maximum average recognition runtime. All topologies with average runtimes above can be replaced by the fully meshed one, which has no false positives.

Definition at line 196 of file CombinatorialOptimizer.h.

unsigned int ProbabilisticSceneRecognition::CombinatorialOptimizer::mMaxFalseNegatives
private

Maximum number of false negatives. All topologies with more can be replaced with a star topology, which will be faster.

Definition at line 191 of file CombinatorialOptimizer.h.

unsigned int ProbabilisticSceneRecognition::CombinatorialOptimizer::mMaxFalsePositives
private

Maximum number of false positives. All topologies with more can be replaced with a star topology, which will be faster.

Definition at line 186 of file CombinatorialOptimizer.h.

bool ProbabilisticSceneRecognition::CombinatorialOptimizer::mMaxFNInitialized
private

Definition at line 200 of file CombinatorialOptimizer.h.

bool ProbabilisticSceneRecognition::CombinatorialOptimizer::mMaxFPInitialized
private

Definition at line 200 of file CombinatorialOptimizer.h.

bool ProbabilisticSceneRecognition::CombinatorialOptimizer::mMaxTimeInitialized
private

Definition at line 200 of file CombinatorialOptimizer.h.

double ProbabilisticSceneRecognition::CombinatorialOptimizer::mMinAverageRecognitionRuntime
private

Minimum average recognition runtime.

Definition at line 181 of file CombinatorialOptimizer.h.

unsigned int ProbabilisticSceneRecognition::CombinatorialOptimizer::mMinFalseNegatives
private

Minimum number of false negatives. Set to 0.

Definition at line 177 of file CombinatorialOptimizer.h.

unsigned int ProbabilisticSceneRecognition::CombinatorialOptimizer::mMinFalsePositives
private

Minimum number of false positives. Set to 0.

Definition at line 173 of file CombinatorialOptimizer.h.

bool ProbabilisticSceneRecognition::CombinatorialOptimizer::mMinFNInitialized
private

Definition at line 200 of file CombinatorialOptimizer.h.

bool ProbabilisticSceneRecognition::CombinatorialOptimizer::mMinFPInitialized
private

Whether the maxima and minima have been properly initialized yet.

Definition at line 200 of file CombinatorialOptimizer.h.

bool ProbabilisticSceneRecognition::CombinatorialOptimizer::mMinTimeInitialized
private

Definition at line 200 of file CombinatorialOptimizer.h.

boost::shared_ptr<ISM::NeighbourhoodFunction<boost::shared_ptr<SceneModel::Topology> > > ProbabilisticSceneRecognition::CombinatorialOptimizer::mNeighbourhoodFunction
private

Neighbourhood function used to generate neighbours of currently selected topology during optimizations.

Definition at line 163 of file CombinatorialOptimizer.h.

ros::NodeHandle ProbabilisticSceneRecognition::CombinatorialOptimizer::mNodeHandle
private

Handle to ros node for parameter access.

Definition at line 128 of file CombinatorialOptimizer.h.

boost::shared_ptr<ISM::OptimizationAlgorithm<boost::shared_ptr<SceneModel::Topology> > > ProbabilisticSceneRecognition::CombinatorialOptimizer::mOptimizationAlgorithm
private

Optimization algorithm to be used.

Definition at line 168 of file CombinatorialOptimizer.h.

PrintHelper ProbabilisticSceneRecognition::CombinatorialOptimizer::mPrintHelper
private

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

Definition at line 226 of file CombinatorialOptimizer.h.

double ProbabilisticSceneRecognition::CombinatorialOptimizer::mRandomRestartProbability
private

Probability that, in HillClimbing, a random restart is performed. Set to 0 for all other algorithms.

Definition at line 216 of file CombinatorialOptimizer.h.

double ProbabilisticSceneRecognition::CombinatorialOptimizer::mRecognitionThreshold
private

The probability above which a test set is considered as valid.

Definition at line 242 of file CombinatorialOptimizer.h.

std::vector<boost::shared_ptr<SceneModel::Topology> > ProbabilisticSceneRecognition::CombinatorialOptimizer::mStartingTopologies
private

Starting topologies to perform optimization from.

Definition at line 143 of file CombinatorialOptimizer.h.

std::vector<boost::shared_ptr<SceneModel::Topology> > ProbabilisticSceneRecognition::CombinatorialOptimizer::mStarTopologies
private

list of all star topologies for the given object types.

Definition at line 133 of file CombinatorialOptimizer.h.

int ProbabilisticSceneRecognition::CombinatorialOptimizer::mTestSetCount
private

How many test sets to use in optimization.

Definition at line 231 of file CombinatorialOptimizer.h.

boost::shared_ptr<TopologyManager> ProbabilisticSceneRecognition::CombinatorialOptimizer::mTopologyManager
private

Topology Manager used to get fully meshed, star and starting topologies. If parameter "neighbourhood_function" from yaml is set to "TopologyManager", also used as neighbourhood function for optimization.

Definition at line 159 of file CombinatorialOptimizer.h.

bool ProbabilisticSceneRecognition::CombinatorialOptimizer::mUseFlexibleRecognitionThreshold
private

When test sets are loaded from a file, set this to true to select the recognition threshold based on the test sets.

Definition at line 221 of file CombinatorialOptimizer.h.

boost::shared_ptr<SceneModel::Topology> ProbabilisticSceneRecognition::CombinatorialOptimizer::mWorstStarIfRequested
private

The worst star topology. This pointer only gets set when it was requested via parameter get_worst_star_topology that only star topologies are compared (for testing purposes).

Definition at line 211 of file CombinatorialOptimizer.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