Commit a0896c7b authored by Vladislav Sovrasov's avatar Vladislav Sovrasov

tracking: update tresholds in regression tests of the TLD

parent 895a9143
......@@ -408,7 +408,7 @@ namespace cv
////To fix: Check the paper, probably this cause wrong learning
//
labPatch.isObject = srValue > tld::THETA_NN;
labPatch.shouldBeIntegrated = abs(srValue - tld::THETA_NN) < 0.1;
labPatch.shouldBeIntegrated = abs(srValue - tld::THETA_NN) < tld::CLASSIFIER_MARGIN;
patches[k].push_back(labPatch);
//
......
......@@ -420,7 +420,7 @@ namespace cv
////To fix: Check the paper, probably this cause wrong learning
//
labPatch.isObject = srValue > THETA_NN;
labPatch.shouldBeIntegrated = abs(srValue - THETA_NN) < 0.1;
labPatch.shouldBeIntegrated = abs(srValue - THETA_NN) < CLASSIFIER_MARGIN;
patches.push_back(labPatch);
//
......@@ -539,7 +539,7 @@ namespace cv
////To fix: Check the paper, probably this cause wrong learning
//
labPatch.isObject = srValue > THETA_NN;
labPatch.shouldBeIntegrated = abs(srValue - THETA_NN) < 0.1;
labPatch.shouldBeIntegrated = abs(srValue - THETA_NN) < CLASSIFIER_MARGIN;
patches.push_back(labPatch);
//
......
......@@ -57,8 +57,9 @@ namespace cv
const int MEASURES_PER_CLASSIFIER = 13;
const int GRIDSIZE = 15;
const int DOWNSCALE_MODE = cv::INTER_LINEAR;
const double THETA_NN = 0.50;
const double THETA_NN = 0.5;
const double CORE_THRESHOLD = 0.5;
const double CLASSIFIER_MARGIN = 0.1;
const double SCALE_STEP = 1.2;
const double ENSEMBLE_THRESHOLD = 0.5;
const double VARIANCE_THRESHOLD = 0.5;
......
......@@ -262,9 +262,9 @@ int TrackerTLDImpl::Pexpert::additionalExamples(std::vector<Mat_<uchar> >& examp
TLDDetector::generateScanGrid(img_.rows, img_.cols, initSize_, scanGrid);
getClosestN(scanGrid, Rect2d(resultBox_.x / scale, resultBox_.y / scale, resultBox_.width / scale, resultBox_.height / scale), 10, closest);
for( int i = 0; i < (int)closest.size(); i++ )
for( size_t i = 0; i < closest.size(); i++ )
{
for( int j = 0; j < 10; j++ )
for( size_t j = 0; j < 10; j++ )
{
Point2f center;
Size2f size;
......
......@@ -151,16 +151,11 @@ void getClosestN(std::vector<Rect2d>& scanGrid, Rect2d bBox, int n, std::vector<
double variance(const Mat& img)
{
double p = 0, p2 = 0;
for( int i = 0; i < img.rows; i++ )
{
for( int j = 0; j < img.cols; j++ )
{
p += img.at<uchar>(i, j);
p2 += img.at<uchar>(i, j) * img.at<uchar>(i, j);
}
}
p = sum(img)(0);
p2 = norm(img, NORM_L2SQR);
p /= (img.cols * img.rows);
p2 /= (img.cols * img.rows);
return p2 - p * p;
}
......
......@@ -461,7 +461,7 @@ TEST_P(DistanceAndOverlap, KCF)
TEST_P(DistanceAndOverlap, TLD)
{
TrackerTest test( TrackerTLD::create(), dataset, 60, .4f, NoTransform);
TrackerTest test( TrackerTLD::create(), dataset, 40, .45f, NoTransform);
test.run();
}
/***************************************************************************************/
......@@ -492,7 +492,7 @@ TEST_P(DistanceAndOverlap, Shifted_Data_KCF)
TEST_P(DistanceAndOverlap, Shifted_Data_TLD)
{
TrackerTest test( TrackerTLD::create(), dataset, 120, .2f, CenterShiftLeft);
TrackerTest test( TrackerTLD::create(), dataset, 30, .35f, CenterShiftLeft);
test.run();
}
/***************************************************************************************/
......@@ -523,7 +523,7 @@ TEST_P(DistanceAndOverlap, Scaled_Data_KCF)
TEST_P(DistanceAndOverlap, Scaled_Data_TLD)
{
TrackerTest test( TrackerTLD::create(), dataset, 120, .45f, Scale_1_1);
TrackerTest test( TrackerTLD::create(), dataset, 30, .45f, Scale_1_1);
test.run();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment