facr
Detects faces in images and returns a focal point. Is used to crop the right part of an image. You should use this in conjunction with the ee-image-worker package which has support for cropping using focal points.
The Python script bin/detect is licenced unter the GPL2 Licence. The file was copied from https://github.com/wavexx/facedetect
installation
You have first to install native dependecies
ubuntu linux
sudo apt-get install python python-opencv libopencv-dev
API
var FaceDetection = require('facr');
// create an instacne
var detector = new FaceDetection();
// get focal point for an image
const focalPoint = await detector.detect(imageBuffer);
if (focalPoint) console.log('Yeah, we got it! x %s, y %s :)', focalPoint.x, focalPoint.y);
else console.log('sorry, failed to detect any faces in this image ...'');