Note: This code is not maintained. Please refer to Peppa_Pig_Face_Landmark, The TRAIN subdir.There is better model.
A simple face aligment method, based on pytorch
This is the pytorch branch.
It is simple and flexible, trained with wingloss , multi task learning, also with data augmentation based on headpose and face attributes(eyes state and mouth state).
And i suggest that you could try with another project,including face detect and keypoints, and some optimizations were made, u can check it there [pappa_pig_face_engine].
Contact me if u have problem about it. [email protected] :)
demo pictures:
this gif is from github.com/610265158/Peppa_Pig_Face_Engine )
pretrained model:
- baidu disk (code 9x2m)
-
pytorch
-
tensorpack (for data provider)
-
opencv
-
python 3.6
- download all the 300W data set including the 300VW(parse as images, and make the label the same formate as 300W)
├── 300VW
│ ├── 001_annot
│ ├── 002_annot
│ ....
├── 300W
│ ├── 01_Indoor
│ └── 02_Outdoor
├── AFW
│ └── afw
├── HELEN
│ ├── testset
│ └── trainset
├── IBUG
│ └── ibug
├── LFPW
│ ├── testset
│ └── trainset
-
run
python make_json.py
produce train.json and val.json (if u like train u own data, please read the json produced , it is quite simple) -
then, run:
python train.py
-
by default it trained with shufflenetv2_1.0
python vis.py --model ./model/keypoints.pth