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

btw, this one is nice & fast, too.

berak gravatar imageberak ( 2015-01-31 07:59:16 -0600 )edit
1

It is fast but it doesn't update height and width of the object. but i need to do that too.

sid gravatar imagesid ( 2015-02-02 09:25:14 -0600 )edit

Sid, isnt it possible for you to adapt the code of the project berak refers to so that those values get updated too?

StevenPuttemans gravatar imageStevenPuttemans ( 2015-02-02 09:28:00 -0600 )edit

Hi,break.I found the one can not run on VS2013 with opencv2411

Sheng Liu gravatar imageSheng Liu ( 2015-05-06 05:58:31 -0600 )edit
1

@Sheng Liu , worked for me (even with vs2008)

if it is important, you maybe should spawn a new question about it.

berak gravatar imageberak ( 2015-05-06 06:06:32 -0600 )edit

@sid Do you think the code of "OPEN TLD with c++ and opencv" is too complex to understand? How to simplify the code in the project? Just achieve the basic TLD function.

Sheng Liu gravatar imageSheng Liu ( 2015-05-21 23:36:16 -0600 )edit

Same here : Running TLD sample code in openCV 3 with tracking contrib module is giving me unsatisfactory results : Very low framerate even on low quality sample video. Any idea how to speed it up?

mubb gravatar imagemubb ( 2015-08-19 03:06:02 -0600 )edit
1

@mubb the TLD sample code is known to be very slow. There is a GSoC student working on this as far a I know. Look here and here.

StevenPuttemans gravatar imageStevenPuttemans ( 2015-08-19 04:31:45 -0600 )edit

Any news about the project ? @StevenPuttemans

mubb gravatar imagemubb ( 2015-10-14 08:49:45 -0600 )edit

afaik this is still ongoing. you have to be patient :D

StevenPuttemans gravatar imageStevenPuttemans ( 2015-10-14 08:51:38 -0600 )edit

Can install OpenTDL with OpenCV3.0.0? How to do it?

nistar gravatar imagenistar ( 2016-01-25 04:23:33 -0600 )edit

Hi #sid
I'm sorry but how did you install the library openTLD ? because I 've done with cmake - gui giving the opencv3.1 path but it can not find the directories..

peren gravatar imageperen ( 2016-06-13 10:45:49 -0600 )edit

@peren, please don't make answers, if you have a comment or question...

berak gravatar imageberak ( 2016-06-13 11:08:03 -0600 )edit

@sid

How did you implement TLD , using OPEN TLD with C++ and Opencv? I am using Open TLD C++ implemented by Georg Nebehay (https://github.com/gnebehay/OpenTLD), however facing conflicts built-in TLD when linking with OpenCV.

The built-in TLD tracker is very slow, does not initialize or overshoots. What parameters should I update to speed it up?.

Best regards,

Karan

karan_maverick gravatar imagekaran_maverick ( 2017-10-09 07:27:18 -0600 )edit