by jammaloo · 2y ago · 0 comments
https://jammaloo.com/DealWithIt/
It uses face-api.js to find the face, and then move the sunglasses over it. It's about a 5 meg model, so it's pretty slow to load. You can customize with a URL, or drag and drop an image on. Resizing the browser also moves the glasses around.
Very happy to see someone take the idea way way way further!
> It uses face-api.js to find the face
Yeah, I'm using Google AI's Face Detector [1]. There's Tensorflow's Face Landmarks Detection [2] that looked most promising and accurate. But it had two bugs [3][4] that are blockers. The first one got fixed recently, but the other one is still pending.
[1] https://ai.google.dev/edge/mediapipe/solutions/vision/face_d...
[2] https://github.com/tensorflow/tfjs-models/tree/master/face-l...