Classes | Functions | Variables
performanceTester.cpp File Reference
#include <ros/package.h>
#include <boost/filesystem/path.hpp>
#include <boost/date_time/posix_time/posix_time.hpp>
#include <ISM/utility/TableHelper.hpp>
#include "learner/SceneLearningEngine.h"
#include "inference/model/SceneModelDescription.h"
#include <sys/time.h>
#include <string>
#include <chrono>
#include <vector>
#include <random>
#include <algorithm>
Include dependency graph for performanceTester.cpp:

Go to the source code of this file.

Classes

struct  PerformanceEvaluationResult
 

Functions

double calculateStandardDeviation (const std::vector< double > &values, const double &average)
 
void createHistogram (const std::vector< double > &values, const unsigned int intervals, const std::string &fileName)
 
PerformanceEvaluationResult evaluate (const std::vector< ObjectSetPtr > &ts, bool valid, const std::string &patternName, const std::string &trainedScenePath)
 
void initRandomScenes ()
 
void initTestSets ()
 
std::vector< ObjectSetPtr > loadTestSetsFromDB (std::string fileName, std::string patternName)
 
int main (int argc, char *argv[])
 
void runOptimization (std::ostringstream &os)
 
void setDefaultParameters ()
 
void testPerformance ()
 
void trainScenes (unsigned int run)
 
void writeFile (const std::string &directoryPath, const std::string &filenName, std::ostringstream &content)
 

Variables

std::vector< std::string > demoRecordings
 
std::vector< std::string > demoRecordingsNames
 
std::string frameId
 
std::string inferenceAlgorithm = "maximum"
 
std::string invalidTestSetPref = "invalidValidationSets_"
 
std::vector< unsigned > objectCounts
 
std::string optimizationAlgorithm = "RecordHunt"
 
std::string outputPath
 
double recognitionThreshold = 1.0e-04
 
double scale
 
double sigma
 
bool test = !train
 
std::string testSetFolder = "ValidationSets"
 
std::string testSetFolderNoRefs = "TestSetsNoRefs"
 
std::vector< std::string > testSets
 
std::vector< std::string > testSetsNoRefs
 
std::vector< unsigned > timestepCounts
 
bool train = false
 
std::string treeAlgorithm = "fullymeshed"
 
std::string validTestSetPref = "validValidationSets_"
 

Function Documentation

double calculateStandardDeviation ( const std::vector< double > &  values,
const double &  average 
)

Definition at line 163 of file performanceTester.cpp.

void createHistogram ( const std::vector< double > &  values,
const unsigned int  intervals,
const std::string &  fileName 
)

Definition at line 176 of file performanceTester.cpp.

PerformanceEvaluationResult evaluate ( const std::vector< ObjectSetPtr > &  ts,
bool  valid,
const std::string &  patternName,
const std::string &  trainedScenePath 
)

Definition at line 341 of file performanceTester.cpp.

void initRandomScenes ( )

Definition at line 240 of file performanceTester.cpp.

void initTestSets ( )

Definition at line 255 of file performanceTester.cpp.

std::vector<ObjectSetPtr> loadTestSetsFromDB ( std::string  fileName,
std::string  patternName 
)

Definition at line 306 of file performanceTester.cpp.

int main ( int  argc,
char *  argv[] 
)

This program serves to test training and recognition performance of asr_psm. Note that it does not generate test sets (for learning) and validation sets (for recognition) on its own. Generate them using the standard combinatorial optimization launch file with quit_after_test_set_generation set to true and the same parameters as below. Write the databases to asr_psm/data/test/performanceTestRessources/[ValidationSets/]demoRecording_X_Y00.sqlite with X from objectCounts, Y from timestepCounts below. Also note that training will, unless stopped earlier, perform 1000 runs while cycling through the different algorithms, so the comparably long tests can be run mostly automated. Errors are tolerated and marked in the results, again to allow it to run without needing constant supervision. The recognition tests have to be run one each, but they are also usually much quicker.

Definition at line 518 of file performanceTester.cpp.

void runOptimization ( std::ostringstream &  os)

Definition at line 210 of file performanceTester.cpp.

void setDefaultParameters ( )

Definition at line 61 of file performanceTester.cpp.

void testPerformance ( )

Definition at line 415 of file performanceTester.cpp.

void trainScenes ( unsigned int  run)

Definition at line 272 of file performanceTester.cpp.

void writeFile ( const std::string &  directoryPath,
const std::string &  filenName,
std::ostringstream &  content 
)

Definition at line 143 of file performanceTester.cpp.

Variable Documentation

std::vector<std::string> demoRecordings

Definition at line 46 of file performanceTester.cpp.

std::vector<std::string> demoRecordingsNames

Definition at line 47 of file performanceTester.cpp.

std::string frameId

Definition at line 59 of file performanceTester.cpp.

std::string inferenceAlgorithm = "maximum"

Definition at line 51 of file performanceTester.cpp.

std::string invalidTestSetPref = "invalidValidationSets_"

Definition at line 40 of file performanceTester.cpp.

std::vector<unsigned> objectCounts
Initial value:
= {
3, 4, 5
}

Definition at line 28 of file performanceTester.cpp.

std::string optimizationAlgorithm = "RecordHunt"

Definition at line 53 of file performanceTester.cpp.

std::string outputPath

Definition at line 41 of file performanceTester.cpp.

double recognitionThreshold = 1.0e-04

Definition at line 49 of file performanceTester.cpp.

double scale

Definition at line 58 of file performanceTester.cpp.

double sigma

Definition at line 58 of file performanceTester.cpp.

bool test = !train

Definition at line 56 of file performanceTester.cpp.

std::string testSetFolder = "ValidationSets"

Definition at line 36 of file performanceTester.cpp.

std::string testSetFolderNoRefs = "TestSetsNoRefs"

Definition at line 37 of file performanceTester.cpp.

std::vector<std::string> testSets

Definition at line 43 of file performanceTester.cpp.

std::vector<std::string> testSetsNoRefs

Definition at line 44 of file performanceTester.cpp.

std::vector<unsigned> timestepCounts
Initial value:
= {
100, 200, 300, 400
}

Definition at line 32 of file performanceTester.cpp.

bool train = false

Definition at line 55 of file performanceTester.cpp.

std::string treeAlgorithm = "fullymeshed"

Definition at line 52 of file performanceTester.cpp.

std::string validTestSetPref = "validValidationSets_"

Definition at line 39 of file performanceTester.cpp.



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