加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
download_videos.m 2.35 KB
一键复制 编辑 原始数据 按行查看 历史
dongqiaqia 提交于 2017-06-20 20:00 . fisrt commit
% This script downloads and extracts all videos to the path specified
% below.
%
% Joao F. Henriques, 2014
% http://www.isr.uc.pt/~henriques/
%local path where the videos will be located.
%note that if you change it here, you must also change it in RUN_TRACKER.
base_path = './data/Benchmark/';
%list of videos to download
% videos = {'basketball', 'bolt', 'boy', 'car4', 'carDark', 'carScale', ...
% 'coke', 'couple', 'crossing', 'david2', 'david3', 'david', 'deer', ...
% 'dog1', 'doll', 'dudek', 'faceocc1', 'faceocc2', 'fish', 'fleetface', ...
% 'football', 'football1', 'freeman1', 'freeman3', 'freeman4', 'girl', ...
% 'ironman', 'jogging', 'jumping', 'lemming', 'liquor', 'matrix', ...
% 'mhyang', 'motorRolling', 'mountainBike', 'shaking', 'singer1', ...
% 'singer2', 'skating1', 'skiing', 'soccer', 'subway', 'suv', 'sylvester', ...
% 'tiger1', 'tiger2', 'trellis', 'walking', 'walking2', 'woman'};
%list of videos to download
videos = {'basketball', 'bolt', 'boy', ...
'david2', 'david3', 'david', ...
'fish', 'girl', ...
'ironman', 'jogging', 'jumping', 'lemming', 'liquor', 'matrix', ...
'mhyang', 'motorRolling', 'mountainBike', 'shaking', 'singer1', ...
'singer2', 'skating1', 'skiing', 'soccer', 'subway', 'suv', 'sylvester', ...
'tiger1', 'tiger2', 'trellis', 'walking', 'walking2', 'woman'};
p = gcp('nocreate');
if isempty(p)
poolsize = 0;
else
poolsize = p.NumWorker;
end
if poolsize == 0
parpool('local');
end
if ~exist(base_path, 'dir'), %create if it doesn't exist already
mkdir(base_path);
end
% if ~exist('matlabpool', 'file'),
% %no parallel toolbox, use a simple 'for' to iterate
% disp('Downloading videos one by one, this may take a while.')
% disp(' ')
%
% for k = 1:numel(videos),
% disp(['Downloading and extracting ' videos{k} '...']);
% unzip(['http://cvlab.hanyang.ac.kr/tracker_benchmark/seq/' videos{k} '.zip'], base_path);
% end
%
% else
%download all videos in parallel
disp('Downloading videos in parallel, this may take a while.')
disp(' ')
% if matlabpool('size') == 0,
% matlabpool open;
% end
parfor k = 1:numel(videos),
disp(['Downloading and extracting ' videos{k} '...']);
unzip(['http://cvlab.hanyang.ac.kr/tracker_benchmark/seq/' videos{k} '.zip'], base_path);
end
% end
poolobj = gcp('nocreate');
delete(poolobj);
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化