2016-06-03 15:33:04 +02:00
|
|
|
clear
|
2018-02-07 21:37:43 +01:00
|
|
|
if(isunix)
|
|
|
|
features_exe = '"../../../build/bin/FeatureExtraction"';
|
|
|
|
else
|
|
|
|
features_exe = '"../../../x64/Release/FeatureExtraction.exe"';
|
|
|
|
end
|
|
|
|
ck_loc = 'E:\Datasets\ck+\cohn-kanade-images\';
|
2016-06-03 15:33:04 +02:00
|
|
|
|
2018-02-07 21:37:43 +01:00
|
|
|
out_loc = 'E:\datasets\face_datasets_processed/ck+';
|
2016-06-03 15:33:04 +02:00
|
|
|
|
|
|
|
% Go two levels deep
|
|
|
|
ck_dirs = dir(ck_loc);
|
|
|
|
ck_dirs = ck_dirs(3:end);
|
|
|
|
|
|
|
|
parfor f1=1:numel(ck_dirs)
|
|
|
|
|
|
|
|
ck_dirs_level_2 = dir([ck_loc, ck_dirs(f1).name]);
|
|
|
|
ck_dirs_level_2 = ck_dirs_level_2(3:end);
|
|
|
|
|
|
|
|
for f2=1:numel(ck_dirs_level_2)
|
|
|
|
|
|
|
|
if(~isdir([ck_loc, ck_dirs(f1).name, '/', ck_dirs_level_2(f2).name]))
|
|
|
|
continue;
|
|
|
|
end
|
|
|
|
|
|
|
|
curr_vid = [ck_loc, ck_dirs(f1).name, '/', ck_dirs_level_2(f2).name];
|
|
|
|
|
|
|
|
name = [ck_dirs(f1).name, '_', ck_dirs_level_2(f2).name];
|
|
|
|
|
2018-02-07 21:37:43 +01:00
|
|
|
command = sprintf('%s -fdir "%s" -out_dir "%s" -of %s -hogalign -pdmparams', features_exe, curr_vid, out_loc, name);
|
2016-06-03 15:33:04 +02:00
|
|
|
|
|
|
|
dos(command);
|
|
|
|
|
|
|
|
end
|
|
|
|
|
|
|
|
end
|