2017-10-21 13:15:22 +02:00
|
|
|
function [output_dir] = run_biwi_experiment(rootDir, biwiDir, verbose, varargin)
|
2016-04-28 21:40:36 +02:00
|
|
|
% Biwi dataset experiment
|
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
if(isunix)
|
|
|
|
executable = '"../../build/bin/FeatureExtraction"';
|
|
|
|
else
|
|
|
|
executable = '"../../x64/Release/FeatureExtraction.exe"';
|
|
|
|
end
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
output_dir = 'experiments/biwi_out';
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
dbSeqDir = dir([rootDir biwiDir]);
|
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
output_dir = cat(2, output_dir, '/');
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
offset = 0;
|
|
|
|
|
|
|
|
r = 1 + offset;
|
|
|
|
|
|
|
|
numTogether = 25;
|
|
|
|
|
|
|
|
|
|
|
|
for i=3 + offset:numTogether:numel(dbSeqDir)
|
|
|
|
|
|
|
|
|
|
|
|
command = executable;
|
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
command = cat(2, command, [' -inroot ' '"' rootDir '"']);
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
% deal with edge cases
|
|
|
|
if(numTogether + i > numel(dbSeqDir))
|
|
|
|
numTogether = numel(dbSeqDir) - i + 1;
|
|
|
|
end
|
|
|
|
|
|
|
|
for n=0:numTogether-1
|
|
|
|
|
|
|
|
inputFile = [biwiDir dbSeqDir(i+n).name '/colour.avi'];
|
2017-01-04 23:32:38 +01:00
|
|
|
outputFile = [output_dir dbSeqDir(i+n).name '.txt'];
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
command = cat(2, command, [' -f "' inputFile '" -of "' outputFile '"']);
|
|
|
|
|
|
|
|
if(verbose)
|
2017-01-04 23:32:38 +01:00
|
|
|
outputVideo = [output_dir dbSeqDir(i).name '.avi'];
|
2016-04-28 21:40:36 +02:00
|
|
|
command = cat(2, command, [' -ov "' outputVideo '"']);
|
|
|
|
end
|
|
|
|
end
|
2017-10-22 21:02:54 +02:00
|
|
|
command = cat(2, command, [' -fx 505 -fy 505 -cx 320 -cy 240 -no2Dfp -no3Dfp -noMparams -noAUs -noGaze -vis-track ']);
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
if(any(strcmp('model', varargin)))
|
|
|
|
command = cat(2, command, [' -mloc "', varargin{find(strcmp('model', varargin))+1}, '"']);
|
|
|
|
end
|
|
|
|
|
|
|
|
r = r+1;
|
2017-01-04 23:32:38 +01:00
|
|
|
if(isunix)
|
|
|
|
unix(command, '-echo')
|
|
|
|
else
|
|
|
|
dos(command);
|
|
|
|
end
|
2016-04-28 21:40:36 +02:00
|
|
|
end
|