Adapting head pose scripts with the changed multi-face interface.
This commit is contained in:
parent
4192e85a8f
commit
5676450825
3 changed files with 25 additions and 8 deletions
|
@ -24,10 +24,16 @@ for i=1:numel(seqNames)
|
||||||
|
|
||||||
confidence_id = cellfun(@(x) ~isempty(x) && x==1, strfind(column_names, 'confidence'));
|
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'));
|
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
|
end
|
||||||
|
|
||||||
all_params = dlmread(fname, ',', 1, 0);
|
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);
|
rot{i} = all_params(:, rot_ids);
|
||||||
rels = all_params(:, confidence_id);
|
rels = all_params(:, confidence_id);
|
||||||
|
|
||||||
|
@ -35,7 +41,6 @@ for i=1:numel(seqNames)
|
||||||
rels_all = cat(1, rels_all, rels);
|
rels_all = cat(1, rels_all, rels);
|
||||||
|
|
||||||
rotg{i} = posesGround(:,[5 6 7]);
|
rotg{i} = posesGround(:,[5 6 7]);
|
||||||
T = [tx ty tx];
|
|
||||||
|
|
||||||
% Correct the first frame so it corresponds to (0,0,0), as slightly
|
% Correct the first frame so it corresponds to (0,0,0), as slightly
|
||||||
% different pose might be assumed frontal and this corrects for
|
% different pose might be assumed frontal and this corrects for
|
||||||
|
|
|
@ -18,13 +18,25 @@ function [meanError, all_rot_preds, all_rot_gts, meanErrors, all_errors, rels_al
|
||||||
for i = 1:numel(sequences)
|
for i = 1:numel(sequences)
|
||||||
|
|
||||||
[~, name,~] = fileparts(sequences(i).name);
|
[~, 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
|
% the reliabilities of head pose
|
||||||
rels_all = cat(1, rels_all, rels);
|
rels_all = cat(1, rels_all, rels);
|
||||||
|
[txg tyg tzg rxg ryg rzg] = textread([gtDir name '/' polhemus], '%f,%f,%f,%f,%f,%f');
|
||||||
rot{i} = [rx ry rz];
|
|
||||||
|
|
||||||
rotg{i} = [rxg ryg rzg];
|
rotg{i} = [rxg ryg rzg];
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
Dataset and model, pitch, yaw, roll, mean, median
|
Dataset and model, pitch, yaw, roll, mean, median
|
||||||
biwi error: 7.091, 5.170, 4.657, 5.639, 2.609
|
biwi error: 6.981, 5.174, 4.571, 5.575, 2.612
|
||||||
bu error: 2.739, 3.349, 2.459, 2.849, 1.974
|
bu error: 2.738, 3.349, 2.459, 2.849, 1.975
|
||||||
ict error: 3.498, 3.986, 3.298, 3.594, 1.966
|
ict error: 3.497, 3.985, 3.298, 3.593, 1.965
|
||||||
|
|
Loading…
Reference in a new issue