curfil  ..
 All Classes Functions Variables Typedefs Friends Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
curfil::TrainingConfiguration Class Reference

Parameters used for training, most of which are provided by the user. More...

#include <random_tree.h>

Public Member Functions

 TrainingConfiguration (const TrainingConfiguration &other)
 using another object to set the training cofiguration attributes
 TrainingConfiguration (int randomSeed, unsigned int samplesPerImage, unsigned int featureCount, unsigned int minSampleCount, int maxDepth, uint16_t boxRadius, uint16_t regionSize, uint16_t thresholds, int numThreads, int maxImages, int imageCacheSize, unsigned int maxSamplesPerBatch, AccelerationMode accelerationMode, bool useCIELab=true, bool useDepthFilling=false, const std::vector< int > deviceIds=std::vector< int >(1, 0), const std::string subsamplingType="classUniform", const std::vector< std::string > &ignoredColors=std::vector< std::string >(), bool useDepthImages=true, bool horizontalFlipping=false)
 creating a configuration objects with the settings that the user provided
void setRandomSeed (int randomSeed)
 sets the seed used for RandomSource during training
int getRandomSeed () const
unsigned int getSamplesPerImage () const
unsigned int getFeatureCount () const
unsigned int getMinSampleCount () const
int getMaxDepth () const
uint16_t getBoxRadius () const
uint16_t getRegionSize () const
uint16_t getThresholds () const
int getNumThreads () const
int getMaxImages () const
int getImageCacheSize () const
unsigned int getMaxSamplesPerBatch () const
AccelerationMode getAccelerationMode () const
void setAccelerationMode (const AccelerationMode &accelerationMode)
 set the acceleration mode: gpu or cpu
std::string getAccelerationModeString () const
const std::vector< int > & getDeviceIds () const
void setDeviceIds (const std::vector< int > &deviceIds)
 set the deviceId used for training
std::string getSubsamplingType () const
bool isUseCIELab () const
bool isUseDepthFilling () const
bool isUseDepthImages () const
bool doHorizontalFlipping () const
const std::vector< std::string > & getIgnoredColors () const
TrainingConfigurationoperator= (const TrainingConfiguration &other)
 set its attributes to be equal to another configuration
bool equals (const TrainingConfiguration &other, bool strict=false) const
bool operator== (const TrainingConfiguration &other) const
bool operator!= (const TrainingConfiguration &other) const

Static Public Member Functions

static AccelerationMode parseAccelerationModeString (const std::string &modeString)

Detailed Description

Parameters used for training, most of which are provided by the user.

Definition at line 159 of file random_tree.h.

Member Function Documentation

bool curfil::TrainingConfiguration::doHorizontalFlipping ( ) const
inline
Returns
whether features should be also horizontally flipped

Definition at line 407 of file random_tree.h.

bool curfil::TrainingConfiguration::equals ( const TrainingConfiguration other,
bool  strict = false 
) const
Returns
whether it's equal to another configuration
AccelerationMode curfil::TrainingConfiguration::getAccelerationMode ( ) const
inline
Returns
acceleration mode: gpu, cpu or compare

Definition at line 341 of file random_tree.h.

std::string curfil::TrainingConfiguration::getAccelerationModeString ( ) const
Returns
acceleration mode as string
uint16_t curfil::TrainingConfiguration::getBoxRadius ( ) const
inline
Returns
the interval from which to sample the offsets of the rectangular regions

Definition at line 292 of file random_tree.h.

const std::vector<int>& curfil::TrainingConfiguration::getDeviceIds ( ) const
inline
Returns
GPU deviceId used for training

Definition at line 365 of file random_tree.h.

unsigned int curfil::TrainingConfiguration::getFeatureCount ( ) const
inline
Returns
number of random feature candidates to sample

Definition at line 271 of file random_tree.h.

const std::vector<std::string>& curfil::TrainingConfiguration::getIgnoredColors ( ) const
inline
Returns
which colors should be ignored when sampling

Definition at line 414 of file random_tree.h.

int curfil::TrainingConfiguration::getImageCacheSize ( ) const
inline
Returns
image cache size on the GPU in Megabytes

Definition at line 327 of file random_tree.h.

int curfil::TrainingConfiguration::getMaxDepth ( ) const
inline
Returns
maximum depth of the tree, training is stopped after that

Definition at line 285 of file random_tree.h.

int curfil::TrainingConfiguration::getMaxImages ( ) const
inline
Returns
number of images to load when training each tree

Definition at line 320 of file random_tree.h.

unsigned int curfil::TrainingConfiguration::getMaxSamplesPerBatch ( ) const
inline
Returns
max number of samples in a batch - depends on the memory and sample size

Definition at line 334 of file random_tree.h.

unsigned int curfil::TrainingConfiguration::getMinSampleCount ( ) const
inline
Returns
minimum number of samples that a node should have to continue splitting

Definition at line 278 of file random_tree.h.

int curfil::TrainingConfiguration::getNumThreads ( ) const
inline
Returns
number of threads used in training

Definition at line 313 of file random_tree.h.

int curfil::TrainingConfiguration::getRandomSeed ( ) const
inline
Returns
the random seed used

Definition at line 257 of file random_tree.h.

uint16_t curfil::TrainingConfiguration::getRegionSize ( ) const
inline
Returns
the interval from which to sample the width and height of the rectangular regions

Definition at line 299 of file random_tree.h.

unsigned int curfil::TrainingConfiguration::getSamplesPerImage ( ) const
inline
Returns
number of pixels to sample per image

Definition at line 264 of file random_tree.h.

std::string curfil::TrainingConfiguration::getSubsamplingType ( ) const
inline
Returns
type of sampling, pixelUniform or classUniform

Definition at line 379 of file random_tree.h.

uint16_t curfil::TrainingConfiguration::getThresholds ( ) const
inline
Returns
number of threshold candidates selected for the evaluation split

Definition at line 306 of file random_tree.h.

bool curfil::TrainingConfiguration::isUseCIELab ( ) const
inline
Returns
whether to convert images to CIELab color space before training

Definition at line 386 of file random_tree.h.

bool curfil::TrainingConfiguration::isUseDepthFilling ( ) const
inline
Returns
whether to do simple depth filling

Definition at line 393 of file random_tree.h.

bool curfil::TrainingConfiguration::isUseDepthImages ( ) const
inline
Returns
whether there are depth images

Definition at line 400 of file random_tree.h.

bool curfil::TrainingConfiguration::operator!= ( const TrainingConfiguration other) const
inline
Returns
whether it's not equal to another configuration

Definition at line 438 of file random_tree.h.

bool curfil::TrainingConfiguration::operator== ( const TrainingConfiguration other) const
inline
Returns
whether it's equal to another configuration, all attributes should match

Definition at line 431 of file random_tree.h.

static AccelerationMode curfil::TrainingConfiguration::parseAccelerationModeString ( const std::string &  modeString)
static
Returns
the acceleration mode from the string representation

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