Show HN: FaceCrop – Align and crop portrait photos with face detection
facecrop.puntofisso.netA friend who's a corporate photographer came to me with an interesting problem: aligning multiple portrait photos for team pages, yearbooks, directories, so that faces are consistently positioned.
Fundamentally, when you take dozens of photos in a day, they are likely to be all slightly different in terms of crop.
As I had done some work with facial feature recognition, my friend asked if the same tech could be used for his problem... and here's why FaceCrop came to be :-)
How does it work:
- drop in your photos
- FaceCrop detects faces using face-api.js or tracking.js
- FaceCrop suggests crops
- fine-tune the crops individually or globally
- export the crops in a .zip file.
To note, everything runs client-side on the browser: no uploads, no server-side, no accounts. It was mostly developed using some code I had from a previous project and some Claude Code.
Would welcome constructive feedback most importantly on the crop adjustment UI/UX, but also on the detection accuracy, suggested crop shape, etc.
http://facecrop.puntofisso.net/ Suggestions: Allow aspect ratio to be specified as well as a target data size. For example: 9:16 100kb (for web use) Thanks, that's a good shout! Two thoughts: 1) I'm not 100% sure what to do when the ratio can't be complied with because the original photo has a certain shape, but I'm definitely thinking about it; in general, how to get as much as a consistent crop is the main reason for FaceCrop; 2) trying to keep the UX as simple as possible, so I assume (in this MVP) that the user wants to crop pictures at the same size/quality of the original, and do any further edits elsewhere... but it does make sense and it's probably something not that difficult to achieve with a sensible interface (it also reminds me of https://squoosh.app/) I'm not 100% sure what to do when the ratio can't be complied with Center the crop on the detected face and use the detected width or height, whichever is smaller. If no face, just use 50% of the smallest overall dimension (height or width) and adjust the other dimension to match the ratio. If an available dimension is exceeded, use what is available and adjust the remaining one to match the ratio. This should always result in a valid crop ratio. Always allow for user adjustment.