Home

Awesome

Peppa_Pig_Face_Engine

DOI

introduction

It is a simple demo including face detection and face aligment, and some optimizations were made to make the result better.

click the gif to see the video: demo

and with face mask: face mask

requirment

model

1 face detector

yolov5-face

2 landmark detector

Simple keypoints detector.

WFLWNMEFlops(G)Params(M)PoseExp.Ill.Mu.Occ.Blurpretrained
Student@1284.800.353.258.535.004.614.815.805.36skps
Teacher@1284.171.3811.537.144.324.014.034.984.68skps
Student@2564.351.393.257.534.524.164.215.344.93skps
Teacher@2563.955.5311.537.004.003.813.784.854.54skps

I will release new model when there is better one.

By default student@256 is used in this project

install

git clone https://github.com/610265158/Peppa_Pig_Face_Landmark
python setup.py install

useage

# by code:

from Skps import FaceAna
facer = FaceAna()

result= facer.run(image)

## detect images, tracing is not used, add
##  facer.reset()

More details refer to demo.py

run python demo.py --cam_id 0 use a camera
or python demo.py --video test.mp4 detect for a video
or python demo.py --img_dir ./test detect for images dir no track

How to train

The codes are placed in folder TRAIN/face_landmark

Refer to TRAIN/face_landmark/README.md to train the model.