alantrrs / OpenTLD

:eyes: C++ implementation of TLD
GNU General Public License v3.0
225 stars 99 forks source link

slow running time #4

Open jiang0131 opened 13 years ago

jiang0131 commented 13 years ago

It runs very slow on my laptop. I use a 640x480 webcam.

"" 640x480 webcam Ubuntu 10.10 OpenCV 2.3 2.4 GHz Dual Core 4G RAM ""

I use the default parameter in the YAML file. Here is the output from the console:

"""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""""" Created 614610 bounding boxes Found 10 good boxes, 613623 bad boxes Best Box: 417 225 80 82 Bounding box hull: 409 211 98 108 var: 1080.19 Positive fern examples generated: 200 negative data generation started. Negative examples generated: 7357 Fern detector made 19 detections in 7749.08ms Found 5 NN matches Tracking... Cluster indexes: 0 Found 5 clusters No confident cluster was found Low variance..not training """"""""""""""""""""""""""""""""""""""""""""""""""""""""""""

Is there any parameter I should tune to make it faster?

alantrrs commented 13 years ago

Besides the fact that I haven't optimized the code. Right now the algorithm test every single bounding box created in the grid. To make it faster it should just take a sample of it, however I haven't implemented that feature yet.

zttkkk commented 12 years ago

alantrrs is right,the code is not optimized,and the algorithm is not good enough, I found that the length of grid[] is very sensitive to the image size.In 320_240,the length is about 64000,and in your test the length grows up to about 610000 while the image size is 640_480.You see? The image size just grows 4 times,then the length of grid[] grows 10 times.