forked from vision4robotics/MRCF-Tracker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
run_MRCF.m
86 lines (67 loc) · 2.99 KB
/
run_MRCF.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
% This function runs the MRCF tracker on the video specified in
% "configSeqs".
% This function is based on STRCF paper.
% Details of some parameters are not presented in the paper, you can
% refer to BACF/DSST/ECO paper for more details.
function results = run_MRCF(seq, rp, bSaveImage)% ¼ÓÁËÕýÔòÏîµÄIBRI
% Feature specific parameters
hog_params.cell_size = 4;
hog_params.compressed_dim = 10;
hog_params.nDim = 31;
grayscale_params.colorspace='gray';
grayscale_params.cell_size = 4;
cn_params.tablename = 'CNnorm';
cn_params.useForGray = false;
cn_params.cell_size = 4;
cn_params.nDim = 10;
% Which features to include
params.t_features = {
struct('getFeature',@get_colorspace, 'fparams',grayscale_params),...
struct('getFeature',@get_fhog,'fparams',hog_params),...
struct('getFeature',@get_table_feature, 'fparams',cn_params),...
};
% Global feature parameters1s
params.t_global.cell_size = 4; % Feature cell size
% Image sample parameters
params.search_area_shape = 'square'; % The shape of the samples
params.search_area_scale = 5; % The scaling of the target size to get the search area
params.min_image_sample_size = 150^2; % Minimum area of image samples
params.max_image_sample_size = 200^2; % Maximum area of image samples
% Spatial regularization window_parameters
params.feature_downsample_ratio = [4]; % Feature downsample ratio
params.reg_window_max = 1e5; % The maximum value of the regularization window
params.reg_window_min = 1e-3; % the minimum value of the regularization window
% Detection parameters
params.refinement_iterations = 1; % Number of iterations used to refine the resulting position in a frame
params.newton_iterations = 5; % The number of Newton iterations used for optimizing the detection score
params.clamp_position = false; % Clamp the target position to be inside the image
% Learning parameters
params.output_sigma_factor = 0.0625; % Label function sigma
% ADMM parameters
params.max_iterations = [2 2];
params.init_penalty_factor = [1 1];
params.max_penalty_factor = [0.1, 0.1];
params.penalty_scale_step = [10, 10];
params.num_scales = 33;
params.hog_scale_cell_size = 4;
params.learning_rate_scale = 0.0255;
params.scale_sigma_factor = 0.5;
params.scale_model_factor = 1.0;
params.scale_step = 1.03;
params.scale_model_max_area = 32*16;
params.scale_lambda = 1e-4;
params.learning_rate = 0.0199;
params.mu = 1;
params.admm_lambda = 0.01;%Filter regularization
params.admm_lambda_2 = 10;% Response Deviation Aware Regularization
params.admm_lambda_3 = 0.004;%Channel Reliability Aware Regularization
params.admm_iterations = 3;%Number of ADMM iterations
% Visualization
params.visualization = 1; % Visualiza tracking and detection scores
% GPU
params.use_gpu = false; % Enable GPU or not
params.gpu_id = []; % Set the GPU id, or leave empty to use default
% Initialize
params.seq = seq;
% Run tracker
results = tracker(params);