Permalink
Browse files

modified tld ferns generation a bit for higher accuracy

  • Loading branch information...
1 parent bbbb07b commit 42f22c8b4a92477895864daf9e984af15a9e126c @liuliu committed Nov 10, 2012
Showing with 32 additions and 13 deletions.
  1. +1 −1 doc/bbf.md
  2. +1 −1 doc/dpm.md
  3. +5 −5 doc/tld.md
  4. +10 −6 lib/ccv_ferns.c
  5. +15 −0 lib/ccv_tld.c
View
@@ -66,7 +66,7 @@ You see the difference.
Accuracy-wise:
-I wrote a little script called validator.rb that can check the output of bbfdetect
+I wrote a little script called bbfvldr.rb that can check the output of bbfdetect
against ground truth, before run the script, you need to do some house-cleaning
work on the result.txt:
View
@@ -124,4 +124,4 @@ I've trained one more mixture model: samples/car.m
It has been trained with VOC2011 trainval dataset, and the result on validation dataset:
-46.19% (16)
+ 46.19% (16)
View
@@ -33,12 +33,12 @@ some meaningful data to analyze on.
On motocross.mpg:
- detections : 774
+ detections : 901
true detections : 1412
- correct detections : 710
- precision : 0.917313
- recall : 0.502833
- f-measure : 0.649588
+ correct detections : 833
+ precision : 0.924528
+ recall : 0.589943
+ f-measure : 0.720277
The result on the same video reported in: Zdenek Kalal, Jiri Matas and Krystian Mikolajczyk, Online Learning of Robust Object Detectors during Unstable Tracking:
View
@@ -30,13 +30,17 @@ ccv_ferns_t* ccv_ferns_new(int structs, int features, int scales, ccv_size_t* si
// to restrict the space of ferns feature
if (dsfmt_genrand_uint32(&dsfmt) & 0x01)
{
- x1f = dsfmt_genrand_close_open(&dsfmt);
- x2f = dsfmt_genrand_close_open(&dsfmt);
- y1f = y2f = dsfmt_genrand_close_open(&dsfmt);
+ do {
+ x1f = dsfmt_genrand_close_open(&dsfmt);
+ x2f = dsfmt_genrand_close_open(&dsfmt);
+ y1f = y2f = dsfmt_genrand_close_open(&dsfmt);
+ } while (fabs(x1f - x2f) >= 0.2);
} else {
- x1f = x2f = dsfmt_genrand_close_open(&dsfmt);
- y1f = dsfmt_genrand_close_open(&dsfmt);
- y2f = dsfmt_genrand_close_open(&dsfmt);
+ do {
+ x1f = x2f = dsfmt_genrand_close_open(&dsfmt);
+ y1f = dsfmt_genrand_close_open(&dsfmt);
+ y2f = dsfmt_genrand_close_open(&dsfmt);
+ } while (fabs(y1f - y2f) >= 0.2);
}
for (j = 0; j < scales; j++)
{
View
@@ -541,6 +541,21 @@ static void _ccv_tld_check_params(ccv_tld_param_t params)
assert(params.bad_patches > 0);
assert(params.interval >= 0);
assert(params.shift > 0 && params.shift < 1);
+ assert(params.validate_set > 0 && params.validate_set < 1);
+ assert(params.nnc_same > 0.5 && params.nnc_same < 1);
+ assert(params.nnc_thres > 0.5 && params.nnc_thres < 1);
+ assert(params.nnc_verify > 0.5 && params.nnc_verify < 1);
+ assert(params.nnc_beyond > 0.5 && params.nnc_beyond < 1);
+ assert(params.nnc_collect >= 0.5 && params.nnc_collect < 1);
+ assert(params.new_deform > 0);
+ assert(params.track_deform > 0);
+ assert(params.new_deform_angle > 0);
+ assert(params.track_deform_angle > 0);
+ assert(params.new_deform_scale > 0);
+ assert(params.track_deform_scale > 0);
+ assert(params.new_deform_shift > 0);
+ assert(params.track_deform_shift > 0);
+ assert(params.rotation >= 0);
}
static float _ccv_tld_ferns_compute_threshold(ccv_ferns_t* ferns, float ferns_thres, ccv_dense_matrix_t* ga, ccv_dense_matrix_t* sat, ccv_dense_matrix_t* sqsat, double var_thres, ccv_array_t* bad, int starter)

0 comments on commit 42f22c8

Please sign in to comment.