This is a script for detecting and aligning faces in images for batch processing. Alignment is a process of rotating a face to a vertically straight orientation, should the original face image is tilted.
- Run
pip install -r requirements.txt
, or alternatively install dependencies manually. - Download and extract shape predictor 68 landmarks at this link.
- Place the extracted predictor in the root directory of this project.
- Find some images with faces, most images from portraits to group photos should work as long as the resolution not too small.
python app.py inputfolder outputfolder
- Sometimes faces do not get detected and thus fail to get extracted.