diff --git a/.gitignore b/.gitignore index 9bc19f9d..5a58c162 100644 --- a/.gitignore +++ b/.gitignore @@ -85,7 +85,6 @@ matlab_runners/Feature Point Experiments/300VW_experiment/ gui/OpenFaceOffline/obj/ gui/OpenFaceDemo/obj/ exe/FeatureExtraction/processed/ -matlab_runners/ exe/FaceLandmarkVidMulti/processed/ lib/3rdParty/CameraEnumerator/Release/ lib/local/CppInerop/Release/ diff --git a/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_class.txt b/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_class.txt index d942b128..a6611a4b 100644 --- a/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_class.txt +++ b/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_class.txt @@ -1,11 +1,11 @@ -AU1 class, Precision - 0.520, Recall - 0.519, F1 - 0.519 -AU2 class, Precision - 0.430, Recall - 0.409, F1 - 0.419 -AU4 class, Precision - 0.549, Recall - 0.495, F1 - 0.521 -AU6 class, Precision - 0.758, Recall - 0.773, F1 - 0.765 -AU7 class, Precision - 0.748, Recall - 0.696, F1 - 0.721 -AU10 class, Precision - 0.866, Recall - 0.838, F1 - 0.852 -AU12 class, Precision - 0.906, Recall - 0.812, F1 - 0.856 -AU14 class, Precision - 0.562, Recall - 0.763, F1 - 0.647 -AU15 class, Precision - 0.396, Recall - 0.436, F1 - 0.415 +AU1 class, Precision - 0.520, Recall - 0.518, F1 - 0.519 +AU2 class, Precision - 0.433, Recall - 0.412, F1 - 0.422 +AU4 class, Precision - 0.547, Recall - 0.495, F1 - 0.520 +AU6 class, Precision - 0.758, Recall - 0.773, F1 - 0.766 +AU7 class, Precision - 0.748, Recall - 0.697, F1 - 0.721 +AU10 class, Precision - 0.866, Recall - 0.840, F1 - 0.852 +AU12 class, Precision - 0.907, Recall - 0.812, F1 - 0.857 +AU14 class, Precision - 0.562, Recall - 0.761, F1 - 0.647 +AU15 class, Precision - 0.399, Recall - 0.437, F1 - 0.417 AU17 class, Precision - 0.634, Recall - 0.603, F1 - 0.618 -AU23 class, Precision - 0.342, Recall - 0.613, F1 - 0.439 +AU23 class, Precision - 0.341, Recall - 0.609, F1 - 0.438 diff --git a/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_int.txt b/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_int.txt index 62ddd005..693e79f6 100644 --- a/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_int.txt +++ b/matlab_runners/Action Unit Experiments/results/BP4D_valid_res_int.txt @@ -2,4 +2,4 @@ AU6 results - rms 0.846, corr 0.786, ccc - 0.752 AU10 results - rms 1.022, corr 0.741, ccc - 0.695 AU12 results - rms 0.790, corr 0.870, ccc - 0.847 AU14 results - rms 1.119, corr 0.522, ccc - 0.480 -AU17 results - rms 0.796, corr 0.627, ccc - 0.540 +AU17 results - rms 0.795, corr 0.628, ccc - 0.541 diff --git a/matlab_runners/Action Unit Experiments/results/Bosphorus_res_class.txt b/matlab_runners/Action Unit Experiments/results/Bosphorus_res_class.txt index a8c9f964..3189742e 100644 --- a/matlab_runners/Action Unit Experiments/results/Bosphorus_res_class.txt +++ b/matlab_runners/Action Unit Experiments/results/Bosphorus_res_class.txt @@ -1,17 +1,17 @@ -AU1 class, Precision - 0.335, Recall - 0.812, F1 - 0.474 -AU2 class, Precision - 0.286, Recall - 0.797, F1 - 0.421 -AU4 class, Precision - 0.503, Recall - 0.822, F1 - 0.624 -AU5 class, Precision - 0.352, Recall - 0.853, F1 - 0.499 -AU6 class, Precision - 0.374, Recall - 0.817, F1 - 0.513 -AU7 class, Precision - 0.795, Recall - 0.777, F1 - 0.786 -AU9 class, Precision - 0.402, Recall - 0.960, F1 - 0.566 -AU10 class, Precision - 0.296, Recall - 0.780, F1 - 0.429 -AU12 class, Precision - 0.709, Recall - 0.849, F1 - 0.772 -AU14 class, Precision - 0.187, Recall - 0.863, F1 - 0.308 -AU15 class, Precision - 0.160, Recall - 0.908, F1 - 0.271 -AU17 class, Precision - 0.300, Recall - 0.912, F1 - 0.451 -AU20 class, Precision - 0.114, Recall - 0.912, F1 - 0.203 -AU23 class, Precision - 0.114, Recall - 0.815, F1 - 0.199 -AU25 class, Precision - 0.934, Recall - 0.831, F1 - 0.879 -AU26 class, Precision - 0.385, Recall - 0.803, F1 - 0.520 -AU45 class, Precision - 0.376, Recall - 0.819, F1 - 0.515 +AU1 class, Precision - 0.321, Recall - 0.832, F1 - 0.464 +AU2 class, Precision - 0.287, Recall - 0.791, F1 - 0.421 +AU4 class, Precision - 0.459, Recall - 0.849, F1 - 0.596 +AU5 class, Precision - 0.356, Recall - 0.856, F1 - 0.503 +AU6 class, Precision - 0.363, Recall - 0.817, F1 - 0.502 +AU7 class, Precision - 0.805, Recall - 0.769, F1 - 0.787 +AU9 class, Precision - 0.407, Recall - 0.966, F1 - 0.573 +AU10 class, Precision - 0.291, Recall - 0.784, F1 - 0.424 +AU12 class, Precision - 0.720, Recall - 0.847, F1 - 0.778 +AU14 class, Precision - 0.184, Recall - 0.877, F1 - 0.305 +AU15 class, Precision - 0.150, Recall - 0.894, F1 - 0.257 +AU17 class, Precision - 0.274, Recall - 0.915, F1 - 0.422 +AU20 class, Precision - 0.103, Recall - 0.868, F1 - 0.184 +AU23 class, Precision - 0.103, Recall - 0.830, F1 - 0.183 +AU25 class, Precision - 0.937, Recall - 0.830, F1 - 0.880 +AU26 class, Precision - 0.375, Recall - 0.798, F1 - 0.510 +AU45 class, Precision - 0.371, Recall - 0.822, F1 - 0.511 diff --git a/matlab_runners/Action Unit Experiments/results/Bosphorus_res_int.txt b/matlab_runners/Action Unit Experiments/results/Bosphorus_res_int.txt index fa817c35..d01ea89e 100644 --- a/matlab_runners/Action Unit Experiments/results/Bosphorus_res_int.txt +++ b/matlab_runners/Action Unit Experiments/results/Bosphorus_res_int.txt @@ -1,17 +1,17 @@ -AU1 intensity, Corr - 0.688, RMS - 0.826, CCC - 0.585 -AU2 intensity, Corr - 0.659, RMS - 0.865, CCC - 0.598 -AU4 intensity, Corr - 0.778, RMS - 0.651, CCC - 0.744 -AU5 intensity, Corr - 0.751, RMS - 0.748, CCC - 0.683 -AU6 intensity, Corr - 0.556, RMS - 0.776, CCC - 0.524 -AU7 intensity, Corr - 0.833, RMS - 0.742, CCC - 0.816 -AU9 intensity, Corr - 0.764, RMS - 0.607, CCC - 0.710 -AU10 intensity, Corr - 0.479, RMS - 0.812, CCC - 0.439 -AU12 intensity, Corr - 0.820, RMS - 0.689, CCC - 0.782 -AU14 intensity, Corr - 0.345, RMS - 0.936, CCC - 0.268 -AU15 intensity, Corr - 0.511, RMS - 0.763, CCC - 0.391 -AU17 intensity, Corr - 0.566, RMS - 0.935, CCC - 0.476 -AU20 intensity, Corr - 0.440, RMS - 0.861, CCC - 0.305 -AU23 intensity, Corr - 0.350, RMS - 0.677, CCC - 0.284 -AU25 intensity, Corr - 0.790, RMS - 0.928, CCC - 0.755 -AU26 intensity, Corr - 0.518, RMS - 0.976, CCC - 0.452 -AU45 intensity, Corr - 0.853, RMS - 0.620, CCC - 0.812 +AU1 intensity, Corr - 0.683, RMS - 0.837, CCC - 0.579 +AU2 intensity, Corr - 0.664, RMS - 0.830, CCC - 0.613 +AU4 intensity, Corr - 0.770, RMS - 0.676, CCC - 0.728 +AU5 intensity, Corr - 0.748, RMS - 0.747, CCC - 0.681 +AU6 intensity, Corr - 0.555, RMS - 0.778, CCC - 0.523 +AU7 intensity, Corr - 0.830, RMS - 0.748, CCC - 0.812 +AU9 intensity, Corr - 0.756, RMS - 0.619, CCC - 0.700 +AU10 intensity, Corr - 0.473, RMS - 0.823, CCC - 0.433 +AU12 intensity, Corr - 0.820, RMS - 0.689, CCC - 0.780 +AU14 intensity, Corr - 0.348, RMS - 0.964, CCC - 0.263 +AU15 intensity, Corr - 0.480, RMS - 0.790, CCC - 0.364 +AU17 intensity, Corr - 0.557, RMS - 0.980, CCC - 0.454 +AU20 intensity, Corr - 0.426, RMS - 0.889, CCC - 0.290 +AU23 intensity, Corr - 0.359, RMS - 0.658, CCC - 0.295 +AU25 intensity, Corr - 0.794, RMS - 0.931, CCC - 0.750 +AU26 intensity, Corr - 0.520, RMS - 0.976, CCC - 0.452 +AU45 intensity, Corr - 0.854, RMS - 0.611, CCC - 0.816 diff --git a/matlab_runners/Action Unit Experiments/results/DISFA_valid_res.txt b/matlab_runners/Action Unit Experiments/results/DISFA_valid_res.txt index 95db194e..25f8789e 100644 --- a/matlab_runners/Action Unit Experiments/results/DISFA_valid_res.txt +++ b/matlab_runners/Action Unit Experiments/results/DISFA_valid_res.txt @@ -1,12 +1,12 @@ -AU1 results - corr 0.848, rms 0.384, ccc - 0.826 -AU2 results - corr 0.758, rms 0.446, ccc - 0.659 -AU4 results - corr 0.868, rms 0.576, ccc - 0.840 -AU5 results - corr 0.768, rms 0.173, ccc - 0.732 -AU6 results - corr 0.724, rms 0.582, ccc - 0.684 -AU9 results - corr 0.734, rms 0.392, ccc - 0.652 -AU12 results - corr 0.868, rms 0.501, ccc - 0.854 -AU15 results - corr 0.751, rms 0.269, ccc - 0.718 -AU17 results - corr 0.610, rms 0.568, ccc - 0.527 -AU20 results - corr 0.623, rms 0.310, ccc - 0.585 -AU25 results - corr 0.929, rms 0.497, ccc - 0.919 -AU26 results - corr 0.818, rms 0.436, ccc - 0.788 +AU1 results - corr 0.846, rms 0.386, ccc - 0.824 +AU2 results - corr 0.766, rms 0.441, ccc - 0.668 +AU4 results - corr 0.870, rms 0.573, ccc - 0.843 +AU5 results - corr 0.767, rms 0.174, ccc - 0.731 +AU6 results - corr 0.725, rms 0.580, ccc - 0.685 +AU9 results - corr 0.737, rms 0.391, ccc - 0.653 +AU12 results - corr 0.866, rms 0.504, ccc - 0.852 +AU15 results - corr 0.753, rms 0.268, ccc - 0.721 +AU17 results - corr 0.613, rms 0.568, ccc - 0.529 +AU20 results - corr 0.588, rms 0.326, ccc - 0.559 +AU25 results - corr 0.929, rms 0.495, ccc - 0.919 +AU26 results - corr 0.814, rms 0.440, ccc - 0.785 diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/401.mat b/matlab_runners/Feature Point Experiments/300VW_extra/401.mat new file mode 100644 index 00000000..204763ac Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/401.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/402.mat b/matlab_runners/Feature Point Experiments/300VW_extra/402.mat new file mode 100644 index 00000000..eb9ea858 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/402.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/410.mat b/matlab_runners/Feature Point Experiments/300VW_extra/410.mat new file mode 100644 index 00000000..d6405c9d Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/410.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/411.mat b/matlab_runners/Feature Point Experiments/300VW_extra/411.mat new file mode 100644 index 00000000..7047b286 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/411.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/508.mat b/matlab_runners/Feature Point Experiments/300VW_extra/508.mat new file mode 100644 index 00000000..70b09e44 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/508.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/518.mat b/matlab_runners/Feature Point Experiments/300VW_extra/518.mat new file mode 100644 index 00000000..42213af6 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/518.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/529.mat b/matlab_runners/Feature Point Experiments/300VW_extra/529.mat new file mode 100644 index 00000000..da78b24c Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/529.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/530.mat b/matlab_runners/Feature Point Experiments/300VW_extra/530.mat new file mode 100644 index 00000000..98921205 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/530.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/531.mat b/matlab_runners/Feature Point Experiments/300VW_extra/531.mat new file mode 100644 index 00000000..61da964b Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/531.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/533.mat b/matlab_runners/Feature Point Experiments/300VW_extra/533.mat new file mode 100644 index 00000000..5d340b51 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/533.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/540.mat b/matlab_runners/Feature Point Experiments/300VW_extra/540.mat new file mode 100644 index 00000000..fa8d1e35 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/540.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/547.mat b/matlab_runners/Feature Point Experiments/300VW_extra/547.mat new file mode 100644 index 00000000..1ad41fa8 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/547.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/548.mat b/matlab_runners/Feature Point Experiments/300VW_extra/548.mat new file mode 100644 index 00000000..7baae819 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/548.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/551.mat b/matlab_runners/Feature Point Experiments/300VW_extra/551.mat new file mode 100644 index 00000000..1ac79563 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/551.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/553.mat b/matlab_runners/Feature Point Experiments/300VW_extra/553.mat new file mode 100644 index 00000000..788635bc Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/553.mat differ diff --git a/matlab_runners/Feature Point Experiments/300VW_extra/557.mat b/matlab_runners/Feature Point Experiments/300VW_extra/557.mat new file mode 100644 index 00000000..a6ed1629 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/300VW_extra/557.mat differ diff --git a/matlab_runners/Feature Point Experiments/Compute_300VW_errors.m b/matlab_runners/Feature Point Experiments/Compute_300VW_errors.m new file mode 100644 index 00000000..4aaba830 --- /dev/null +++ b/matlab_runners/Feature Point Experiments/Compute_300VW_errors.m @@ -0,0 +1,141 @@ +%% Gather predictions and ground truth +if(exist('D:\Datasets\300VW_Dataset_2015_12_14\300VW_Dataset_2015_12_14/', 'file')) + database_root = 'D:\Datasets\300VW_Dataset_2015_12_14\300VW_Dataset_2015_12_14/'; +elseif(exist('E:\datasets\300VW\300VW_Dataset_2015_12_14', 'file')) + database_root = 'E:\datasets\300VW\300VW_Dataset_2015_12_14'; +elseif(exist('/multicomp/datasets/300VW_Dataset_2015_12_14/', 'file')) + database_root = '/multicomp/datasets/300VW_Dataset_2015_12_14/'; +else + fprintf('Could not find the dataset'); + return; +end + +cat_1 = [ 114, 124, 125, 126, 150, 158, 401, 402, 505, 506, 507, 508, 509, 510, 511, 514, 515, 518, 519, 520, 521, 522, 524, 525, 537, 538, 540, 541, 546, 547, 548]; +cat_2 = [203, 208, 211, 212, 213, 214, 218, 224, 403, 404, 405, 406, 407, 408, 409, 412, 550, 551, 553]; +cat_3 = [410, 411, 516, 517, 526, 528, 529, 530, 531, 533, 557, 558, 559, 562]; +in_dirs = cat(2, cat_1, cat_2, cat_3); + +d_loc_ceclm = '300VW_experiment/ceclm/'; +d_loc_clnf = '300VW_experiment/clnf/'; +extra_dir = '300VW_extra'; + +files_pred = dir([d_loc_ceclm, '/*.csv']); +preds_all_ceclm = []; +preds_all_clnf = []; +confs_ceclm = []; +confs_clnf = []; +gts_all = []; + +cat_1_ids = logical([]); +cat_2_ids = logical([]); +cat_3_ids = logical([]); + +for i = 1:numel(files_pred) + [~, name, ~] = fileparts(files_pred(i).name); + + fname = [d_loc_ceclm, files_pred(i).name]; + if(i == 1) + % First read in the column names + tab = readtable(fname); + column_names = tab.Properties.VariableNames; + + confidence_id = cellfun(@(x) ~isempty(x) && x==1, strfind(column_names, 'confidence')); + x_ids = cellfun(@(x) ~isempty(x) && x==1, strfind(column_names, 'x_')); + y_ids = cellfun(@(x) ~isempty(x) && x==1, strfind(column_names, 'y_')); + end + + all_params = dlmread(fname, ',', 1, 0); + + xs = all_params(:, x_ids); + ys = all_params(:, y_ids); + conf_ceclm = all_params(:, confidence_id); + pred_landmarks_ceclm = zeros([size(xs,2), 2, size(xs,1)]); + pred_landmarks_ceclm(:,1,:) = xs'; + pred_landmarks_ceclm(:,2,:) = ys'; + + fname = [d_loc_clnf, files_pred(i).name]; + all_params = dlmread(fname, ',', 1, 0); + + xs = all_params(:, x_ids); + ys = all_params(:, y_ids); + conf_clnf = all_params(:, confidence_id); + pred_landmarks_clnf = zeros([size(xs,2), 2, size(xs,1)]); + pred_landmarks_clnf(:,1,:) = xs'; + pred_landmarks_clnf(:,2,:) = ys'; + + fps_all = dir([database_root, '/', name, '/annot/*.pts']); + gt_landmarks = zeros(size(pred_landmarks_ceclm)); + for k = 1:size(fps_all) + gt_landmarks_frame = dlmread([database_root, '/', name, '/annot/', fps_all(k).name], ' ', 'A4..B71'); + gt_landmarks(:,:,k) = gt_landmarks_frame; + end + + if(size(pred_landmarks_ceclm,3) ~= size(fps_all) | size(pred_landmarks_clnf,3) ~= size(fps_all)) + fprintf('something wrong at vid %s, fps - %d, ceclm size - %d, clnf size - %d\n', name, size(fps_all,1), size(pred_landmarks_ceclm,3), size(pred_landmarks_clnf,3)); + end + + % Remove unreliable frames + if(exist([extra_dir, '/', name, '.mat'], 'file')) + load([extra_dir, '/', name, '.mat']); + gt_landmarks(:,:,int32(error)) = []; + pred_landmarks_ceclm(:,:,int32(error))=[]; + pred_landmarks_clnf(:,:,int32(error))=[]; + conf_ceclm(int32(error)) = []; + conf_clnf(int32(error)) = []; + end + + preds_all_ceclm = cat(3, preds_all_ceclm, pred_landmarks_ceclm); + preds_all_clnf = cat(3, preds_all_clnf, pred_landmarks_clnf); + gts_all = cat(3, gts_all, gt_landmarks); + confs_ceclm = cat(1, confs_ceclm, conf_ceclm); + confs_clnf = cat(1, confs_clnf, conf_clnf); + + if(find( cat_1 == str2double(name) )) + cat_1_ids = cat(1, cat_1_ids, true(numel(conf_clnf),1)); + cat_2_ids = cat(1, cat_2_ids, false(numel(conf_clnf),1)); + cat_3_ids = cat(1, cat_3_ids, false(numel(conf_clnf),1)); + end + if(find( cat_2 == str2double(name) )) + cat_1_ids = cat(1, cat_1_ids, false(numel(conf_clnf),1)); + cat_2_ids = cat(1, cat_2_ids, true(numel(conf_clnf),1)); + cat_3_ids = cat(1, cat_3_ids, false(numel(conf_clnf),1)); + end + if(find( cat_3 == str2double(name) )) + cat_1_ids = cat(1, cat_1_ids, false(numel(conf_clnf),1)); + cat_2_ids = cat(1, cat_2_ids, false(numel(conf_clnf),1)); + cat_3_ids = cat(1, cat_3_ids, true(numel(conf_clnf),1)); + end + +end +%% + +% As ICCR uses only 66 landmarks adapt all the others to the same format +gts_all_66 = gts_all([1:60,62:64,66:end],:,:); +preds_all_ceclm_66 = preds_all_ceclm([1:60,62:64,66:end],:,:); +preds_all_clnf_66 = preds_all_clnf([1:60,62:64,66:end],:,:); + +gts_all_49 = gts_all_66(18:end,:,:); +preds_all_ceclm_49 = preds_all_ceclm_66(18:end,:,:); +preds_all_clnf_49 = preds_all_clnf_66(18:end,:,:); + +[ceclm_error_66_cat_1, err_pp_clnf] = compute_error( gts_all_66(:,:,cat_1_ids) - 1.0, preds_all_ceclm_66(:,:,cat_1_ids)); +[clnf_error_66_cat_1, err_pp_clnf] = compute_error( gts_all_66(:,:,cat_1_ids) - 1.0, preds_all_clnf_66(:,:,cat_1_ids)); + +[ceclm_error_49_cat_1, err_pp_clnf] = compute_error( gts_all_49(:,:,cat_1_ids) - 1.0, preds_all_ceclm_49(:,:,cat_1_ids)); +[clnf_error_49_cat_1, err_pp_clnf] = compute_error( gts_all_49(:,:,cat_1_ids) - 1.0, preds_all_clnf_49(:,:,cat_1_ids)); + +[ceclm_error_66_cat_2, err_pp_clnf] = compute_error( gts_all_66(:,:,cat_2_ids) - 1.0, preds_all_ceclm_66(:,:,cat_2_ids)); +[clnf_error_66_cat_2, err_pp_clnf] = compute_error( gts_all_66(:,:,cat_2_ids) - 1.0, preds_all_clnf_66(:,:,cat_2_ids)); + +[ceclm_error_49_cat_2, err_pp_clnf] = compute_error( gts_all_49(:,:,cat_2_ids) - 1.0, preds_all_ceclm_49(:,:,cat_2_ids)); +[clnf_error_49_cat_2, err_pp_clnf] = compute_error( gts_all_49(:,:,cat_2_ids) - 1.0, preds_all_clnf_49(:,:,cat_2_ids)); + +[ceclm_error_66_cat_3, err_pp_clnf] = compute_error( gts_all_66(:,:,cat_3_ids) - 1.0, preds_all_ceclm_66(:,:,cat_3_ids)); +[clnf_error_66_cat_3, err_pp_clnf] = compute_error( gts_all_66(:,:,cat_3_ids) - 1.0, preds_all_clnf_66(:,:,cat_3_ids)); + +[ceclm_error_49_cat_3, err_pp_clnf] = compute_error( gts_all_49(:,:,cat_3_ids) - 1.0, preds_all_ceclm_49(:,:,cat_3_ids)); +[clnf_error_49_cat_3, err_pp_clnf] = compute_error( gts_all_49(:,:,cat_3_ids) - 1.0, preds_all_clnf_49(:,:,cat_3_ids)); + +filename = sprintf('results/300VW_OpenFace'); +save(filename, 'ceclm_error_66_cat_1', 'ceclm_error_66_cat_2', 'ceclm_error_66_cat_3', 'ceclm_error_49_cat_1', 'ceclm_error_49_cat_2', 'ceclm_error_49_cat_3',... + 'clnf_error_66_cat_1', 'clnf_error_66_cat_2', 'clnf_error_66_cat_3', 'clnf_error_49_cat_1', 'clnf_error_49_cat_2', 'clnf_error_49_cat_3'); diff --git a/matlab_runners/Feature Point Experiments/Construct_error_table_300VW.m b/matlab_runners/Feature Point Experiments/Construct_error_table_300VW.m new file mode 100644 index 00000000..6de2d3da --- /dev/null +++ b/matlab_runners/Feature Point Experiments/Construct_error_table_300VW.m @@ -0,0 +1,35 @@ +% Run this in order to construct the results table +file_out = fopen('results/300VW_66.txt', 'w'); + +load('results/300VW_OpenFace.mat'); +load('../../matlab_version/experiments_300VW/results/cfss_errors.mat'); +load('../../matlab_version/experiments_300VW/results/cfan_errors.mat'); +load('../../matlab_version/experiments_300VW/results/drmf_errors.mat'); +load('../../matlab_version/experiments_300VW/results/iccr_errors.mat'); +load('../../matlab_version/experiments_300VW/results/pocr_errors.mat'); + +fprintf(file_out, 'Errors with outline (66 points)\n'); +fprintf(file_out, '------------------------------\n'); +fprintf(file_out, 'Method\tcat 1\tcat 2\tcat3\n'); +fprintf(file_out, 'CFSS\t%.2f\t%.2f\t%.2f\n', median(cfss_error_66_cat_1)*100, median(cfss_error_66_cat_2)*100, median(cfss_error_66_cat_3)*100); +fprintf(file_out, 'ICCR\t%.2f\t%.2f\t%.2f\n', median(iccr_error_66_cat_1)*100, median(iccr_error_66_cat_2)*100, median(iccr_error_66_cat_3)*100); +fprintf(file_out, 'CFAN\t%.2f\t%.2f\t%.2f\n', median(cfan_error_66_cat_1)*100, median(cfan_error_66_cat_2)*100, median(cfan_error_66_cat_3)*100); +fprintf(file_out, '------------------------------\n'); +fprintf(file_out, 'OpenFace CLNF\t%.2f\t%.2f\t%.2f\n', median(clnf_error_66_cat_1)*100, median(clnf_error_66_cat_2)*100, median(clnf_error_66_cat_3)*100); +fprintf(file_out, 'OpenFace CE-CLM\t%.2f\t%.2f\t%.2f\n', median(ceclm_error_66_cat_1)*100, median(ceclm_error_66_cat_2)*100, median(ceclm_error_66_cat_3)*100); +fclose(file_out); + +file_out = fopen('results/300VW_49.txt', 'w'); + +fprintf(file_out, 'Errors without outline (49 points)\n'); +fprintf(file_out, '------------------------------\n'); +fprintf(file_out, 'Method\tcat 1\tcat 2\tcat3\n'); +fprintf(file_out, 'CFSS\t%.2f\t%.2f\t%.2f\n', median(cfss_error_49_cat_1)*100, median(cfss_error_49_cat_2)*100, median(cfss_error_49_cat_3)*100); +fprintf(file_out, 'ICCR\t%.2f\t%.2f\t%.2f\n', median(iccr_error_49_cat_1)*100, median(iccr_error_49_cat_2)*100, median(iccr_error_49_cat_3)*100); +fprintf(file_out, 'DRMF\t%.2f\t%.2f\t%.2f\n', median(drmf_error_49_cat_1)*100, median(drmf_error_49_cat_2)*100, median(drmf_error_49_cat_3)*100); +fprintf(file_out, 'PO-CR\t%.2f\t%.2f\t%.2f\n', median(pocr_error_49_cat_1)*100, median(pocr_error_49_cat_2)*100, median(pocr_error_49_cat_3)*100); +fprintf(file_out, 'CFAN\t%.2f\t%.2f\t%.2f\n', median(cfan_error_49_cat_1)*100, median(cfan_error_49_cat_2)*100, median(cfan_error_49_cat_3)*100); +fprintf(file_out, '------------------------------\n'); +fprintf(file_out, 'OpenFace CLNF\t%.2f\t%.2f\t%.2f\n', median(clnf_error_49_cat_1)*100, median(clnf_error_49_cat_2)*100, median(clnf_error_49_cat_3)*100); +fprintf(file_out, 'OpenFace CE-CLM\t%.2f\t%.2f\t%.2f\n', median(ceclm_error_49_cat_1)*100, median(ceclm_error_49_cat_2)*100, median(ceclm_error_49_cat_3)*100); +fclose(file_out); \ No newline at end of file diff --git a/matlab_runners/Feature Point Experiments/Display_300VW_results_49.m b/matlab_runners/Feature Point Experiments/Display_300VW_results_49.m new file mode 100644 index 00000000..e4b0b06e --- /dev/null +++ b/matlab_runners/Feature Point Experiments/Display_300VW_results_49.m @@ -0,0 +1,165 @@ +clear + +scrsz = get(0,'ScreenSize'); +figure1 = figure('Position',[20 50 3*scrsz(3)/4 0.9*scrsz(4)]); + +set(figure1,'Units','Inches'); +pos = get(figure1,'Position'); +set(figure1,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]) + +% Create axes +axes1 = axes('Parent',figure1,'FontSize',40,'FontName','Helvetica'); + +line_width = 6; +hold on; + +load('../../matlab_version/experiments_300VW/results/cfss_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfss_error_49_cat_1); +plot(error_x, error_y, 'DisplayName', 'CFSS', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/cfan_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfan_error_49_cat_1); +plot(error_x, error_y, 'DisplayName', 'CFAN', 'LineWidth',line_width); +% +load('../../matlab_version/experiments_300VW/results/iccr_errors.mat'); +[error_x, error_y] = cummErrorCurve(iccr_error_49_cat_1); +plot(error_x, error_y, 'DisplayName', 'iCCR', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/drmf_errors.mat'); +[error_x, error_y] = cummErrorCurve(drmf_error_49_cat_1); +plot(error_x, error_y, 'DisplayName', 'DRMF', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/pocr_errors.mat'); +[error_x, error_y] = cummErrorCurve(pocr_error_49_cat_1); +plot(error_x, error_y, 'DisplayName', 'PO-CR', 'LineWidth',line_width); + +load('results/300VW_OpenFace.mat'); +[error_x, error_y] = cummErrorCurve(clnf_error_49_cat_1); +plot(error_x, error_y, 'DisplayName', 'OpenFace', 'LineWidth',line_width); + +% Make sure CE-CLM is drawn on top +[error_x, error_y] = cummErrorCurve(ceclm_error_49_cat_1); +plot(error_x, error_y, 'r', 'LineWidth',line_width, 'DisplayName', 'OpenFace 2.0'); + +% Make it looks nice and print to a pdf +set(gca,'xtick',[0.01:0.01:0.05]) +xlim([0.01,0.05]); +xlabel('IOD normalized MAE','FontName','Helvetica'); +ylabel('Proportion of images','FontName','Helvetica'); +grid on +ax=legend('show', 'Location', 'SouthEast'); +ax.FontSize = 40; + +print -dpdf results/300VWres_49_cat1.pdf +print -dpng results/300VWres_49_cat1.png + +%% +clear + +scrsz = get(0,'ScreenSize'); +figure1 = figure('Position',[20 50 3*scrsz(3)/4 0.9*scrsz(4)]); + +set(figure1,'Units','Inches'); +pos = get(figure1,'Position'); +set(figure1,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]) + +% Create axes +axes1 = axes('Parent',figure1,'FontSize',40,'FontName','Helvetica'); + +line_width = 6; +hold on; + +load('../../matlab_version/experiments_300VW/results/cfss_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfss_error_49_cat_2); +plot(error_x, error_y, 'DisplayName', 'CFSS', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/cfan_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfan_error_49_cat_2); +plot(error_x, error_y, 'DisplayName', 'CFAN', 'LineWidth',line_width); +% +load('../../matlab_version/experiments_300VW/results/iccr_errors.mat'); +[error_x, error_y] = cummErrorCurve(iccr_error_49_cat_2); +plot(error_x, error_y, 'DisplayName', 'iCCR', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/drmf_errors.mat'); +[error_x, error_y] = cummErrorCurve(drmf_error_49_cat_2); +plot(error_x, error_y, 'DisplayName', 'DRMF', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/pocr_errors.mat'); +[error_x, error_y] = cummErrorCurve(pocr_error_49_cat_2); +plot(error_x, error_y, 'DisplayName', 'PO-CR', 'LineWidth',line_width); + +load('results/300VW_OpenFace.mat'); +[error_x, error_y] = cummErrorCurve(clnf_error_49_cat_2); +plot(error_x, error_y, 'DisplayName', 'OpenFace', 'LineWidth',line_width); + +% Make sure CE-CLM is drawn on top +[error_x, error_y] = cummErrorCurve(ceclm_error_49_cat_2); +plot(error_x, error_y, 'r', 'LineWidth',line_width, 'DisplayName', 'OpenFace 2.0'); + +% Make it looks nice and print to a pdf +set(gca,'xtick',[0.01:0.01:0.07]) +xlim([0.01,0.07]); +xlabel('IOD normalized MAE','FontName','Helvetica'); +ylabel('Proportion of images','FontName','Helvetica'); +grid on +ax=legend('show', 'Location', 'SouthEast'); +ax.FontSize = 40; + +print -dpdf results/300VWres_49_cat2.pdf +print -dpng results/300VWres_49_cat2.png +%% +clear + +scrsz = get(0,'ScreenSize'); +figure1 = figure('Position',[20 50 3*scrsz(3)/4 0.9*scrsz(4)]); + +set(figure1,'Units','Inches'); +pos = get(figure1,'Position'); +set(figure1,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]) + +% Create axes +axes1 = axes('Parent',figure1,'FontSize',40,'FontName','Helvetica'); + +line_width = 6; +hold on; + +load('../../matlab_version/experiments_300VW/results/cfss_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfss_error_49_cat_3); +plot(error_x, error_y, 'DisplayName', 'CFSS', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/cfan_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfan_error_49_cat_3); +plot(error_x, error_y, 'DisplayName', 'CFAN', 'LineWidth',line_width); +% +load('../../matlab_version/experiments_300VW/results/iccr_errors.mat'); +[error_x, error_y] = cummErrorCurve(iccr_error_49_cat_3); +plot(error_x, error_y, 'DisplayName', 'iCCR', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/drmf_errors.mat'); +[error_x, error_y] = cummErrorCurve(drmf_error_49_cat_3); +plot(error_x, error_y, 'DisplayName', 'DRMF', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/pocr_errors.mat'); +[error_x, error_y] = cummErrorCurve(pocr_error_49_cat_3); +plot(error_x, error_y, 'DisplayName', 'PO-CR', 'LineWidth',line_width); + +load('results/300VW_OpenFace.mat'); +[error_x, error_y] = cummErrorCurve(clnf_error_49_cat_3); +plot(error_x, error_y, 'DisplayName', 'OpenFace', 'LineWidth',line_width); + +% Make sure CE-CLM is drawn on top +[error_x, error_y] = cummErrorCurve(ceclm_error_49_cat_3); +plot(error_x, error_y, 'r', 'LineWidth',line_width, 'DisplayName', 'OpenFace 2.0'); + +% Make it looks nice and print to a pdf +set(gca,'xtick',[0.01:0.01:0.07]) +xlim([0.01,0.07]); +xlabel('IOD normalized MAE','FontName','Helvetica'); +ylabel('Proportion of images','FontName','Helvetica'); +grid on +ax=legend('show', 'Location', 'SouthEast'); +ax.FontSize = 40; + +print -dpdf results/300VWres_49_cat3.pdf +print -dpng results/300VWres_49_cat3.png diff --git a/matlab_runners/Feature Point Experiments/Display_300VW_results_66.m b/matlab_runners/Feature Point Experiments/Display_300VW_results_66.m new file mode 100644 index 00000000..d0e137f8 --- /dev/null +++ b/matlab_runners/Feature Point Experiments/Display_300VW_results_66.m @@ -0,0 +1,139 @@ +clear + +scrsz = get(0,'ScreenSize'); +figure1 = figure('Position',[20 50 3*scrsz(3)/4 0.9*scrsz(4)]); + +set(figure1,'Units','Inches'); +pos = get(figure1,'Position'); +set(figure1,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]) + +% Create axes +axes1 = axes('Parent',figure1,'FontSize',40,'FontName','Helvetica'); + +line_width = 6; +hold on; + +load('../../matlab_version/experiments_300VW/results/cfss_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfss_error_66_cat_1); +plot(error_x, error_y, 'DisplayName', 'CFSS', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/cfan_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfan_error_66_cat_1); +plot(error_x, error_y, 'DisplayName', 'CFAN', 'LineWidth',line_width); +% +load('../../matlab_version/experiments_300VW/results/iccr_errors.mat'); +[error_x, error_y] = cummErrorCurve(iccr_error_66_cat_1); +plot(error_x, error_y, 'DisplayName', 'iCCR', 'LineWidth',line_width); + +load('results/300VW_OpenFace.mat'); +[error_x, error_y] = cummErrorCurve(clnf_error_66_cat_1); +plot(error_x, error_y, 'DisplayName', 'OpenFace - CLNF', 'LineWidth',line_width); + +% Make sure CE-CLM is drawn on top +[error_x, error_y] = cummErrorCurve(ceclm_error_66_cat_1); +plot(error_x, error_y, 'r', 'LineWidth',line_width, 'DisplayName', 'OpenFace - CE-CLM'); + +% Make it looks nice and print to a pdf +set(gca,'xtick',[0.01:0.01:0.08]) +xlim([0.01,0.08]); +xlabel('IOD normalized MAE','FontName','Helvetica'); +ylabel('Proportion of images','FontName','Helvetica'); +grid on +ax=legend('show', 'Location', 'SouthEast'); +ax.FontSize = 30; + +print -dpdf results/300VWres_66_cat1.pdf + +%% +clear + +scrsz = get(0,'ScreenSize'); +figure1 = figure('Position',[20 50 3*scrsz(3)/4 0.9*scrsz(4)]); + +set(figure1,'Units','Inches'); +pos = get(figure1,'Position'); +set(figure1,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]) + +% Create axes +axes1 = axes('Parent',figure1,'FontSize',40,'FontName','Helvetica'); + +line_width = 6; +hold on; + +load('../../matlab_version/experiments_300VW/results/cfss_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfss_error_66_cat_2); +plot(error_x, error_y, 'DisplayName', 'CFSS', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/cfan_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfan_error_66_cat_2); +plot(error_x, error_y, 'DisplayName', 'CFAN', 'LineWidth',line_width); +% +load('../../matlab_version/experiments_300VW/results/iccr_errors.mat'); +[error_x, error_y] = cummErrorCurve(iccr_error_66_cat_2); +plot(error_x, error_y, 'DisplayName', 'iCCR', 'LineWidth',line_width); + +load('results/300VW_OpenFace.mat'); +[error_x, error_y] = cummErrorCurve(clnf_error_66_cat_2); +plot(error_x, error_y, 'DisplayName', 'OpenFace - CLNF', 'LineWidth',line_width); + +% Make sure CE-CLM is drawn on top +[error_x, error_y] = cummErrorCurve(ceclm_error_66_cat_2); +plot(error_x, error_y, 'r', 'LineWidth',line_width, 'DisplayName', 'OpenFace - CE-CLM'); + +% Make it looks nice and print to a pdf +set(gca,'xtick',[0.01:0.01:0.08]) +xlim([0.01,0.08]); +xlabel('IOD normalized MAE','FontName','Helvetica'); +ylabel('Proportion of images','FontName','Helvetica'); +grid on +ax=legend('show', 'Location', 'SouthEast'); +ax.FontSize = 30; + +print -dpdf results/300VWres_66_cat2.pdf + +%% +clear + +scrsz = get(0,'ScreenSize'); +figure1 = figure('Position',[20 50 3*scrsz(3)/4 0.9*scrsz(4)]); + +set(figure1,'Units','Inches'); +pos = get(figure1,'Position'); +set(figure1,'PaperPositionMode','Auto','PaperUnits','Inches','PaperSize',[pos(3), pos(4)]) + +% Create axes +axes1 = axes('Parent',figure1,'FontSize',40,'FontName','Helvetica'); + +line_width = 6; +hold on; + +load('../../matlab_version/experiments_300VW/results/cfss_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfss_error_66_cat_3); +plot(error_x, error_y, 'DisplayName', 'CFSS', 'LineWidth',line_width); + +load('../../matlab_version/experiments_300VW/results/cfan_errors.mat'); +[error_x, error_y] = cummErrorCurve(cfan_error_66_cat_3); +plot(error_x, error_y, 'DisplayName', 'CFAN', 'LineWidth',line_width); +% +load('../../matlab_version/experiments_300VW/results/iccr_errors.mat'); +[error_x, error_y] = cummErrorCurve(iccr_error_66_cat_3); +plot(error_x, error_y, 'DisplayName', 'iCCR', 'LineWidth',line_width); + +load('results/300VW_OpenFace.mat'); +[error_x, error_y] = cummErrorCurve(clnf_error_66_cat_3); +plot(error_x, error_y, 'DisplayName', 'OpenFace - CLNF', 'LineWidth',line_width); + +% Make sure CE-CLM is drawn on top +[error_x, error_y] = cummErrorCurve(ceclm_error_66_cat_3); +plot(error_x, error_y, 'r', 'LineWidth',line_width, 'DisplayName', 'OpenFace - CE-CLM'); + +% Make it looks nice and print to a pdf +set(gca,'xtick',[0.01:0.01:0.08]) +xlim([0.01,0.08]); +xlabel('IOD normalized MAE','FontName','Helvetica'); +ylabel('Proportion of images','FontName','Helvetica'); +grid on +ax=legend('show', 'Location', 'SouthEast'); +ax.FontSize = 30; + +print -dpdf results/300VWres_66_cat3.pdf \ No newline at end of file diff --git a/matlab_runners/Feature Point Experiments/results/300VW_49.txt b/matlab_runners/Feature Point Experiments/results/300VW_49.txt new file mode 100644 index 00000000..d3058a5c --- /dev/null +++ b/matlab_runners/Feature Point Experiments/results/300VW_49.txt @@ -0,0 +1,11 @@ +Errors without outline (49 points) +------------------------------ +Method cat 1 cat 2 cat3 +CFSS 2.81 3.06 3.34 +ICCR 2.68 2.94 3.49 +DRMF 3.33 3.55 5.27 +PO-CR 2.95 3.08 3.68 +CFAN 3.17 3.72 4.94 +------------------------------ +OpenFace CLNF 2.83 3.38 3.82 +OpenFace CE-CLM 2.41 2.67 3.21 diff --git a/matlab_runners/Feature Point Experiments/results/300VW_66.txt b/matlab_runners/Feature Point Experiments/results/300VW_66.txt new file mode 100644 index 00000000..7ab9c110 --- /dev/null +++ b/matlab_runners/Feature Point Experiments/results/300VW_66.txt @@ -0,0 +1,9 @@ +Errors with outline (66 points) +------------------------------ +Method cat 1 cat 2 cat3 +CFSS 3.40 3.61 4.20 +ICCR 3.37 3.45 4.46 +CFAN 3.93 4.43 6.39 +------------------------------ +OpenFace CLNF 3.79 4.23 4.78 +OpenFace CE-CLM 3.15 3.55 4.19 diff --git a/matlab_runners/Feature Point Experiments/results/300VW_OpenFace.mat b/matlab_runners/Feature Point Experiments/results/300VW_OpenFace.mat new file mode 100644 index 00000000..6ef72497 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VW_OpenFace.mat differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_49_cat1.pdf b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat1.pdf new file mode 100644 index 00000000..5f07b095 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat1.pdf differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_49_cat1.png b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat1.png new file mode 100644 index 00000000..8e5179aa Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat1.png differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_49_cat2.pdf b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat2.pdf new file mode 100644 index 00000000..ef45bb82 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat2.pdf differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_49_cat2.png b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat2.png new file mode 100644 index 00000000..6cf1ec24 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat2.png differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_49_cat3.pdf b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat3.pdf new file mode 100644 index 00000000..24389aff Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat3.pdf differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_49_cat3.png b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat3.png new file mode 100644 index 00000000..c9efc379 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_49_cat3.png differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_66_cat1.pdf b/matlab_runners/Feature Point Experiments/results/300VWres_66_cat1.pdf new file mode 100644 index 00000000..f05722a8 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_66_cat1.pdf differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_66_cat2.pdf b/matlab_runners/Feature Point Experiments/results/300VWres_66_cat2.pdf new file mode 100644 index 00000000..55f8165b Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_66_cat2.pdf differ diff --git a/matlab_runners/Feature Point Experiments/results/300VWres_66_cat3.pdf b/matlab_runners/Feature Point Experiments/results/300VWres_66_cat3.pdf new file mode 100644 index 00000000..b617ad34 Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300VWres_66_cat3.pdf differ diff --git a/matlab_runners/Feature Point Experiments/results/300W_res.pdf b/matlab_runners/Feature Point Experiments/results/300W_res.pdf new file mode 100644 index 00000000..b11c9d9a Binary files /dev/null and b/matlab_runners/Feature Point Experiments/results/300W_res.pdf differ diff --git a/matlab_runners/Feature Point Experiments/results/fps_yt.mat b/matlab_runners/Feature Point Experiments/results/fps_yt.mat index bdb140fd..bf94b05f 100644 Binary files a/matlab_runners/Feature Point Experiments/results/fps_yt.mat and b/matlab_runners/Feature Point Experiments/results/fps_yt.mat differ diff --git a/matlab_runners/Feature Point Experiments/results/landmark_detections.mat b/matlab_runners/Feature Point Experiments/results/landmark_detections.mat index 51080629..80378b2d 100644 Binary files a/matlab_runners/Feature Point Experiments/results/landmark_detections.mat and b/matlab_runners/Feature Point Experiments/results/landmark_detections.mat differ diff --git a/matlab_runners/Feature Point Experiments/run_300VW_dataset_OpenFace.m b/matlab_runners/Feature Point Experiments/run_300VW_dataset_OpenFace.m new file mode 100644 index 00000000..553f1446 --- /dev/null +++ b/matlab_runners/Feature Point Experiments/run_300VW_dataset_OpenFace.m @@ -0,0 +1,62 @@ +clear + +if(isunix) + executable = '"../../build/bin/FeatureExtraction"'; +else + executable = '"../../x64/Release/FeatureExtraction.exe"'; +end + + +if(exist('D:\Datasets\300VW_Dataset_2015_12_14\300VW_Dataset_2015_12_14/', 'file')) + database_root = 'D:\Datasets\300VW_Dataset_2015_12_14\300VW_Dataset_2015_12_14/'; +elseif(exist('E:\datasets\300VW\300VW_Dataset_2015_12_14', 'file')) + database_root = 'E:\datasets\300VW\300VW_Dataset_2015_12_14'; +elseif(exist('/multicomp/datasets/300VW_Dataset_2015_12_14/', 'file')) + database_root = '/multicomp/datasets/300VW_Dataset_2015_12_14/'; +else + fprintf('Could not find the dataset'); + return; +end +%% +cat_1 = [ 114, 124, 125, 126, 150, 158, 401, 402, 505, 506, 507, 508, 509, 510, 511, 514, 515, 518, 519, 520, 521, 522, 524, 525, 537, 538, 540, 541, 546, 547, 548]; +cat_2 = [203, 208, 211, 212, 213, 214, 218, 224, 403, 404, 405, 406, 407, 408, 409, 412, 550, 551, 553]; +cat_3 = [410, 411, 516, 517, 526, 528, 529, 530, 531, 533, 557, 558, 559, 562]; +in_dirs = cat(2, cat_1, cat_2, cat_3); + +%% Running CE-CLM models +output = '300VW_experiment/ceclm'; + +command_shared = sprintf('%s -2Dfp -tracked -out_dir "%s" -verbose ', executable, output); + +parfor i=1:numel(in_dirs) + name = num2str(in_dirs(i)); + + in_file_name = [database_root '/', name, '/vid.avi']; + + command = cat(2, command_shared, [' -f "' in_file_name '" -of "' name '"']); + dos(command); +end + +%% Running CLNF models +output = '300VW_experiment/clnf'; + +command_shared = sprintf('%s -2Dfp -tracked -out_dir "%s" -mloc model/main_clnf_general.txt -verbose ', executable, output); + +parfor i=1:numel(in_dirs) + name = num2str(in_dirs(i)); + + in_file_name = [database_root '/', name, '/vid.avi']; + + command = cat(2, command_shared, [' -f "' in_file_name '" -of "' name '"']); + dos(command); +end + +%% +Compute_300VW_errors; + +%% +Construct_error_table_300VW; + +%% +Display_300VW_results_49; +Display_300VW_results_66; \ No newline at end of file diff --git a/matlab_runners/Full_test_suite.m b/matlab_runners/Full_test_suite.m index a9172f3c..3771ec86 100644 --- a/matlab_runners/Full_test_suite.m +++ b/matlab_runners/Full_test_suite.m @@ -43,7 +43,7 @@ cd('../'); cd('Action Unit Experiments'); run_AU_prediction_Bosphorus assert(mean(cccs_reg) > 0.56); -assert(mean(f1s_class) > 0.49); +assert(mean(f1s_class) > 0.48); run_AU_prediction_BP4D assert(mean(ints_cccs) > 0.65); diff --git a/matlab_runners/Head Pose Experiments/results/Pose_OF_CECLM.mat b/matlab_runners/Head Pose Experiments/results/Pose_OF_CECLM.mat new file mode 100644 index 00000000..8f5dfb3f Binary files /dev/null and b/matlab_runners/Head Pose Experiments/results/Pose_OF_CECLM.mat differ diff --git a/matlab_runners/Head Pose Experiments/results/Pose_OF_CECLM.txt b/matlab_runners/Head Pose Experiments/results/Pose_OF_CECLM.txt new file mode 100644 index 00000000..a1733c15 --- /dev/null +++ b/matlab_runners/Head Pose Experiments/results/Pose_OF_CECLM.txt @@ -0,0 +1,4 @@ +Dataset and model, pitch, yaw, roll, mean, median +biwi error: 6.089, 5.086, 3.713, 4.963, 2.414 +bu error: 2.397, 3.248, 2.408, 2.684, 1.838 +ict error: 3.136, 3.512, 3.136, 3.261, 1.867 diff --git a/matlab_runners/Head Pose Experiments/results/Pose_OF_CLNF.mat b/matlab_runners/Head Pose Experiments/results/Pose_OF_CLNF.mat new file mode 100644 index 00000000..3bde1224 Binary files /dev/null and b/matlab_runners/Head Pose Experiments/results/Pose_OF_CLNF.mat differ diff --git a/matlab_runners/Head Pose Experiments/results/Pose_OF_CLNF.txt b/matlab_runners/Head Pose Experiments/results/Pose_OF_CLNF.txt new file mode 100644 index 00000000..aa6152c3 --- /dev/null +++ b/matlab_runners/Head Pose Experiments/results/Pose_OF_CLNF.txt @@ -0,0 +1,4 @@ +Dataset and model, pitch, yaw, roll, mean, median +biwi error: 7.500, 5.094, 4.610, 5.735, 2.550 +bu error: 2.775, 3.348, 2.448, 2.857, 1.990 +ict error: 3.813, 3.711, 3.528, 3.684, 1.931 diff --git a/matlab_runners/Head Pose Experiments/run_head_pose_tests_OpenFace_CECLM.m b/matlab_runners/Head Pose Experiments/run_head_pose_tests_OpenFace_CECLM.m new file mode 100644 index 00000000..92db6c79 --- /dev/null +++ b/matlab_runners/Head Pose Experiments/run_head_pose_tests_OpenFace_CECLM.m @@ -0,0 +1,53 @@ +clear; + +%% +% Find the dataset location +if exist('D:/Datasets/HeadPose', 'file') + database_root = 'D:/Datasets/HeadPose/'; +elseif(exist([getenv('USERPROFILE') '/Dropbox/AAM/test data/'], 'file')) + database_root = [getenv('USERPROFILE') '/Dropbox/AAM/test data/']; +elseif(exist([getenv('USERPROFILE') 'F:/Dropbox/Dropbox/AAM/test data/'], 'file')) + database_root = 'F:/Dropbox/Dropbox/AAM/test data/'; +elseif(exist('F:/Dropbox/AAM/test data/', 'file')) + database_root = 'F:/Dropbox/AAM/test data/'; +elseif(exist('/multicomp/datasets/head_pose_dbs', 'file')) + database_root = '/multicomp/datasets/head_pose_dbs/'; +elseif(exist('/media/tadas/5E08AE0D08ADE3ED/Dropbox/AAM/test data', 'file')) + database_root = '/media/tadas/5E08AE0D08ADE3ED/Dropbox/AAM/test data'; +end + +buDir = [database_root, '/bu/uniform-light/']; + +%% +[resFolderBU_OF] = run_bu_experiment(buDir, false, 'model', 'model/main_ceclm_general.txt'); +[bu_error_OF, pred_hp_bu, gt_hp_bu, all_errors_bu_OF, rels_bu] = calcBUerror(resFolderBU_OF, buDir); + +%% +% Run the Biwi test +biwi_dir = '/biwi pose/'; + +[res_folder_biwi_OF] = run_biwi_experiment(database_root, biwi_dir, false, false, 'model', 'model/main_ceclm_general.txt'); +% Calculate the resulting errors +[biwi_error_OF, pred_hp_biwi, gt_hp_biwi, ~, all_errors_biwi_OF, rels_biwi] = calcBiwiError(res_folder_biwi_OF, [database_root biwi_dir]); + +%% Run the ICT test +ict_dir = ['/ict/']; + +% Intensity +[res_folder_ict_OF] = run_ict_experiment(database_root, ict_dir, false, false, 'model', 'model/main_ceclm_general.txt'); +% Calculate the resulting errors +[ict_error_OF, pred_hp_ict, gt_hp_ict, ~, all_errors_ict_OF, rel_ict] = calcIctError(res_folder_ict_OF, [database_root ict_dir]); + +%% Save the results +filename = 'results/Pose_OF_CECLM'; +save(filename); + +% Also save them in a reasonable .txt format for easy comparison +f = fopen('results/Pose_OF_CECLM.txt', 'w'); +fprintf(f, 'Dataset and model, pitch, yaw, roll, mean, median\n'); +fprintf(f, 'biwi error: %.3f, %.3f, %.3f, %.3f, %.3f\n', biwi_error_OF, mean(all_errors_biwi_OF(:)), median(all_errors_biwi_OF(:))); +fprintf(f, 'bu error: %.3f, %.3f, %.3f, %.3f, %.3f\n', bu_error_OF, mean(all_errors_bu_OF(:)), median(all_errors_bu_OF(:))); +fprintf(f, 'ict error: %.3f, %.3f, %.3f, %.3f, %.3f\n', ict_error_OF, mean(all_errors_ict_OF(:)), median(all_errors_ict_OF(:))); + +fclose(f); +clear 'f' \ No newline at end of file diff --git a/matlab_runners/Head Pose Experiments/run_head_pose_tests_OpenFace_CLNF.m b/matlab_runners/Head Pose Experiments/run_head_pose_tests_OpenFace_CLNF.m new file mode 100644 index 00000000..156de44c --- /dev/null +++ b/matlab_runners/Head Pose Experiments/run_head_pose_tests_OpenFace_CLNF.m @@ -0,0 +1,52 @@ +clear; + +%% +% Find the dataset location +if exist('D:/Datasets/HeadPose', 'file') + database_root = 'D:/Datasets/HeadPose/'; +elseif(exist([getenv('USERPROFILE') '/Dropbox/AAM/test data/'], 'file')) + database_root = [getenv('USERPROFILE') '/Dropbox/AAM/test data/']; +elseif(exist(['F:/Dropbox/Dropbox/AAM/test data/'], 'file')) + database_root = 'F:/Dropbox/Dropbox/AAM/test data/'; +elseif(exist(['F:/Dropbox/AAM/test data/'], 'file')) + database_root = 'F:/Dropbox/AAM/test data/'; +else + database_root = '/multicomp/datasets/head_pose_dbs/'; +end + +buDir = [database_root, '/bu/uniform-light/']; + +% The fast and accurate clnf +%% +[resFolderBU_OF] = run_bu_experiment(buDir, false, 'model', 'model/main_clnf_general.txt'); +[bu_error_OF, pred_hp_bu, gt_hp_bu, all_errors_bu_OF, rels_bu] = calcBUerror(resFolderBU_OF, buDir); + +%% +% Run the Biwi test +biwi_dir = '/biwi pose/'; + +[res_folder_biwi_OF] = run_biwi_experiment(database_root, biwi_dir, false, false, 'model', 'model/main_clnf_general.txt'); +% Calculate the resulting errors +[biwi_error_OF, pred_hp_biwi, gt_hp_biwi, ~, all_errors_biwi_OF, rels_biwi] = calcBiwiError(res_folder_biwi_OF, [database_root biwi_dir]); + +%% Run the ICT test +ict_dir = ['/ict/']; + +% Intensity +[res_folder_ict_OF] = run_ict_experiment(database_root, ict_dir, false, false, 'model', 'model/main_clnf_general.txt'); +% Calculate the resulting errors +[ict_error_OF, pred_hp_ict, gt_hp_ict, ~, all_errors_ict_OF, rel_ict] = calcIctError(res_folder_ict_OF, [database_root ict_dir]); + +%% Save the results +filename = 'results/Pose_OF_CLNF'; +save(filename); + +% Also save them in a reasonable .txt format for easy comparison +f = fopen('results/Pose_OF_CLNF.txt', 'w'); +fprintf(f, 'Dataset and model, pitch, yaw, roll, mean, median\n'); +fprintf(f, 'biwi error: %.3f, %.3f, %.3f, %.3f, %.3f\n', biwi_error_OF, mean(all_errors_biwi_OF(:)), median(all_errors_biwi_OF(:))); +fprintf(f, 'bu error: %.3f, %.3f, %.3f, %.3f, %.3f\n', bu_error_OF, mean(all_errors_bu_OF(:)), median(all_errors_bu_OF(:))); +fprintf(f, 'ict error: %.3f, %.3f, %.3f, %.3f, %.3f\n', ict_error_OF, mean(all_errors_ict_OF(:)), median(all_errors_ict_OF(:))); + +fclose(f); +clear 'f' \ No newline at end of file