diff --git a/matlab_runners/Head Pose Experiments/calcBiwiError.m b/matlab_runners/Head Pose Experiments/calcBiwiError.m index c998a8f..077446a 100644 --- a/matlab_runners/Head Pose Experiments/calcBiwiError.m +++ b/matlab_runners/Head Pose Experiments/calcBiwiError.m @@ -24,10 +24,16 @@ for i=1:numel(seqNames) confidence_id = cellfun(@(x) ~isempty(x) && x==1, strfind(column_names, 'confidence')); rot_ids = cellfun(@(x) ~isempty(x) && x==1, strfind(column_names, 'pose_R')); + t_ids = cellfun(@(x) ~isempty(x) && x==1, strfind(column_names, 'pose_T')); end all_params = dlmread(fname, ',', 1, 0); + T = all_params(:,t_ids); + tx = T(:,1); + ty = T(:,2); + tz = T(:,3); + rot{i} = all_params(:, rot_ids); rels = all_params(:, confidence_id); @@ -35,7 +41,6 @@ for i=1:numel(seqNames) rels_all = cat(1, rels_all, rels); rotg{i} = posesGround(:,[5 6 7]); - T = [tx ty tx]; % Correct the first frame so it corresponds to (0,0,0), as slightly % different pose might be assumed frontal and this corrects for diff --git a/matlab_runners/Head Pose Experiments/calcIctError.m b/matlab_runners/Head Pose Experiments/calcIctError.m index 20a7161..55b8c9a 100644 --- a/matlab_runners/Head Pose Experiments/calcIctError.m +++ b/matlab_runners/Head Pose Experiments/calcIctError.m @@ -18,13 +18,25 @@ function [meanError, all_rot_preds, all_rot_gts, meanErrors, all_errors, rels_al for i = 1:numel(sequences) [~, name,~] = fileparts(sequences(i).name); - [frame t, rels, sc tx ty tz rx ry rz] = textread([resDir '/' sequences(i).name], '%f, %f, %f, %f, %f, %f, %f, %f, %f, %f', 'headerlines', 1); - [txg tyg tzg rxg ryg rzg] = textread([gtDir name '/' polhemus], '%f,%f,%f,%f,%f,%f'); + fname = [resDir '/' sequences(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')); + rot_ids = cellfun(@(x) ~isempty(x) && x==1, strfind(column_names, 'pose_R')); + end + + all_params = dlmread(fname, ',', 1, 0); + + rot{i} = all_params(:, rot_ids); + rels = all_params(:, confidence_id); + % the reliabilities of head pose rels_all = cat(1, rels_all, rels); - - rot{i} = [rx ry rz]; + [txg tyg tzg rxg ryg rzg] = textread([gtDir name '/' polhemus], '%f,%f,%f,%f,%f,%f'); rotg{i} = [rxg ryg rzg]; diff --git a/matlab_runners/Head Pose Experiments/results/Pose_OF.txt b/matlab_runners/Head Pose Experiments/results/Pose_OF.txt index 6a395fb..a3fdb8a 100644 --- a/matlab_runners/Head Pose Experiments/results/Pose_OF.txt +++ b/matlab_runners/Head Pose Experiments/results/Pose_OF.txt @@ -1,4 +1,4 @@ Dataset and model, pitch, yaw, roll, mean, median -biwi error: 7.091, 5.170, 4.657, 5.639, 2.609 -bu error: 2.739, 3.349, 2.459, 2.849, 1.974 -ict error: 3.498, 3.986, 3.298, 3.594, 1.966 +biwi error: 6.981, 5.174, 4.571, 5.575, 2.612 +bu error: 2.738, 3.349, 2.459, 2.849, 1.975 +ict error: 3.497, 3.985, 3.298, 3.593, 1.965