codeniko / shape_predictor_81_face_landmarks

Custom shape predictor model trained to find 81 facial feature landmarks given any image
BSD 3-Clause "New" or "Revised" License
465 stars 126 forks source link

Question: Surrey Face Model Points #11

Closed imaccormick275 closed 5 years ago

imaccormick275 commented 5 years ago

Hi @codeniko

Thanks for the .dat file super useful!

Sorry for my stupidity here, but this should be easy and taring my hair out here. Is there any documentation anywhere on the surrey face model and the numeration of the points within eos.

I've done all the hardwork and built a model in eos and projected the points into 2d. I can now choose some points and train my dlib model.

I've tried to just look and see the at output but there is no obvious pattern in how they are labelled.

Iain

imaccormick275 commented 5 years ago

thought of the way plot the points with the numbers. its been a long day.

codeniko commented 5 years ago

Haha, I did exactly this. I think that code would have also been included in my fork of eos, I don't remember.

If it helps, I responded to this issue https://github.com/codeniko/shape_predictor_81_face_landmarks/issues/6 a while ago describing my steps to achieve this in a bit more details. You can find the exact 13 SFM indices I used in this commit https://github.com/codeniko/eos/commit/252658199aa4ab784b52ceee3ff38b31d53e3f6a My eos fork is kinda old now so it's possible these may have changed.

codeniko commented 5 years ago

Also, if I remember correctly. the mesh triangles plotted with numbers/indices were very tightly packed and hard to read in some areas when looking at the picture. You can choose one of the corners of each triangle and just draw that with the index. Reference https://github.com/codeniko/shape_predictor_81_face_landmarks/blob/master/full_mesh_example.png Each different color is a different corner of the mesh triangle. Look at the crowding of the nose in particular, it's a mess... Rendering only one of those colors at a time might make it easier to look at.

imaccormick275 commented 5 years ago

ye it has turned out being very messy plotting all of the numbers with all of the indexes. also I realised half way through that having symmetry is likely helpful when training the dlib shape predictor. I asked patrikhuber for some help on this and his responses can be found here for anyone else that's interested:

https://github.com/patrikhuber/eos/issues/277

I'll also respond on this issue if I find an elegant solution.