2016-06-03 13:33:04 +00:00
|
|
|
clear
|
2018-02-08 19:44:51 +00:00
|
|
|
if(isunix)
|
|
|
|
features_exe = '"../../../build/bin/FeatureExtraction"';
|
|
|
|
else
|
|
|
|
features_exe = '"../../../x64/Release/FeatureExtraction.exe"';
|
|
|
|
end
|
2016-06-03 13:33:04 +00:00
|
|
|
|
2018-02-08 19:44:51 +00:00
|
|
|
find_UNBC;
|
|
|
|
UNBC_dir = [UNBC_dir, '/images/'];
|
|
|
|
output_dir = 'E:\datasets\face_datasets_processed\unbc';
|
2016-06-03 13:33:04 +00:00
|
|
|
|
|
|
|
% Go two levels deep
|
2018-02-08 19:44:51 +00:00
|
|
|
unbc_dirs = dir(UNBC_dir);
|
2016-06-03 13:33:04 +00:00
|
|
|
unbc_dirs = unbc_dirs(3:end);
|
|
|
|
|
|
|
|
parfor f1=1:numel(unbc_dirs)
|
|
|
|
|
2018-02-08 19:44:51 +00:00
|
|
|
unbc_dirs_level_2 = dir([UNBC_dir, unbc_dirs(f1).name]);
|
2016-06-03 13:33:04 +00:00
|
|
|
unbc_dirs_level_2 = unbc_dirs_level_2(3:end);
|
|
|
|
|
|
|
|
for f2=1:numel(unbc_dirs_level_2)
|
|
|
|
|
2018-02-08 19:44:51 +00:00
|
|
|
if(~isdir([UNBC_dir, unbc_dirs(f1).name, '/', unbc_dirs_level_2(f2).name]))
|
2016-06-03 13:33:04 +00:00
|
|
|
continue;
|
|
|
|
end
|
|
|
|
|
2018-02-08 19:44:51 +00:00
|
|
|
input_dir = [UNBC_dir, unbc_dirs(f1).name, '/', unbc_dirs_level_2(f2).name];
|
2016-06-03 13:33:04 +00:00
|
|
|
|
|
|
|
name = [unbc_dirs(f1).name, '_', unbc_dirs_level_2(f2).name];
|
|
|
|
|
2018-02-08 19:44:51 +00:00
|
|
|
command = sprintf('%s -fdir "%s" -out_dir "%s" -of %s -hogalign -pdmparams -verbose', features_exe, input_dir, output_dir, name );
|
2016-06-03 13:33:04 +00:00
|
|
|
|
|
|
|
dos(command);
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|