2017-11-22 09:08:35 +00:00
|
|
|
% A demo how to run a multi-face face tracker
|
|
|
|
|
2017-01-04 22:32:38 +00:00
|
|
|
clear;
|
|
|
|
|
|
|
|
if(isunix)
|
|
|
|
executable = '"../../build/bin/FaceLandmarkVidMulti"';
|
|
|
|
else
|
|
|
|
executable = '"../../x64/Release/FaceLandmarkVidMulti.exe"';
|
|
|
|
end
|
2016-04-28 19:40:36 +00:00
|
|
|
|
2017-05-09 01:36:23 +00:00
|
|
|
in_files = dir('../../samples/multi_face.avi');
|
2016-04-28 19:40:36 +00:00
|
|
|
|
2017-11-22 09:08:35 +00:00
|
|
|
model = 'model/main_clnf_general.txt'; % Trained on in the wild and multi-pie data (a CLNF model)
|
|
|
|
|
|
|
|
% Uncomment the below models if you want to try them
|
|
|
|
%model = 'model/main_clnf_wild.txt'; % Trained on in-the-wild data only
|
|
|
|
|
|
|
|
%model = 'model/main_clm_general.txt'; % Trained on in the wild and multi-pie data (less accurate SVR/CLM model)
|
|
|
|
%model = 'model/main_clm_wild.txt'; % Trained on in-the-wild
|
2016-04-28 19:40:36 +00:00
|
|
|
|
2017-11-22 17:53:15 +00:00
|
|
|
% Create a command that will run the tracker on set of videos and display the output
|
2018-02-23 08:25:19 +00:00
|
|
|
command = sprintf('%s -mloc "%s" -verbose ', executable, model);
|
2016-04-28 19:40:36 +00:00
|
|
|
|
|
|
|
% add all videos to single argument list (so as not to load the model anew
|
|
|
|
% for every video)
|
|
|
|
for i=1:numel(in_files)
|
2017-11-22 09:08:35 +00:00
|
|
|
inputFile = ['../../samples/', in_files(i).name];
|
2016-04-28 19:40:36 +00:00
|
|
|
command = cat(2, command, [' -f "' inputFile '" ']);
|
|
|
|
end
|
|
|
|
|
2017-11-22 09:08:35 +00:00
|
|
|
% Call the executable
|
2017-01-04 22:32:38 +00:00
|
|
|
if(isunix)
|
|
|
|
unix(command);
|
|
|
|
else
|
|
|
|
dos(command);
|
|
|
|
end
|