1 A small network, one vector out
This is Intel's face-reidentification-retail-0095 from the OpenVINO Open Model Zoo,
built for re-identifying people across camera views. Its README lists 1.107 million parameters
(a hundredth of VGG16), 0.588 GFLOPs per face and 99.47% accuracy on the LFW pair-matching benchmark.
It is a MobileNetV2 backbone: cheap inverted residual blocks (expand with a 1×1
convolution, filter each channel with a 3×3, project back), with squeeze-and-excitation,
which averages each channel over the whole crop and uses the result to turn channels up or down.
PReLU activations replace MobileNetV2's ReLU6. Four stages work at 64, 32, 16 and 8 pixels. A
global depthwise pooling then folds the last 8×8 map into one position, and a 1×1 convolution makes
the 256-number vector. Similarity is the cosine between two vectors.
The README names no training set. What it does specify is the input: a 128×128 crop in which the eyes, the nose tip and the mouth corners have been moved onto five fixed points. Every face the model learned from was presumably cut out that way. That convention runs through everything below.
The first operation (before any learned weight)
48 learned activation slopes
Layer by layer
2 Compare faces
Add images: samples, uploads, pastes or webcam captures. A second network, RetinaFace (MobileNet-0.25), finds each face and its five landmarks. The page then rotates, scales and shifts the image so the landmarks land on the reference points, as the model expects. The matrix shows every pairwise similarity. Click a cell to see which pixels of the row face make it resemble the column face: the gradient of their similarity, back on the image. Images stay in your browser; nothing is uploaded anywhere.
Why they look alike
Click a cell of the matrix.
Same person or not? Measure it on yourself
The README gives no threshold for "same person". You can measure one. Start the webcam above, then record a series: the page takes a frame every half second for ten seconds. While it records, turn your head a little, talk, smile, lean towards the light and away from it. Every frame is detected, aligned and embedded. All frames are then compared with each other (same person) and with the faces of other people in the tray, such as the astronaut sample (different people). Frames stay in this page and are discarded when you leave.
Inside: stage outputs of the last image added
3 The alignment it never saw past
A recognition model is trained to give two photos of one person the same vector despite light, expression and camera. What it was never shown, it never learned to ignore. Because every training face was aligned the same way, some changes that are trivial to us are enormous to it. Change a face below and watch its similarity to the original. Then compare with the measurements on the aligned astronaut on the right.
Measured on the aligned astronaut (similarity to the unchanged crop)
What it looks at
4 What the vector keeps
If 256 numbers are all that is left of a face, what can you get back from them? Start from noise and adjust the pixels until the image's vector matches a target's. The result has everything the vector remembers and nothing it doesn't.
Offline, with a smoother parametrisation, the reconstructions reach cosine 0.90–0.93 to their targets (below: targets on top). The aligned face comes back as a face: eyes, nose and mouth in their places, but no hair, colour or background. Ask for the vector of a cat or a coffee cup and face-like features still appear in the noise: faces are the only vocabulary this network has. Live, the colours drift freely, because the vector doesn't pin them down.