menpo / lsfm

Large Scale Facial Model (LSFM) - an automatic pipeline for constructing 3D Morphable Models from large collections of facial meshes
http://ibug.doc.ic.ac.uk/resources/lsfm/
BSD 3-Clause "New" or "Revised" License
499 stars 117 forks source link

Face Not Found #10

Open SyedGilani opened 7 years ago

SyedGilani commented 7 years ago

Hi James,

In certain cases the codes returns an error,

_"MenpoDeprecation (Warning) ST0015 - FAILED TO CORRESPOND: Expected to find one face - found 0"

The input face is in WRL format. The code easily processes the rest of the images from the data set in the same file format. This particular file (ST_0015) does not have any errors. It opens up in 3D viewer software and I can easily import it in MATLAB. I can share the file privately if you want. I will appreciate some help on this problem. Regards

jabooth commented 7 years ago

Hi @SyedGilani,

In general LSFM is focused on cases where we have a lot of training data, so if one or two meshes fail at any stage in the pipeline we generally consider this acceptable. How many meshes are you using in total? I understand though that it would be useful to be able to manually intervene in cases of failure to maximise the usage of data...

As a quick debug, if you remove ST_0015 do the rest of the meshes work and produce a PCA model with no errors?

A current shortcoming is that we don't visualize the image used for landmarking in the case of landmark failure - we should address this to make this more debuggable.

If you inspect the other landmarked images in visualizations/landmarks does it look sensible?

SyedGilani commented 7 years ago

I had a dataset of 107 3D faces captured with 3dMD system. The WRL and associated texture files were generated by the 3dMD viewer software. The LSFM code failed to find faces in 42 scans, hence no landmark files were generated. It computed dense correspondence on 65 scans out of which around 21 failed because of inaccurate landmark detection. The code produced the PCA models of the 65 faces, ignoring the 42 failed cases.

To verify which file was causing the error, I used the WRL file of ST_0016 and renamed the texture file of ST_0015 as ST_0016. The code worked on this face, though the correspondence was understandably inaccurate. When I reversed the process. i.e. used the WRL of ST_0015 and texture of ST_0016, the code failed to detect the face. This happens much before the AAM fitting.

I hope that the above information will help you to detect the error. I will be glad to provide further information to help make the working of the code smooth. Regards

jabooth commented 7 years ago

@SyedGilani, great, thanks for the details!

Would it be possible to share with me privately a copy of one of the meshes that is succeeding and one of the meshes that is failing? (wrl + texture). My first thought is likely that the face is a little too small in the landmarking image, and this is causing the face detector to fail. This could happen if the facial region captured is a little larger than the template face, which would mean the alignment and scaling would cause the mesh to appear a little small in that view.

If you could share via email to jabooth at gmail dot com I can take a look, and if this is the case, add a config flag to make it possible to add a manual scale correction to combat this...

SyedGilani commented 7 years ago

Done.

MaxBazik commented 7 years ago

I had this same issue and increasing the size of the meshes beforehand fixed it for me.

elliotresearcher commented 7 years ago

hi , I have downloaded basel face database. Please guide me how to download "01_MorphableModel.mat" file. it is not available on basel website. i am waiting for your kind reply. thanks

tsvetiko commented 6 years ago

@elliotresearcher you need to get the old Basel Face Model from 2009 and not the one from 2017 - there you'll find the 01_MorphableModel.mat

NOTE: This question is not related to the current thread, so in the future it would be nice if you create a new issue in such cases

seed93 commented 6 years ago

The same to me. Face detection is not good, and failed for most meshes for me. I use 1297 meshes captured by a multi-camera system. The texture image is 6000x6000 pixels. Maybe I need to change the face detector with a better one or something goes wrong with my models.

baymin182 commented 5 years ago

@jabooth I want to use a new model to detecte face landmarks. Can you give me some advice? How should I modify the code?

KeyKy commented 4 years ago

@jabooth Could you tell me the relationship between .jpg and .obj?