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

◆ calculateStandardDeviation()

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

Definition at line 163 of file performanceTester.cpp.

◆ createHistogram()

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

Definition at line 176 of file performanceTester.cpp.

◆ evaluate()

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.

◆ initRandomScenes()

void initRandomScenes ( )

Definition at line 240 of file performanceTester.cpp.

◆ initTestSets()

void initTestSets ( )

Definition at line 255 of file performanceTester.cpp.

◆ loadTestSetsFromDB()

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

Definition at line 306 of file performanceTester.cpp.

◆ main()

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.

◆ runOptimization()

void runOptimization ( std::ostringstream &  os)

Definition at line 210 of file performanceTester.cpp.

◆ setDefaultParameters()

void setDefaultParameters ( )

Definition at line 61 of file performanceTester.cpp.

◆ testPerformance()

void testPerformance ( )

Definition at line 415 of file performanceTester.cpp.

◆ trainScenes()

void trainScenes ( unsigned int  run)

Definition at line 272 of file performanceTester.cpp.

◆ writeFile()

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

Definition at line 143 of file performanceTester.cpp.

Variable Documentation

◆ demoRecordings

std::vector<std::string> demoRecordings

Definition at line 46 of file performanceTester.cpp.

◆ demoRecordingsNames

std::vector<std::string> demoRecordingsNames

Definition at line 47 of file performanceTester.cpp.

◆ frameId

std::string frameId

Definition at line 59 of file performanceTester.cpp.

◆ inferenceAlgorithm

std::string inferenceAlgorithm = "maximum"

Definition at line 51 of file performanceTester.cpp.

◆ invalidTestSetPref

std::string invalidTestSetPref = "invalidValidationSets_"

Definition at line 40 of file performanceTester.cpp.

◆ objectCounts

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

Definition at line 28 of file performanceTester.cpp.

◆ optimizationAlgorithm

std::string optimizationAlgorithm = "RecordHunt"

Definition at line 53 of file performanceTester.cpp.

◆ outputPath

std::string outputPath

Definition at line 41 of file performanceTester.cpp.

◆ recognitionThreshold

double recognitionThreshold = 1.0e-04

Definition at line 49 of file performanceTester.cpp.

◆ scale

double scale

Definition at line 58 of file performanceTester.cpp.

◆ sigma

double sigma

Definition at line 58 of file performanceTester.cpp.

◆ test

bool test = !train

Definition at line 56 of file performanceTester.cpp.

◆ testSetFolder

std::string testSetFolder = "ValidationSets"

Definition at line 36 of file performanceTester.cpp.

◆ testSetFolderNoRefs

std::string testSetFolderNoRefs = "TestSetsNoRefs"

Definition at line 37 of file performanceTester.cpp.

◆ testSets

std::vector<std::string> testSets

Definition at line 43 of file performanceTester.cpp.

◆ testSetsNoRefs

std::vector<std::string> testSetsNoRefs

Definition at line 44 of file performanceTester.cpp.

◆ timestepCounts

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

Definition at line 32 of file performanceTester.cpp.

◆ train

bool train = false

Definition at line 55 of file performanceTester.cpp.

◆ treeAlgorithm

std::string treeAlgorithm = "fullymeshed"

Definition at line 52 of file performanceTester.cpp.

◆ validTestSetPref

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 Mon Feb 28 2022 21:52:14