← All models · FaceNet

Multi-model · FaceDetector → FaceNet

Detect → crop → embed

FaceNet expects a tight, centred face crop. Real photos aren't cropped. So chain two on-device models: MediaPipe's FaceDetector (BlazeFace) boxes the face first, we crop to it, and only then does FaceNet embed — far more robust than feeding a whole scene. Two models, one pipeline, nothing uploaded.

Two photos in, one similarity out

Photo A → detected crop

crop →
Scene with a person A Scene with a person C
Drop / choose your own

Photo B → detected crop

crop →
Scene with a person C Scene with a person A
Drop / choose your own

Both models run on-device (BlazeFace ~230 KB + FaceNet ~91 MB). The detector aligns the crop so FaceNet sees a consistent face; without it, background and framing pollute the embedding. Nothing is uploaded.

Why chain them

Detection and embedding solve different problems: BlazeFace answers "where is the face?", FaceNet answers "whose face pattern is this?". Feeding FaceNet a raw scene mixes in background and scale; cropping to the detector's box first makes the similarity comparison stable across photos where the face sits in a different place or size. This detect-then-embed shape underlies most real face pipelines.