mirror of
https://gitcode.com/gh_mirrors/ope/OpenFace.git
synced 2025-12-30 13:02:30 +00:00
Some more Menpo fixes.
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
clear
|
||||
load('menpo_68_pts.mat');
|
||||
load('menpo_68_pts_valid.mat');
|
||||
|
||||
xs = all_pts(1:end/2,:);
|
||||
ys = all_pts(end/2+1:end,:);
|
||||
@@ -16,7 +16,7 @@ pdm = struct;
|
||||
pdm.M = double(M);
|
||||
pdm.E = double(E);
|
||||
pdm.V = double(V);
|
||||
|
||||
errs_poss = [];
|
||||
for i=1:num_imgs
|
||||
|
||||
|
||||
@@ -28,7 +28,8 @@ for i=1:num_imgs
|
||||
rots(:,i) = Rot2Euler(R);
|
||||
|
||||
if(errs(i) < 0 || errs(i) > 4)
|
||||
a = 2;
|
||||
fprintf('i - %d, err - %.3f\n', i, errs(i));
|
||||
errs_poss = cat(1, errs_poss, i);
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -16,17 +16,23 @@ right_to_frontal_map = [17,28; 18,29; 19,30; 20,31;
|
||||
35,63; 36,64; 37,65; 38,66; 39,67];
|
||||
|
||||
all_pts = [];
|
||||
ps = [248 523 604 800 840 901 938 944 947 1383 1413 1533 1562 1637 1770 2164 2400 2688 2775 2838 2849];
|
||||
for i=1:numel(dataset_locs)
|
||||
landmarkLabels = dir([dataset_locs{i} '\*.pts']);
|
||||
landmarkImgs = dir([dataset_locs{i} '\*.jpg']);
|
||||
|
||||
for p=1:numel(landmarkLabels)
|
||||
% for p=604:numel(landmarkLabels)
|
||||
for p=ps
|
||||
landmarks = importdata([dataset_locs{i}, landmarkLabels(p).name], ' ', 3);
|
||||
img = imread([dataset_locs{i}, landmarkImgs(p).name]);
|
||||
landmarks = landmarks.data;
|
||||
landmark_labels = -ones(68,2);
|
||||
|
||||
% Problem with the labels
|
||||
if(strcmp(landmarkImgs(p).name, 'aflw__face_43770.jpg'))
|
||||
landmarks(13:16,:) = landmarks(16:-1:13,:);
|
||||
end
|
||||
|
||||
% Problem with the labels
|
||||
if(strcmp(landmarkImgs(p).name, 'aflw__face_63080.jpg'))
|
||||
landmarks(1:12,:) = landmarks(12:-1:1,:);
|
||||
landmarks(13:16,:) = landmarks(16:-1:13,:);
|
||||
|
||||
Reference in New Issue
Block a user