FERA experiments as well.
This commit is contained in:
parent
9fec91e997
commit
1f3d4e941d
1 changed files with 5 additions and 12 deletions
|
@ -5,10 +5,6 @@ find_FERA2011;
|
||||||
|
|
||||||
out_loc = './out_fera/';
|
out_loc = './out_fera/';
|
||||||
|
|
||||||
if(~exist(out_loc, 'dir'))
|
|
||||||
mkdir(out_loc);
|
|
||||||
end
|
|
||||||
|
|
||||||
%%
|
%%
|
||||||
if(isunix)
|
if(isunix)
|
||||||
executable = '"../../build/bin/FeatureExtraction"';
|
executable = '"../../build/bin/FeatureExtraction"';
|
||||||
|
@ -18,20 +14,17 @@ end
|
||||||
|
|
||||||
fera_dirs = dir([FERA2011_dir, 'train*']);
|
fera_dirs = dir([FERA2011_dir, 'train*']);
|
||||||
|
|
||||||
parfor f1=1:numel(fera_dirs)
|
for f1=1:numel(fera_dirs)
|
||||||
|
|
||||||
vid_files = dir([FERA2011_dir, fera_dirs(f1).name, '/*.avi']);
|
vid_files = dir([FERA2011_dir, fera_dirs(f1).name, '/*.avi']);
|
||||||
|
|
||||||
for v=1:numel(vid_files)
|
for v=1:numel(vid_files)
|
||||||
|
|
||||||
command = [executable ' -asvid -q -no2Dfp -no3Dfp -noMparams -noPose -noGaze -au_static '];
|
command = [executable ' -aus -au_static '];
|
||||||
|
|
||||||
curr_vid = [FERA2011_dir, fera_dirs(f1).name, '/', vid_files(v).name];
|
curr_vid = [FERA2011_dir, fera_dirs(f1).name, '/', vid_files(v).name];
|
||||||
|
|
||||||
[~,name,~] = fileparts(curr_vid);
|
command = cat(2, command, [' -f "' curr_vid '" -out_dir "' out_loc '"']);
|
||||||
output_file = [out_loc name '.au.txt'];
|
|
||||||
|
|
||||||
command = cat(2, command, [' -f "' curr_vid '" -of "' output_file '"']);
|
|
||||||
|
|
||||||
if(isunix)
|
if(isunix)
|
||||||
unix(command, '-echo');
|
unix(command, '-echo');
|
||||||
|
@ -50,7 +43,7 @@ for i=1:numel(filenames)
|
||||||
end
|
end
|
||||||
|
|
||||||
%% Identifying which column IDs correspond to which AU
|
%% Identifying which column IDs correspond to which AU
|
||||||
tab = readtable([out_loc, 'train_001.au.txt']);
|
tab = readtable([out_loc, 'train_001.csv']);
|
||||||
column_names = tab.Properties.VariableNames;
|
column_names = tab.Properties.VariableNames;
|
||||||
|
|
||||||
% As there are both classes and intensities list and evaluate both of them
|
% As there are both classes and intensities list and evaluate both of them
|
||||||
|
@ -79,7 +72,7 @@ preds_all_class = [];
|
||||||
|
|
||||||
for i=1:numel(filenames)
|
for i=1:numel(filenames)
|
||||||
|
|
||||||
fname = dir([out_loc, '/*', filenames{i}, '.au.txt']);
|
fname = dir([out_loc, '/*', filenames{i}, '.csv']);
|
||||||
fname = fname(1).name;
|
fname = fname(1).name;
|
||||||
|
|
||||||
preds = dlmread([out_loc '/' fname], ',', 1, 0);
|
preds = dlmread([out_loc '/' fname], ',', 1, 0);
|
||||||
|
|
Loading…
Reference in a new issue