This demo is originally from https://github.com/nlhkh/face-alignment-dlib.
- Run
pip install -r requirements.txt
- Download and extract shape predictor 68 landmarks at this link.
- Download and extract shape predictor 5 landmarks at this link.
- Place the extracted predictor in the root directory of this project.
- Find some images with faces.
python facecrop.py <image input folder> <image output folder> [-m 1.5] [-s 1]
m
represent margin around the face, default is 1.5, s
represent scale, default is 1.
image input
image output