1adrianb / face-alignment

:fire: 2D and 3D Face alignment library build using pytorch
https://www.adrianbulat.com
BSD 3-Clause "New" or "Revised" License
7.12k stars 1.35k forks source link

Update on training code / new model? #55

Closed elbaro closed 6 years ago

elbaro commented 6 years ago

I ran 3D-fan on many (>100,000) images and a lot of images fail.

For example, dlib-cnn is better than dlib-hog face detector, but FAN+dlib-cnn performs worse than FAN+dlib-hog. I guess pytorch model is trained with dlib-hog and not augmented with translation.

This is a problem because dlib-hog is not good enough and 3DFAN isn't compatible with other face detectors.

Q. Is lua-version robust to different bbox unlike pytorch version? Q. I understand you are busy. Can you publish un-polished PyTorch training code so I can pick up and add augmentation?

1adrianb commented 6 years ago

Hi @elbaro, and thank a lot for your interest.

First of all, a small correction - a better bounding box WILL improve the performance. It is important to note however that the models released were trained with perturbed ground truth boxes (for simplicity) and as such for this particular models better = closer to the gt bounding box. If one uses different bboxes for better performance he will have to adjust the way the center and the scale of the face is computed, to reflect the difference in the bbox setting.

None of them were trained using dlib! As I stated a few times already on github dlib was used for simplicty and not because it will offer the best performance. It would have been close to impossible to train using dlib since dlib doesnt work for large poses.

A1: Unfortuntelly none of the released version were trained as such. However I encourage the users to retrain using the amount of auguementation that they expect to encounter. A2: As I said earlier on github at the moment I have no plans on doing so. I bealive that releasing an un-polished code is a bad idea since people expect the code to just work and as such may generate a lot of questions and confusion. I already see this from my decition of bundling dlib with the code that lead people to asume that there is some sort of relation between the dlib and the face alignment code, when there is none (even tho I did mentioned this at every ocasion here).

Thanks, Adrian

sunjunlishi commented 6 years ago

Your effect is very good, just do not know how you train. Do you need 3D data?