How to speed up TLD tracker in opencv 3 with contrib modules ? [closed]

asked 2015-01-27 08:18:30 -0600

sid gravatar image

updated 2015-01-28 15:52:43 -0600

i ran the sample TLD code (using the "TLD" tracker), it works but the framerates are low and delay is very high , are there any parameter or anything else that can be altered to boost it??? Please help.

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by sturkmen
close date 2020-09-17 05:07:21.017342

Comments

Hmm lets start by discussing your application and how you are using the tracker. Things to speed it up is to reduce the region in which you will apply the tracking instead of basing it on the complete frame.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-27 08:35:59 -0600 )edit

The code:

Ptr<Tracker> tracker = Tracker::create( "TLD" ); 
tracker->init( frame, boundingBox )
tracker->update( frame, boundingBox )

using the above methods , still slow on smallest ROI.

sid gravatar imagesid ( 2015-01-27 08:56:58 -0600 )edit

Yeah but that is because you are probably updating your tracker on each frame? Basically you want your tracker to predict about 75 % of the time and use 25% of the detections to update your tracker. Then it goes fast. General principle for all trackers AFAIK.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-27 09:53:58 -0600 )edit

how to do that , Do i have to change any parameter in TLDTrackker.cpp file?

sid gravatar imagesid ( 2015-01-28 10:47:48 -0600 )edit

i need something like this : https://www.youtube.com/watch?v=SPUvK... it is working flawless . The source code and exe files are given in video desciption but i couldn't compile it. exe file runs fine with good frame rates.

sid gravatar imagesid ( 2015-01-28 11:21:42 -0600 )edit

+StevePuttermans -- I'm also a bit interested in that 75%/25% technique that you mentioned. I haven't seen it in any of the samples and 15+ minutes of googling hasn't really turned much up. If you could justp oint me in the right direction, I'd love to learn it a bit more. As far as I can tell, you're saying that we should overlay the tracker with something like a Kalman filter, and use the predict feature of that filter most of the time, and just update the tracker at whatever rate we can handle real time (and around 25% is a good rule of thumb)? If that's the case, then I understand it. But if there's something else, some other general principle I could look at, that would be interesting.

Petty gravatar imagePetty ( 2015-01-28 11:31:45 -0600 )edit

Hmm I was talking from my experience with cascade classifier detection and Kalman tracking in order to speed up sequence based detection. Therefore I was guessing that TLD has some kind of Kalman like behaviour since it is a tracker? Afaik TLD asks you to select an object and then predicts where it is going to be right?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-29 02:03:20 -0600 )edit

Hmm, the documentation says this:

"The Median Flow algorithm (see above) was chosen as a tracking component in this implementation, following authors. Tracker is supposed to be able to handle rapid motions, partial occlusions, object absence etc."

JohannesZ gravatar imageJohannesZ ( 2015-01-29 05:59:35 -0600 )edit
3

successfully implemented TLD , using OPEN TLD with c++ and opencv. and it works way much better than opencv contrib module TLD .

sid gravatar imagesid ( 2015-01-31 07:22:29 -0600 )edit

If you are up to it, could you see where the difference lie and try to update the contrib part?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-01-31 07:49:53 -0600 )edit