Getting error in DRMF code
Show older comments
Hi. Can anyone please help me write a DRMF code? It stands for "Discriminative Map Fitting Code." This code gives the coordinates of 66 landmarks on the face. Here is the program I got on the internet:
clear;
close all;
addpath(genpath('.'));
% ------------------------------------------------
% % % % % %
% Choose Face Detector % %
% 0: Tree-Based Face Detector (p204); % %
% 1: Matlab Face Detector (or External Face Detector); % %
% 2: Use Pre-computed Bounding Boxes % % % % %
% NOTES: % % % [a] Option '0' is very accurate and suited for faces in the 'wild'; % %
% But it is EXTREMELY slow!!! % %
% [b] Option '1' supports the functionality for incorporating % %
% YOUR OWN FACE DETECTOR WITH DRMF FITTING; % %
% Simply modify the function External_Face_Detector.m % % %
bbox_method = 1;
%------------------------------------------------%
%------------------------------------------------% % %
% Choose Visualize % %
% 0: Do Not Display Fitting Results; % %
% 1: Display Fitting Results and Pause of Inspection) % % %
visualize=1;
%------------------------------------------------%
%------------------------------------------------% % %
% Load Test Images
image_path='test_images/';
img_list=dir([image_path,'*.png']);
for i=1:size(img_list,1)
data(i).name = img_list(i).name;
data(i).img = im2double(imread([image_path,img_list(i).name]));
% % % Required Only for bbox_method = 2;
data(i).bbox = []; % Face Detection Bounding Box [x;y;w;h]
% % % Initialization to store the results
data(i).points = []; % MAT containing 66 Landmark Locations
data(i).pose = []; % POSE information [Pitch;Yaw;Roll]
end
%------------------------------------------------%
%------------------------------------------------%
%Run Demo
clm_model='model/DRMF_Model.mat';
load(clm_model);
data=DRMF(clm_model,data,bbox_method,visualize);
%------------------------------------------------%
The error is found in the last line, I'm not able to understand why "data" is written twice that is, on both side of equality (in the input argument list and in the output argument list)???
6 Comments
shalev fahima
on 11 Sep 2021
Edited: Image Analyst
on 12 Sep 2021
How did you get the face mask matrix from the code?
Was the problem solved?
Image Analyst
on 12 Sep 2021
@shalev fahima, we don't know. It was 6.5 years ago and they never said. But there is no error, or should not be. It's perfectly fine to send in a variable called data, then have a function modify it, and send back the modified data variable back out via the output argument list. As long as DRMF expects the kinds of variables they're sending in, in that order, it should work fine.
shalev fahima
on 12 Sep 2021
hello dear Image Analyst
i got to say i follow your mat-page quite alot you are very helpful for my project
i just use the code and it works fine for me
I am having my final Mechanical engineering in matlab face masking
the concept is very basic and still complicated in its own way
can i have a way to contact you?
shalefa@ac.sce.ac.il
Image Analyst
on 12 Sep 2021
@shalev fahima, I monitor this forum closely and see many/most posts especially those on image processing. I don't do private, offline consulting.
shalev fahima
on 12 Sep 2021
Ok image analyst i will upload my progress as far as a quastion ia it ok if I tag you for help?
Image Analyst
on 12 Sep 2021
@shalev fahima don't put people's names as tags. It may make other people think they are not wanted as answerers. Besides, I don't know anything about DRMF.
Answers (0)
Categories
Find more on Face Detection in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!