Detect faces in photos and crop to faces automatically. Make a landscape format slide show for digital frames or monitors. Uses Google Vision API to detect faces.
Do you have a digital frame? Are you tired of the frame shrinking your portrait photos to fit into the landscape format of the frame, making them almost unviewable and leaving big black boxes surrounding the image? Tired of your frame filling up with your huge image files, which are much higher resolution than the frame? Worry no more!
This project will detect the faces in your photos, center on the faces, and crop to fit any size landscape frame!
- Set up a new project with the Google Vison API. Get a JSON credential file for the project, install the API into Python
- Place the JSON file in the same directory as the python file you downloaded from this project
- Make sure you have installed Pillow into Python, as well as piexif (pip install Pillow, pip install piexif)
- Edit the python file found in this project -- add the path to your photos, your JSON file path, the pixel width and height of your frame.