dlib-minified-models icon indicating copy to clipboard operation
dlib-minified-models copied to clipboard

Stability

Open jayp84847 opened this issue 3 years ago • 9 comments

Yet I am working on project with dlib 68 face landmarks.dat file. But in many testing results seems very unstable. After some research I found dataset file.

Here are some source where its very stable example.

98 face landmarks: https://wywu.github.io/projects/LAB/WFLW.html

Very stable 68 landmarks: https://github.com/facebookresearch/supervision-by-registration

But can you guide me how can I make ".dat" file with them. Or can you make more stable ".dat" file and share with me?

jayp84847 avatar Jul 07 '21 05:07 jayp84847

Hi, sorry for the delay.

You can download the official 68-point shape predictor from Dlib, which is more accurate and stable but larger and slower.

Or, you can create your own dat model. For the links you cited, if they provide images and landmark annotations, you have to just make an XML file and then train the model from that XML.

The XML file basically contains the path of each image in your dataset along which each single annotated point.

You can read this article for more information about that.

Hope it helps

Luca96 avatar Jul 12 '21 12:07 Luca96

Thank you for your very helpful reply. As you said I am already using official Dlib 68_face_landmarks.dat but I am also using face mesh in this project, so with this Dlib module face mesh seems vibrating. Like its good but not stable. I am very new at Dlib so I don't have much knowledge about it so can you share me any video about how to train dlib shape predictor.

jayp84847 avatar Jul 12 '21 13:07 jayp84847

Can we make ".dat" file like "68_face_landmarks.dat" using this dataset?

https://wywu.github.io/projects/LAB/WFLW.html

jayp84847 avatar Jul 16 '21 16:07 jayp84847

Yes, there would be 98 landmarks instead of 68.

The only difficulty is to parse the annotation file they provide. If I manage to find some time, I'll provide you with at least the xml file required by Dlib to train a shape predictor model.

Luca96 avatar Jul 18 '21 12:07 Luca96

Thank you so much for such a support.

On Sun, 18 Jul 2021, 6:12 pm Luca Anzalone, @.***> wrote:

Yes, there would be 98 landmarks instead of 68.

The only difficulty is to parse the annotation file they provide. If I manage to find some time, I'll provide you with at least the xml file required by Dlib to train a shape predictor model.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Luca96/dlib-minified-models/issues/6#issuecomment-882050749, or unsubscribe https://github.com/notifications/unsubscribe-auth/ATM6FWHOWVRRL5OMFQS72NTTYLD3NANCNFSM4754H5LQ .

jayp84847 avatar Jul 18 '21 13:07 jayp84847

Good news! I managed to train a model on WFLW. You can find it here, along with training scripts in case you want to experiment further.

Let me know if there are still some problems, otherwise I will close the issue.

Cheers

Luca96 avatar Jul 21 '21 12:07 Luca96

Thank you for your such a great support.

1> Did you trained with all 7000 images? 2> Its detecting good but not working with real time face tracking. 3> Can I get your email I want share you some testing videos of my modules and want some help please.

jayp84847 avatar Jul 21 '21 14:07 jayp84847

Thank you, so:

  1. No, I trained only on the training set but you can easily edit the files I've provided and replicate the results on the whole dataset.
  2. There are few things you can try: (a) use lightweight training options for the model at the cost of accuracy; you have to retrain the model, (b) use a faster face detector and/or downsample input images, (c) compile Dlib from source and enable latest CPU optimizations. You may want to use C++, instead of Python.
  3. Well.. you can find my email on my GitHub profile, but I cannot guarantee you a response.

Luca96 avatar Jul 23 '21 14:07 Luca96

Hey luca,

I got some github where they describe how can we make 2d facial landmarks more stable and accurate. Can you please check it and let me know will it work with this dlib's 68_face_landmarks.dat.

If yes will you help me please.

Link : https://github.com/1adrianb/face-alignment

Training code and dataset link : https://github.com/1adrianb/2D-and-3D-face-alignment

jayp84847 avatar Aug 28 '21 20:08 jayp84847