visit
This is a python library that uses to detect, align and extract faces images for classification purposes, either using or .
OpenCV is more than capable of doing everything that is needed in an image processing pipeline, such as: detect faces, align faces and extract faces, also known as Face Chips.
Clone the ! If you have just create an environment with the attached file:
conda env create -f newHogEnv.yml
To test just run the program pythonfaces.py:
python pythonfaces.py |image.jpg|
python pythonfaces.py |image.jpg| |face cascade model| |eye cascade model|
import pythonfaces
detectFaces
This function receives an OpenCV image (it can be a video frame), detects the faces in it and returns a list with images. The first is the original marked image (where the faces and eyes are) and the others are the cropped images of each face found (Face Chip), properly aligned and scaled.You can save the images with:cv2.imwrite(|path of the file to be written|, |OpenCV image object|)
See the code for pythonfaces.py for other functions.