BP4D experiments.
This commit is contained in:
parent
077a8489bc
commit
8e12af6c44
2 changed files with 11 additions and 24 deletions
|
@ -1,5 +1,5 @@
|
||||||
AU1 class, Precision - 0.555, Recall - 0.533, F1 - 0.544
|
AU1 class, Precision - 0.555, Recall - 0.533, F1 - 0.544
|
||||||
AU2 class, Precision - 0.403, Recall - 0.440, F1 - 0.420
|
AU2 class, Precision - 0.403, Recall - 0.439, F1 - 0.420
|
||||||
AU4 class, Precision - 0.491, Recall - 0.513, F1 - 0.502
|
AU4 class, Precision - 0.491, Recall - 0.513, F1 - 0.502
|
||||||
AU6 class, Precision - 0.741, Recall - 0.776, F1 - 0.758
|
AU6 class, Precision - 0.741, Recall - 0.776, F1 - 0.758
|
||||||
AU7 class, Precision - 0.764, Recall - 0.727, F1 - 0.745
|
AU7 class, Precision - 0.764, Recall - 0.727, F1 - 0.745
|
||||||
|
|
|
@ -4,10 +4,6 @@ find_BP4D;
|
||||||
BP4D_dir = [BP4D_dir, '../BP4D-training/'];
|
BP4D_dir = [BP4D_dir, '../BP4D-training/'];
|
||||||
out_loc = './out_bp4d/';
|
out_loc = './out_bp4d/';
|
||||||
|
|
||||||
if(~exist(out_loc, 'dir'))
|
|
||||||
mkdir(out_loc);
|
|
||||||
end
|
|
||||||
|
|
||||||
%%
|
%%
|
||||||
executable = '"../../x64/Release/FeatureExtraction.exe"';
|
executable = '"../../x64/Release/FeatureExtraction.exe"';
|
||||||
|
|
||||||
|
@ -23,7 +19,7 @@ new_bp4d_dirs = {};
|
||||||
for i = 1:numel(bp4d_dirs)
|
for i = 1:numel(bp4d_dirs)
|
||||||
dirs = dir([BP4D_dir, '/', bp4d_dirs{i}, '/T*']);
|
dirs = dir([BP4D_dir, '/', bp4d_dirs{i}, '/T*']);
|
||||||
|
|
||||||
tmp_dir = [BP4D_dir, '/../tmp/', bp4d_dirs{i}, '/'];
|
tmp_dir = [BP4D_dir, '/../tmp/', bp4d_dirs{i}];
|
||||||
new_bp4d_dirs = cat(1, new_bp4d_dirs, tmp_dir);
|
new_bp4d_dirs = cat(1, new_bp4d_dirs, tmp_dir);
|
||||||
|
|
||||||
if(~exist(tmp_dir, 'file'))
|
if(~exist(tmp_dir, 'file'))
|
||||||
|
@ -51,16 +47,9 @@ for i = 1:numel(bp4d_dirs)
|
||||||
end
|
end
|
||||||
%%
|
%%
|
||||||
|
|
||||||
parfor f1=1:numel(new_bp4d_dirs)
|
for f1=1:numel(new_bp4d_dirs)
|
||||||
|
|
||||||
command = [executable ' -asvid -no2Dfp -no3Dfp -noMparams -noPose -noGaze '];
|
|
||||||
|
|
||||||
[f,~,~] = fileparts(new_bp4d_dirs{f1});
|
|
||||||
[~,f,~] = fileparts(f);
|
|
||||||
output_file = [out_loc f '.au.txt'];
|
|
||||||
|
|
||||||
command = cat(2, command, [' -fdir "' new_bp4d_dirs{f1} '" -of "' output_file '"']);
|
|
||||||
|
|
||||||
|
command = sprintf('%s -aus -fdir "%s" -out_dir "%s"', executable, new_bp4d_dirs{f1}, out_loc);
|
||||||
dos(command);
|
dos(command);
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -76,7 +65,7 @@ aus_BP4D = [1, 2, 4, 6, 7, 10, 12, 14, 15, 17, 23];
|
||||||
labels_gt = cat(1, labels_gt{:});
|
labels_gt = cat(1, labels_gt{:});
|
||||||
|
|
||||||
%% Identifying which column IDs correspond to which AU
|
%% Identifying which column IDs correspond to which AU
|
||||||
tab = readtable([out_loc, bp4d_dirs{1}, '.au.txt']);
|
tab = readtable([out_loc, bp4d_dirs{1}, '.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
|
||||||
|
@ -110,10 +99,9 @@ preds_all_class = [];
|
||||||
|
|
||||||
for i=1:numel(new_bp4d_dirs)
|
for i=1:numel(new_bp4d_dirs)
|
||||||
|
|
||||||
[f,~,~] = fileparts(new_bp4d_dirs{i});
|
[~,f,~] = fileparts(new_bp4d_dirs{i});
|
||||||
[~,f,~] = fileparts(f);
|
|
||||||
|
|
||||||
fname = [out_loc, f, '.au.txt'];
|
fname = [out_loc, f, '.csv'];
|
||||||
preds = dlmread(fname, ',', 1, 0);
|
preds = dlmread(fname, ',', 1, 0);
|
||||||
|
|
||||||
|
|
||||||
|
@ -157,7 +145,7 @@ valid_ids = cat(1, valid_ids{:});
|
||||||
labels_gt = cat(1, labels_gt{:});
|
labels_gt = cat(1, labels_gt{:});
|
||||||
|
|
||||||
%% Identifying which column IDs correspond to which AU
|
%% Identifying which column IDs correspond to which AU
|
||||||
tab = readtable([out_loc, bp4d_dirs{1}, '.au.txt']);
|
tab = readtable([out_loc, bp4d_dirs{1}, '.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
|
||||||
|
@ -184,10 +172,9 @@ preds_all_int = [];
|
||||||
|
|
||||||
for i=1:numel(new_bp4d_dirs)
|
for i=1:numel(new_bp4d_dirs)
|
||||||
|
|
||||||
[f,~,~] = fileparts(new_bp4d_dirs{i});
|
[~,f,~] = fileparts(new_bp4d_dirs{i});
|
||||||
[~,f,~] = fileparts(f);
|
|
||||||
|
|
||||||
fname = [out_loc, f, '.au.txt'];
|
fname = [out_loc, f, '.csv'];
|
||||||
preds = dlmread(fname, ',', 1, 0);
|
preds = dlmread(fname, ',', 1, 0);
|
||||||
|
|
||||||
% Read all of the intensity AUs
|
% Read all of the intensity AUs
|
||||||
|
|
Loading…
Reference in a new issue