2016-04-28 21:40:36 +02:00
|
|
|
clear
|
2017-01-04 23:32:38 +01:00
|
|
|
if(isunix)
|
|
|
|
executable = '"../../build/bin/FaceLandmarkImg"';
|
|
|
|
else
|
|
|
|
executable = '"../../x64/Release/FaceLandmarkImg.exe"';
|
|
|
|
end
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-05-09 03:36:23 +02:00
|
|
|
in_dir = '../../samples/';
|
2016-04-28 21:40:36 +02:00
|
|
|
out_dir = './demo_img/';
|
|
|
|
|
2017-11-22 18:53:15 +01:00
|
|
|
model = 'model/main_clnf_general.txt'; % Trained on in the wild and multi-pie data (a CLNF model)
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-11-22 18:53:15 +01:00
|
|
|
% Uncomment the below models if you want to try them
|
|
|
|
%model = 'model/main_clnf_wild.txt'; % Trained on in-the-wild data only
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-11-22 18:53:15 +01:00
|
|
|
%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 21:40:36 +02:00
|
|
|
|
2017-11-22 18:53:15 +01:00
|
|
|
% Load images (-fdir), output images and all the features (-out_dir), use a
|
|
|
|
% user specified model (-mloc), and visualize everything (-verbose)
|
|
|
|
command = sprintf('%s -fdir "%s" -out_dir "%s" -verbose -mloc "%s" ', executable, in_dir, out_dir, model);
|
2016-04-28 21:40:36 +02:00
|
|
|
|
|
|
|
% Demonstrates the multi-hypothesis slow landmark detection (more accurate
|
|
|
|
% when dealing with non-frontal faces and less accurate face detections)
|
|
|
|
% Comment to skip this functionality
|
2017-11-22 21:20:22 +01:00
|
|
|
command = cat(2, command, ' -wild -multi_view 1');
|
2016-04-28 21:40:36 +02:00
|
|
|
|
2017-01-04 23:32:38 +01:00
|
|
|
if(isunix)
|
|
|
|
unix(command);
|
|
|
|
else
|
|
|
|
dos(command);
|
|
|
|
end
|