Manage a paired set of eye position data and input feature vectors. More...
#include <TIGS/TrainingSet.H>
Classes | |
struct | PosGroup |
Public Member Functions | |
TrainingSet (OptionManager &mgr, const std::string &fx_type) | |
Dims | scaledInputDims () const |
size_t | numPositions () const |
int | p2p (const int i, const int j) const |
int | p2p (const Point2D< int > &p) const |
Image< float > | recordSample (const Point2D< int > &loc, const Image< float > &features) |
void | load (const std::string &pfx) |
Load feature and position vectors from a pair of .pfm files (such as those produced by save()). | |
void | loadRebalanced (const std::string &pfx) |
Like load(), but rebalance the training set so that eye positions are included equally often. | |
void | save (const std::string &pfx) |
Image< float > | getFeatures () const |
Image< float > | getPositions () const |
uint | inputReduction () const |
const std::string & | fxType () const |
Manage a paired set of eye position data and input feature vectors.
Definition at line 48 of file TrainingSet.H.
void TrainingSet::load | ( | const std::string & | pfx | ) |
Load feature and position vectors from a pair of .pfm files (such as those produced by save()).
<pfx>-features.pfm should contain the features associated with a series of frames, with nrows=NFRAMES and ncols=NFEATURES where NFEATURES is the number of features in the feature vector generated by whichever feature extractor produced this training set
<pfx>-positions.pfm should contain the eye position vectors associated with the same series of frames, with nrows=NFRAMES and ncols=W*H where W*H is the number of pixels in each image of the frame sequence
Definition at line 212 of file TrainingSet.C.
References ASSERT, Image< T >::begin(), blurAndDecY(), Image< T >::end(), Image< T >::getHeight(), OModelParam< T >::getVal(), Image< T >::getWidth(), invt_allocation_release_free_mem(), loadRebalanced(), RASFMT_PFM, and Raster::ReadFloat().
void TrainingSet::loadRebalanced | ( | const std::string & | pfx | ) |
Like load(), but rebalance the training set so that eye positions are included equally often.
Definition at line 271 of file TrainingSet.C.
References ASSERT, Image< T >::begin(), Image< T >::end(), Image< T >::getArrayPtr(), Image< T >::getHeight(), Image< T >::getVal(), OModelParam< T >::getVal(), Image< T >::getWidth(), invt_allocation_release_free_mem(), RASFMT_PFM, Raster::ReadFloat(), and ZEROS.
Referenced by load().