说明SR PR NPR指标的计算过程:%% tracker performance evaluation tool for COESOT Benchmark %…
- User
说明SR PR NPR指标的计算过程:%% tracker performance evaluation tool for COESOT Benchmark % (modified based on LaSOT toolkit by Xiao Wang) % 10/01/2022
clc; clear all; close all; warning off;
addpath('./utils/'); addpath('./sequence_evaluation_config/');
tmp_mat_path = './tmp_mat/'; % path to save temporary results path_anno = './annos/coesot_anno/'; % path to annotations path_att = './annos/att/'; % path to attribute rp_all = './coesot_tracking_results/'; % path to tracking results save_fig_path = './res_fig/'; % path to result figures save_fig_suf = 'png'; % suffix of figures, 'png' or 'eps'
att_name = {'Camera Motion', 'Rotation', 'Deformation', ... 'Full Occlusion', 'Low Illumination', 'Out-of-View', 'Partial Occlusion', ... 'Viewpoint Change', 'Scale Variation', 'Background Clutter', 'Motion Blur', ... 'Aspect Ration Change', 'Fast Motion', 'No Motion', ... 'Illumination Variation', 'Over Exposure', 'Background Object Motion' };
att_fig_name = {'CM', 'ROT', 'DEF', 'FOC', 'LI', 'OV', 'POC', 'VC', 'SV', 'BC', ... 'MB', 'ARC', 'FM', 'NMO', 'IV', 'OE', 'BOM'};
% 'test_set' --- evaluation the whole test set evaluation_dataset_type = 'test_set';
% use normalization or not false norm_dst = false; % false true
trackers = config_tracker(); sequences = config_sequence(evaluation_dataset_type); plot_style = config_plot_style();
num_seq = numel(sequences); num_tracker = numel(trackers);
% load tracker info name_tracker_all = cell(num_tracker, 1); for i = 1:num_tracker name_tracker_all{i} = trackers{i}.name; end
% load sequence info name_seq_all = cell(num_seq, 1); for i = 1:num_seq name_seq_all{i} = sequences{i};
% seq_att = importdata(fullfile(path_att, [sequences{i} '.txt']));
% if i == 1 % att_all = zeros(num_seq, numel(seq_att)); % end sequences{i} % att_all(i, :) = seq_att; end
% parameters for evaluation metric_type_set = {'error', 'overlap'}; eval_type = 'OPE'; % ranking_type = 'threshold'; ranking_type = 'AUC'; % change it to 'AUC' for success plots rank_num = 50; % draw the results under each challenging factors or not? drawAttributeResults = false; %% true, false
threshold_set_error = 0:50; if norm_dst threshold_set_error = threshold_set_error / 100; end threshold_set_overlap = 0:0.05:1;
for i = 1:numel(metric_type_set) % error (for distance plots) or overlap (for success plots) metric_type = metric_type_set{i}; switch metric_type case 'error' threshold_set = threshold_set_error; rank_idx = 21; x_label_name = 'Location error threshold'; y_label_name = 'Precision'; case 'overlap' threshold_set = threshold_set_overlap; rank_idx = 11; x_label_name = 'Overlap threshold'; y_label_name = 'Success rate'; end
- Assistant
- User
中文回答
- Assistant
所提供的脚本实现了使用 COESOT 基准测试评估跟踪器性能,该脚本基于 LaSOT 工具包进行了改编。此脚本通过使用两种主要的评估指标:精确率(Precision Rate,PR)和成功率(Success Rate,SR),来衡量跟踪器的性能。该脚本使用 MATLAB 进行处理。下面,我们将描述指标的计算过程,如脚本中所示的 PR 和 SR。
第1步:环境设置
脚本首先设置 MATLAB 环境(清除变量、添加所需路径),定义结果、注释和跟踪输出的路径。
第2步:初始化
初始化变量,包括跟踪器,序列,评估类型,排序方法(AUC、阈值)以及错误和重叠的阈值。
第3步:跟踪器和序列配置
脚本为将要进行评估的跟踪器和序列进行配置,并存储跟踪器名称。
第4步:评估指标配置
评估着重于两个指标:
- 错误(Error):表示为位置错误阈值,适用于精确率图。
- 重叠(Overlap):使用重叠阈值表示,适用于成功率图。
第5步:评估过程
-
数据加载和评估执行:对于每种指标类型,脚本准备了带有定义的阈值和参数的评估。它调用函数
eval_tracker进行跟踪器性能评估,该函数预计会计算每个跟踪器和序列的必要统计数据。 -
输出分析和绘图:计算完成后,从临时文件中加载结果。脚本使用这些结果绘制跟踪器性能的视觉表示(精确率和成功率图)通过函数
plot_draw_save。它根据跟踪器排名和在不同设置下的性能来组织结果。
第6步:基于属性的评估(可选)
如果启用(
drawAttributeResults),脚本还会根据不同跟踪挑战(如遮挡、运动模糊等)执行评估。它涉及按属性过滤序列,并重新运行每个属性子集的绘图逻辑,以反映跟踪器如何处理特定挑战。