Same fix for multi-face case.

This commit is contained in:
Tadas Baltrusaitis 2017-11-22 09:08:35 +00:00
parent 7e16619529
commit bafbfdca29
2 changed files with 16 additions and 24 deletions

View file

@ -1,3 +1,5 @@
% A demo how to run a multi-face face tracker
clear;
if(isunix)
@ -13,37 +15,27 @@ if(~exist(output, 'file'))
end
in_files = dir('../../samples/multi_face.avi');
% some parameters
verbose = true;
% Trained on in the wild and multi-pie data (less accurate CLM model)
%model = 'model/main_clm_general.txt';
% Trained on in-the-wild
%model = 'model/main_clm_wild.txt';
model = 'model/main_clnf_general.txt'; % Trained on in the wild and multi-pie data (a CLNF model)
% Trained on in the wild and multi-pie data (more accurate CLNF model)
model = 'model/main_clnf_general.txt';
% Trained on in-the-wild
%model = 'model/main_clnf_wild.txt';
% 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
% Create a command that will run the tracker on set of videos,
% and visualize the output (-verbose)
command = sprintf('%s -mloc "%s" -verbose', executable, model);
command = executable;
command = cat(2, command, [' -mloc "', model, '"']);
% add all videos to single argument list (so as not to load the model anew
% for every video)
for i=1:numel(in_files)
inputFile = ['../../samples/', in_files(i).name];
[~, name, ~] = fileparts(inputFile);
inputFile = ['../../samples/', in_files(i).name];
command = cat(2, command, [' -f "' inputFile '" ']);
if(verbose)
outputVideo = ['"' output name '.avi' '"'];
command = cat(2, command, [' -ov ' outputVideo]);
end
end
% Call the executable
if(isunix)
unix(command);
else

View file

@ -1,3 +1,5 @@
% A demo how to run a single-face face tracker
clear
if(isunix)
@ -5,8 +7,6 @@ if(isunix)
else
executable = '"../../x64/Release/FaceLandmarkVid.exe"';
end
output = './demo_vids/';
in_files = dir('../../samples/*.wmv');
in_files = cat(1, in_files, dir('../../samples/*.avi'));