adapting experiments for landmarks.

This commit is contained in:
Tadas Baltrusaitis 2018-02-25 11:51:12 +00:00
parent 5676450825
commit 82f57d90ae
6 changed files with 20 additions and 10 deletions

View file

@ -1,3 +1,3 @@
Model, mean, median Model, mean, median
OpenFace (CLNF): 0.0564, 0.0515 OpenFace (CLNF): 0.0564, 0.0515
CLM: 0.0631, 0.0587 CLM: 0.0630, 0.0586

View file

@ -75,20 +75,30 @@ preds_all_clm = [];
gts_all = []; gts_all = [];
for i = 1:numel(files_yt) for i = 1:numel(files_yt)
[~, name, ~] = fileparts(files_yt(i).name); [~, name, ~] = fileparts(files_yt(i).name);
pred_landmarks = dlmread([d_loc, files_yt(i).name], ',', 1, 0);
pred_landmarks = pred_landmarks(:,5:end);
xs = pred_landmarks(:, 1:end/2); fname = [d_loc, files_yt(i).name];
ys = pred_landmarks(:, end/2+1:end); 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);
pred_landmarks = zeros([size(xs,2), 2, size(xs,1)]); pred_landmarks = zeros([size(xs,2), 2, size(xs,1)]);
pred_landmarks(:,1,:) = xs'; pred_landmarks(:,1,:) = xs';
pred_landmarks(:,2,:) = ys'; pred_landmarks(:,2,:) = ys';
pred_landmarks_clm = dlmread([d_loc_clm, files_yt(i).name], ',', 1, 0); all_params = dlmread([d_loc_clm, files_yt(i).name], ',', 1, 0);
pred_landmarks_clm = pred_landmarks_clm(:,5:end);
xs = pred_landmarks_clm(:, 1:end/2); xs = all_params(:, x_ids);
ys = pred_landmarks_clm(:, end/2+1:end); ys = all_params(:, y_ids);
pred_landmarks_clm = zeros([size(xs,2), 2, size(xs,1)]); pred_landmarks_clm = zeros([size(xs,2), 2, size(xs,1)]);
pred_landmarks_clm(:,1,:) = xs'; pred_landmarks_clm(:,1,:) = xs';
pred_landmarks_clm(:,2,:) = ys'; pred_landmarks_clm(:,2,:) = ys';

View file

@ -1,2 +1,2 @@
Mean error, median error Mean error, median error
9.428, 8.611 9.431, 8.611