Learning Blocks
FaceRec-Edge
Recognise the people you have labelled by comparing their faces with a stored "face fingerprint".
Try it in StudioOn this page
What is this learning block?
FaceRec-Edge is the face-recognition model for Image projects. You pick it on the training page with Choose a different model. Studio describes it as a model for Raspberry Pi 4 and Raspberry Pi 5, depending on the available memory and processing power.
What does it do?
It finds faces in an image and tells you who each face belongs to, out of the people you labelled. A face that does not match anyone well enough is treated as unknown.
How does it learn?
FaceRec-Edge uses two networks that were already trained on large face datasets. They are not retrained:
- A face detector finds each face you boxed in your training images.
- A face recognizer turns each face into a list of numbers, an embedding or "face fingerprint". Photos of the same person give similar fingerprints.
- For each person, Studio averages their fingerprints into one reference fingerprint.
- To recognise a new face, it compares the face's fingerprint with every reference fingerprint. The closest match wins, if it is close enough.
Because nothing is retrained, Maximum training cycles, Learning rate and Batch size do not change the result.
What model architecture does it use?
- 1Image
- 2Face detectorFinds each face
- 3Face crop112 × 112
- 4Face recognizerFace fingerprint
- 5CompareClosest person, or unknown
The two networks are packaged as ONNX files. The package also stores a match threshold (0.30) and an unknown cutoff (0.20) for the similarity score.
What settings can I configure?
FaceRec-Edge needs no training settings. What matters is your data:
| What | Why |
|---|---|
| A box around each face | The model uses your boxes to know which face to learn. |
| One label per person | The label is the person's name, for example alice. |
| Several photos per person | Different angles and light give a better reference fingerprint. |
What problems can it solve?
- Recognising members of a team, a family or a class.
- Showing "unknown" for people who are not in your dataset.
Simple example
You collect 20 photos each of three classmates (with their permission), draw a box around each face and label them alice, bob and chen. After training, live classification with your webcam should show the right name for each of them, while a visitor who is not in the dataset should not match anyone.
How do I understand the training results?
The Evaluation page shows, per person, Prec. (precision) and Recall, plus a confusion matrix that compares the Actual person with the Predicted person. Numbers outside the diagonal show which people get mixed up; add more varied photos of them.