生活随笔
收集整理的這篇文章主要介紹了
Matlab自动下载OTB数据集代码
小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.
在下載OTB數(shù)據(jù)集時(shí)http://cvlab.hanyang.ac.kr/tracker_benchmark/datasets.html
官網(wǎng)提供的是每個(gè)視頻序列的下載鏈接,如果想要一次性全部下載或者批量下載就有點(diǎn)麻煩,所以參考了KCF算法中提供的download_video.m,改寫為較為簡便的下載代碼:
base_path
= '';%list of videos to download
videos
= 'Basketball Biker Bird1 Bird2 BlurBody BlurCar1 BlurCar2 BlurCar3 BlurCar4 BlurFace BlurOwl Board Bolt Bolt2 Box Boy Car1 Car2 Car24 Car4 CarDark CarScale ClifBar Coke Couple Coupon Crossing Crowds Dancer Dancer2 David David2 David3 Deer Diving Dog Dog1 Doll DragonBaby Dudek FaceOcc1 FaceOcc2 Fish FleetFace Football Football1 Freeman1 Freeman3 Freeman4 Girl Girl2 Gym Human2 Human3 Human4 Human5 Human6 Human7 Human8 Human9 Ironman Jogging_1 Jogging_2 Jump Jumping KiteSurf Lemming Liquor Man Matrix Mhyang MotorRolling MountainBike Panda RedTeam Rubik Shaking Singer1 Singer2 Skater Skater2 Skating1 Skating2_1 Skating2_2 Skiing Soccer Subway Surfer Suv Sylvester Tiger1 Tiger2 Toy Trans Trellis Twinnings Vase Walking Walking2 Woman'
;
videos
= strsplit(videos
);
% if ~exist(base_path
, 'dir'), %create
if it doesn't exist already
% mkdir(base_path
);
% end
%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
),if exist([base_path
, videos
{k
}], 'dir')disp(['existing video:' videos
{k
}]);continueend
disp(['Downloading and extracting ' videos
{k
} '...']);unzip(['http
:
end
videos中的長字符串為OTB100數(shù)據(jù)集的視頻名稱,以空格分隔開。
總結(jié)
以上是生活随笔為你收集整理的Matlab自动下载OTB数据集代码的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。
如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。