FaceExtractor is a Python package that extracts faces from images using the face_recognition and OpenCV libraries.
Use the package manager pip to install FaceExtractor.
pip install simntek-face-extractorfrom your_package_name.face_extractor import FaceExtractor
# Create an instance of the FaceExtractor
face_extractor = FaceExtractor()
# Define the input and output directories
input_directory = "path/to/input_directory"
output_directory = "path/to/output_directory"
# Call the method to extract faces
face_extractor.extract_faces(input_directory, output_directory)- Extract faces from images in a specified directory.
- Save face regions as new images.
- Dependencies
- opencv-python
- face_recognition
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
MIT
Thanks to the creators of OpenCV and face_recognition libraries.