Visual Object Tracking (VOT)
vot官方网站:http://www.votchallenge.net/
不使用vot-toolkit工具自己保存VOT数据集格式结果参考:OTB数据集和VOT数据集融合跟踪算法接口示例_博博有个大大大的Dream-CSDN博客_otb数据集
1、预下载
(1)评估工具vot-toolkit-master下载地址:
https://github.com/votchallenge/vot-toolkit
(2)VOT2016数据集下载
目标跟踪数据集OTB、VOT下载_博博有个大大大的Dream-CSDN博客_otb50数据集
(3)下载和配置测试跟踪算法(本文以CVPR2017跟踪算法CSR-DCF为例)
2、运行toolkit_path.m添加整个工程目录到workspace;
3、运行workspace\workspace_create.m创建自己要测试的算法(此处新建CSRDCF跟踪算法,选择vot2016作为测试数据集,跟踪代码的语言选择Matlab。如果还未在matlab中配置VS的编译环境,请参考:Matlab配置C++/VS2015等编译环境(mex -setup 找不到编译器问题解决)_博博有个大大大的Dream-CSDN博客_matlab mex setup)
>> workspace_create
Select one of the available experiment stacks:
1 - test
2 - vot2013
3 - vot2014
4 - vot2015
5 - vot2016
6 - vot2017
7 - vot2018
8 - votlt2018
9 - vottir2015
10 - vottir2016
Selection: 5
Input an unique identifier for your tracker: CSRDCF
Is your tracker written in any of the following languages?
1 - "Matlab"
2 - "Python"
3 - "C/C++"
4 - "Octave"
5 - "None of the above"
Selected option: 1
警告: 在路径中未找到 "D:\Code\MATLAB2014\vot-toolkit-master\vot-toolkit-master\native"。
> In rmpath at 57
In workspace_create at 142
Downloading TraX source from "https://codeload.github.com/votchallenge/trax/zip/master". Please wait ...
Verifying native components ...
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
使用 'Microsoft Visual C++ 2015 Professional' 编译。
MEX 已成功完成。
***************************************************************************
The VOT workspace has been configured
Please edit the tracker_CSRDCF.m file to configure your tracker.
Then run run_test.m script to make sure that the tracker is working.
To run the experiments execute the run_experiments.m script.
***************************************************************************
>>
运行成功后会生成如下文件:
4、 打开workspace\workspace_load.m,更改自己存放的数据集路径数据集
将workspace_load.m的142行更改为:
sequences_directory = 'E:\Datasets\vot2016';%get_global_variable('sequences_path', fullfile(get_global_variable('workspace_path'), 'sequences'));
其中'E:\Datasets\vot2016'为我的VOT数据集所在路径,替换成自己的数据集所在路径即可。
5、打开tracker_CSRDCF.m文件,配置tracker接口
6、简单说明
(1) 经过以上配置后,vot-toolkit会跳转到D:\Code\MATLAB2014\csr-dcf-master\csr-dcf-master\csr_wrapper.m来执行跟踪代码。
(2)此例测试跟踪算法的vot-toolkit接口已经做好,如果我们想测试自己跟踪算法在vot数据集中的表现,可以参考以下格式来定义tracker的接口:
function XXX_wrapper
%传递参数,获得图像
try
% Simple check for Octave environment
OCTAVE_VERSION;
rand('seed', sum(clock));
pkg load image;
catch
RandStream.setGlobalStream(RandStream('mt19937ar', 'Seed', sum(clock)));
end
%设置目标框为矩形
[handle, image, region] = vot('rectangle');
%初始化XXX跟踪器
[state, ~] = XXX_initialize(imread(image), region);
while true
%每一帧更新图像
[handle, image] = handle.frame(handle);
if isempty(image)
break;
end;
%更新跟踪是否成功、目标框及置信度
[state, region, confidence] = XXX_update(state, imread(image));
%保存跟踪是否成功、目标框及置信度
handle = handle.report(handle, region, confidence);
end;
%结束退出
handle.quit(handle);
end
7、运行run_test.m会遇到以下两个错误
(1)TraX连接跟踪代码错误
Tracker execution interrupted: Unable to establish connection.
TraX support not detected.
错误使用 tracker_load (line 127)
Tracker has not passed the TraX support test.
解决方法:
将(你的vot-toolkit所在路径)\vot-toolkit-master\tracker\examples\matlab目录下的vot.m拷贝到D:\Code\MATLAB2014\csr-dcf-master\csr-dcf-master\路径下即可。
(2)TraX没有收到返回信息
CLIENT: Closing server socket.
Tracker execution interrupted: Did not receive response.
错误使用 traxclient
Did not receive response.
解决方法:
这是代码错误,将工程路径加载到接口函数中问题得到解决
% set this to tracker directory
tracker_path = 'D:\Code\MATLAB2014\csr-dcf-master\csr-dcf-master';
% add paths
addpath(tracker_path);
addpath(fullfile(tracker_path, 'mex'));
addpath(fullfile(tracker_path, 'utils'));
addpath(fullfile(tracker_path, 'features'));
8、运行run_test.m得到结果
2018年10月21日补充
9、Trax安装错误
从https://github.com/votchallenge/trax/下载辅助工具trax,在vot-toolkit的解压目录下新建文件夹./native/trax,把下载的trax的内容放到里面就好了。
10、更改代码生成路径
matlab切换在需要放置代码的目录下,再运行workspace_create.m,则会在此目录下生成代码。