YuvalNirkin / find_face_landmarks

C++ \ Matlab library for finding face landmarks and bounding boxes in video\image sequences.
144 stars 44 forks source link

Invalid mex file #14

Closed Sharmaaaa closed 6 years ago

Sharmaaaa commented 6 years ago

Hi , I am using the 'find_face_landmarks-0.8-x64-vc12' binary in matlab2015b but am getting an error invalid mex file.

Invalid MEX-file 'C:\Users\vijaykumar\Documents\MATLAB\Ankit\find_face_landmarks-0.8-x64-vc12\find_face_landmarks\find_face_landmarks.mexw64': The specified module could not be found. Please help me to run

YuvalNirkin commented 6 years ago

Must be missing Dlls, please use the latest binaries.

Sharmaaaa commented 6 years ago

Yea , it's working

Sharmaaaa commented 6 years ago

I have another problem now.

I have taken the image from webcam using matlab and it's giving me an .mat file.I convert the the .matfile into .png file using imwrite command and after that using two command in command window of matlab:

modelFile = 'shape_predictor_68_face_landmarks.dat';

frame = find_face_landmarks(modelFile,'test.png')

it's giving error - Error using find_face_landmarks Error: Failed to open video source

But it's working for images downloaded from google or jaffe database.

Can you please help me .I stucked here.

YuvalNirkin commented 6 years ago

Try:

I = imread('test.png');
frame = find_face_landmarks(modelFile, I)
gibaless commented 6 years ago

Hi, I've got on a Mac with Matlab R2017b your sample code:

modelFile = 'shape_predictor_68_face_landmarks.dat'; I = imread('test.png'); frame = find_face_landmarks(modelFile, I);

but I am getting the error: Attempt to execute SCRIPT find_face_landmarks as a function: /Users/.../find_face_landmarks-1.2-x64-vc14-release/interfaces/matlab/find_face_landmarks.m

Error in test (line 3) frame = find_face_landmarks(modelFile, I);

Any ideas what am I missing here? Thanks a lot.

Sharmaaaa commented 6 years ago

Hi, Please try: img= 'test.png'; frame = find_face_landmarks(modelFile, img);

most probably, it will work.

gibaless commented 6 years ago

Unfortunately it does not work. I also tried: img = 'test.png'; frame = find_face_landmarks('shape_predictor_68_face_landmarks.dat', img);

and frame = find_face_landmarks('shape_predictor_68_face_landmarks.dat', 'test.png');

keep getting the error: Attempt to execute SCRIPT find_face_landmarks as a function.

Should I be executing this from an specific folder within your solution? I am inside interfaces/matlab/ folder and have added .dat file inside that folder.

Thanks.

YuvalNirkin commented 6 years ago

You're trying to use "find_face_landmarks-1.2-x64-vc14-release" which are Windows binaries! For the library to work on your Mac you must build and install it from source.

Please note I haven't tested the library on MacOS but people reported it does work.