資源簡介
針對多目標跟蹤的評價指標代碼,matlab版本,評價指標包括:Rcll Prcn FAR| GT MT PT ML| FP FN IDs FM| MOTA MOTP MOTAL

代碼片段和文件信息
function?allMets=evaluateTracking(seqmapresDirdataDir)
%%?evaluate?CLEAR?MOT?and?other?metrics
%?concatenate?ALL?sequences?and?evaluate?as?one!
%
%?SETUP:
%
%?define?directories?for?tracking?results...
%?resDir?=?fullfile(‘res‘‘data‘filesep);
%?...?and?the?actual?sequences
%?dataDir?=?fullfile(‘..‘‘data‘‘2DMOT2015‘‘train‘filesep);
%
%
fid=fopen(‘log.txt‘‘w‘);
addpath(genpath(‘.‘));
%%%%%%%%%%%%%%%%%?add?for?debugging
%clc?;?clear?all;?resDir?=?fullfile(‘res‘‘data‘filesep);?dataDir?=?fullfile(‘..‘‘2DMOT2015‘‘train‘filesep);?seqmap=‘c2-train.txt‘;?
%?read?sequence?map
seqmapFile=fullfile(‘seqmaps‘seqmap);
allSeq?=?parseSequences(seqmapFile);
fprintf(‘Sequences:?\n‘); fprintf(fid‘Sequences:\n‘);
disp(allSeq‘)
for?i=1:length(allSeq)
fprintf(fid?‘%s\n‘?allSeq{i});?end
%?concat?gtInfo
gtInfo=[];
gtInfo.X=[];
allFgt=zeros(1length(allSeq));
%?Find?out?the?length?of?each?sequence
%?and?concatenate?ground?truth
gtInfoSingle=[];
seqCnt=0;
for?s=allSeq
????seqCnt=seqCnt+1;
????seqName?=?char(s);
????seqFolder=?[dataDirseqNamefilesep];
????
????assert(isdir(seqFolder)‘Sequence?folder?%s?missing‘seqFolder);
????
????gtFile?=?fullfile(dataDirseqName‘gt‘‘gt.txt‘);
????gtI?=?convertTXTToStruct(gtFileseqFolder);
????
????[FgtNgt]?=?size(gtInfo.X);
????[FgtINgtI]?=?size(gtI.Xi);
????newFgt?=?Fgt+1:Fgt+FgtI;
????newNgt?=?Ngt+1:Ngt+NgtI;
????
????gtInfo.Xi(newFgtnewNgt)?=?gtI.Xi;
????gtInfo.Yi(newFgtnewNgt)?=?gtI.Yi;
????gtInfo.W(newFgtnewNgt)?=?gtI.W;
????gtInfo.H(newFgtnewNgt)?=?gtI.H;
????
????gtInfoSingle(seqCnt).wc=0;
????
????%?fill?in?world?coordinates?if?they?exist
????if?isfield(gtI‘Xgp‘)?&&?isfield(gtI‘Ygp‘)
????????gtInfo.Xgp(newFgtnewNgt)?=?gtI.Xgp;
????????gtInfo.Ygp(newFgtnewNgt)?=?gtI.Ygp;
????????gtInfoSingle(seqCnt).wc=1;
????end
????
????%?check?if?bounding?boxes?available?in?solution
????imCoord=1;
????if?all(gtI.Xi(find(gtI.Xi(:)))==-1)
????????imCoord=0;
????end
????
????gtInfo.X=gtInfo.Xi;gtInfo.Y=gtInfo.Yi;
????if?~imCoord?
????????gtInfo.X=gtInfo.Xgp;gtInfo.Y=gtInfo.Ygp;?
????end
????
????allFgt(seqCnt)?=?FgtI;
????
????gtInfoSingle(seqCnt).gtInfo=gtI;
????
end
gtInfo.frameNums=1:size(gtInfo.Xi1);
allMets=[];
mcnt=1;
fprintf(‘Evaluating?...?\n‘); fprintf(fid?‘=============Evaluating?===================?\n\n‘?);
clear?stInfo
stInfo.Xi=[];
evalMethod=1;
%?flags?for?entire?benchmark
%?if?one?seq?missing?evaluation?impossible
eval2D=1;
eval3D=1;
seqCnt=0;
%?iterate?over?each?sequence
for?s=allSeq
????
????seqCnt=seqCnt+1;
????seqName?=?char(s);
????
????fprintf(‘\t...?%s\n‘seqName); fprintf(fid?‘\t...?%s?\n‘seqName?);
????
????%?if?a?result?is?missing?we?cannot?evaluate?this?tracker
????resFile?=?fullfile(resDir[seqName?‘.txt‘]);
????if?~exist(resFile‘file‘)
????????fprintf(‘WARNING:?result?for?%s?not?available!\n‘seqName);
????????eval2D=0;
????????eval3D=0;
????????continue;
????end
????
????%?if?MOT16?preprocess?(clean)
????if?~isempty(strfind(seqName‘MOT16‘))
resFile?=?preprocessRe
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件???????6513??2016-05-10?11:06??devkit\evaluateTracking.asv
?????文件???????7137??2016-05-10?11:47??devkit\evaluateTracking.m
?????文件????????208??2016-05-14?15:29??devkit\log.txt
?????文件????????415??2016-05-07?16:34??devkit\main.m
?????文件???????3353??2016-03-21?08:56??devkit\readme.txt
?????文件?????131179??2016-04-29?20:28??devkit\res\data\ADL-Rundle-6.txt
?????文件?????224230??2016-04-29?20:28??devkit\res\data\ADL-Rundle-8.txt
?????文件?????201678??2016-04-29?20:28??devkit\res\data\ETH-Bahnhof.txt
?????文件??????46068??2016-04-29?20:28??devkit\res\data\ETH-Pedcross2.txt
?????文件??????36117??2016-04-29?20:28??devkit\res\data\ETH-Sunnyday.txt
?????文件?????????75??2016-05-10?11:48??devkit\res\data\eval2D.txt
?????文件?????????42??2016-05-07?15:40??devkit\res\data\eval3D.txt
?????文件??????21541??2016-04-29?20:28??devkit\res\data\KITTI-13.txt
?????文件??????19390??2016-04-29?20:28??devkit\res\data\KITTI-17.txt
?????文件?????205231??2016-04-29?20:28??devkit\res\data\PETS09-S2L1.txt
?????文件???????9939??2016-04-29?20:28??devkit\res\data\TUD-Campus.txt
?????文件??????34000??2016-04-29?20:28??devkit\res\data\TUD-Stadtmitte.txt
?????文件?????224703??2016-04-29?20:28??devkit\res\data\Venice-2.txt
?????文件???????4041??2016-05-08?21:11??devkit\screnn-output.txt
?????文件????????139??2016-03-21?08:56??devkit\seqmaps\c2-test.txt
?????文件????????135??2016-03-21?08:56??devkit\seqmaps\c2-train.txt
?????文件?????????60??2016-03-21?08:56??devkit\seqmaps\c3-test.txt
?????文件?????????57??2016-03-21?08:56??devkit\seqmaps\c3-train.txt
?????文件?????????40??2016-03-21?08:56??devkit\seqmaps\c4-test.txt
?????文件?????????40??2016-03-21?08:56??devkit\seqmaps\c4-train.txt
?????文件?????????68??2016-03-21?08:56??devkit\seqmaps\c5-test.txt
?????文件?????????68??2016-03-21?08:56??devkit\seqmaps\c5-train.txt
?????文件????????587??2016-03-21?08:56??devkit\utils\boxIntersect.m
?????文件????????367??2016-03-21?08:56??devkit\utils\boxiou.m
?????文件????????473??2016-03-21?08:56??devkit\utils\boxUnion.m
............此處省略24個文件信息
- 上一篇:步進電機pid的matlab模型20個程序
- 下一篇:LSSVM程序代碼
評論
共有 條評論