26 DllExport
CTrainLink(byte nStatesBase, byte nStatesOccl, word nFeatures)
28 ,
ITrain(nStatesBase * nStatesOccl, nFeatures)
42 DllExport
void addFeatureVec(
const Mat &featureVectors,
const Mat >b,
const Mat >o);
50 DllExport
void addFeatureVec(
const vec_mat_t &featureVectors,
const Mat >b,
const Mat >o);
59 DllExport
virtual void addFeatureVec(
const Mat &featureVector, byte gtb, byte gto) = 0;
60 DllExport
virtual void train(
bool doClean =
false) {}
69 DllExport Mat
getLinkPotentials(
const Mat &featureVector,
float weight = 1.0f)
const;
void addFeatureVec(const Mat &featureVectors, const Mat >b, const Mat >o)
Adds a block of new feature vectors.
byte m_nStatesBase
Number of states (classes) at the base layer of ML-CRF.
Base abstract class for random model training.
Base abstract class for link (inter-layer edge) potentials training.
CTrainLink(byte nStatesBase, byte nStatesOccl, word nFeatures)
Constructor.
Mat getLinkPotentials(const Mat &featureVector, float weight=1.0f) const
Returns the link potential, based on the feature vector.
virtual Mat calculateLinkPotentials(const Mat &featureVector) const =0
Calculates the link potential, based on the feature vector.
virtual void train(bool doClean=false)
Random model training.
byte m_nStatesOccl
Number of states (classes) at the occlusion layerts of ML-CRF.
Interface class for random model training.
virtual ~CTrainLink(void)=default