amplement weidhting according to L. Bourdev and J. Brandt paper "Robust Object Detection Via Soft Cascade"
This commit is contained in:
@@ -1116,6 +1116,12 @@ bool CvBoost::train( CvMLData* _data,
|
||||
return result;
|
||||
}
|
||||
|
||||
void CvBoost::initial_weights(double (&p)[2])
|
||||
{
|
||||
p[0] = 1.;
|
||||
p[1] = 1.;
|
||||
}
|
||||
|
||||
void
|
||||
CvBoost::update_weights( CvBoostTree* tree )
|
||||
{
|
||||
@@ -1159,8 +1165,9 @@ CvBoost::update_weights( CvBoostTree* tree )
|
||||
// in case of logitboost and gentle adaboost each weak tree is a regression tree,
|
||||
// so we need to convert class labels to floating-point values
|
||||
|
||||
double w0 = 1./n;
|
||||
double p[2] = { 1, 1 };
|
||||
double w0 = 1./ n;
|
||||
double p[2] = { 1., 1. };
|
||||
initial_weights(p);
|
||||
|
||||
cvReleaseMat( &orig_response );
|
||||
cvReleaseMat( &sum_response );
|
||||
|
Reference in New Issue
Block a user