Accurate scale estimation for robust Visual Tracking code

Source: Internet
Author: User
accurate scale estimation for robust Visual Tracking

I said in the previous blog "Correlation filter Tracking (Mosse)" The principle of correlation filter tracking, but because the article did not provide code, so there is no way to study him in depth, and pure theory seems to be very boring. Martin Danelljan later made improvements to MOSST and added multi-scale tracking to improve the results, which were first tested on this year's vot. Its article is named accurate scale estimation for robust Visual Tracking, and its code is DSST, so this method is represented later with DSST. I upload the article code here Http://yunpan.cn/cHcj9c4q9VLfL access Password af88 or here Https://github.com/Lennycyz/DSST, you can download. Enter the following text:

Mosse (Visual Object Tracking using Adaptive Correlation Filters) When solving a filter, its input is the image itself (a grayscale image), which is the grayscale feature of the image. For the gray-scale feature, its characteristics are relatively simple, it can not describe the texture and edge shape information of the target well, so DSST's authors replace the gray feature with the Hog feature which is more commonly used in the field of tracking and recognition.

The DSST author divides the track into two parts, positional changes (translation) and scale changes (scales estimation). During the implementation of the trace, the author defines two correlation filter, a filter (translation filter) is specifically used to determine where the new target is located, and the other filter (scale filter) is specifically used for scaling evaluation.

In translation filter, the author's approach is the same as the Mosse approach, except that the guidelines for obtaining the best template h have changed slightly. Based on the translation filter, you can get the position of the current frame target, then get the candidate boxes at the current target position at different scales, and after the scale filter, the new target scale is determined. Program implementation:

First look at the pseudo-code given by the author:

Algorithm 1 proposed tracking approach:iteration at step T. Input:image.
    Precious target position and scale.
Translation model, and scale model,.
    output:estimated target position and scale.

Updated translation model, and scale model,.
    Translation Estimation:1:extract a translation sample from at and.
    2:compute the translation correlation using, and in (6).

3:set to the target position that maximizes.
    Scale Estimation:4:extract A translation the sample from at and.
    5:compute the translation correlation using, and in (6).

6:set to the target position that maximizes.
    Model update:7:extract samples and from at and.
    8:update the translation model, using (5).
   
   
    
    9:update the scale model, using (5).
    
    1 2 3 4 5 6 7 8 9 10 11
    
   12 13 14 15 16 17 18 19 20 21 22 23 1 2 3 4 5
    
    6 7 8 9 10 11 12 13 14 15
   
    16 17 18 19 20 21 22 23
Initialization phase: first, get the input and output of translation filter
% desired translation filter output (Gaussian shaped), bandwidth proportional to target size
%prod (x) represents the quadrature of each element in X (pro Duct)
%ndgrid copy two vectors to Rs (row rows) and CS (cols) 
output_sigma = sqrt (prod (BASE_TARGET_SZ)) * Output_sigma_factor;
[RS, cs] = Ndgrid ((1:sz (1))-Floor (SZ (1)/2), (1:sz (2))-Floor (SZ (2)/2));
y = exp ( -0.5 * (((rs.^2 + cs.^2)/output_sigma^2));
YF = single (fft2 (y)); % the moment is becoming single-precision floating point
   
   
    
    1
    
    2
    
    3
    
    4
    
    5 6 7
   
   
   
   
    
    1
    
    2
    
    3
    
    4
    
    5
    
    6
    
    7
   
   

For a known initial target box (X0,y0,w0,h0), the author first obtains a different size of patchs, which is obtained as follows:

[RS, cs] = Ndgrid ((1:sz (1))-Floor (SZ (1)/2), (1:sz (2))-Floor (SZ (2)/2));
   
   
    
    1
   
   
   
   
    
    1
   
   

Here the SZ (1) = 2h0, sz (2) = 2w0. The patch size obtained here is indicated as follows:

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.