← Back to Developer
Robot Vision Lab ● Teacher's Guide

Lesson prep · computer vision

Teaching the face-recognition lab

Everything you need to run the session: the concepts (with the parts students get wrong), a timed lesson flow, experiments mapped to ideas, discussion prompts, and a glossary. Skim it once; teach from the flow.

Level: high school (16+)Length: 60–90 minPrereqs: noneSetup: see RUN.md

01 · The big picture

What students do, and what they learn

Students use a robot's live camera to build a system that finds faces and recognizes who's who, then greets them by voice. Along the way they discover the real engineering: it isn't “does it work” but “what's the right tradeoff.”

Learning objectives

  • Distinguish detection (“is there a face?”) from recognition (“whose face?”).
  • Explain how a face becomes a faceprint (an embedding vector) and how distance decides identity.
  • Predict how the match threshold trades false negatives against false positives.
  • Read live metrics to find the bottleneck (compute vs. camera) and change it.
  • Discuss the ethics: bias across groups, and consent.

02 · Concepts (the teacher's version)

The five ideas — and the traps

1. Two questions, two models

A detector finds faces and draws boxes; it doesn't care who. A recognizer takes each face and figures out who it is. They're separate, swappable models. The detector runs in both modes (you always find a face first); the recognizer only matters when you want a name.

2. A face becomes numbers

You can't compare faces pixel-by-pixel — light and angle change every pixel. A neural network (trained on millions of faces) turns a face into a faceprint: a fixed list of numbers, i.e. a point in a high-dimensional space. Same person → nearby points; different people → far apart. Identity becomes geometry: measure the distance.

3. The threshold is a distance — and it's the recognizer's

The match threshold is the largest distance still counted as “same person.” It belongs to the recognizer, not the detector. Crucially it's a distance, not a confidence percentage, so:

MoveEffectFailure it causes
threshold DOWNonly near-perfect matches count — stricterfalse negative (misses a real person)
threshold UPloose matches count — more forgivingfalse positive (mistakes a stranger)

Lower = stricter. Each recognizer produces embeddings on its own scale, so each needs its own threshold (e.g. Facenet512 ≈ 0.30, ArcFace ≈ 0.68). The lab sets this automatically when you change the recognizer — that's why arbitrary detector×recognizer pairings “just work” here.

4. Speed vs. accuracy is measurable

Heavier models are usually more accurate but slower and use more memory. Two live numbers tell the story: camera fps (frames arriving) vs. process fps (frames finished). When camera fps > process fps, the compute is the bottleneck, not the camera. Two levers: pick a lighter model, or shrink the image (Full → Fast).

5. Where the brain lives (edge AI)

The same task can run on a laptop (big models) or on the robot's own small computer (light models, tiny memory). Running on the device means millisecond answers, no internet needed, and the video never leaves the robot — the direction phones, cars, and robots are all heading.

Misconceptions to pre-empt

  • “Higher threshold = stricter / more accurate.” No — it's a distance. Lower is stricter. (A confidence percentage would be the other way; the dashboard shows a distance.)
  • “The recognizer finds the face.” The detector finds; the recognizer identifies.
  • “The AI reads the face like a photo.” It converts the face to numbers and compares distances.
  • “One threshold is correct for every model.” Each recognizer has its own scale.
  • “It works the same for everyone.” Accuracy can differ across skin tones, ages, and lighting — a fairness issue, not just a number.

03 · Run of show

A 75-minute flow

  1. 5 minHook. Have the robot greet a volunteer by name. Ask: “How did it know? What would it need to see?” Collect guesses; don't answer yet.
  2. 10 minDetection. Open Detect mode. Watch boxes appear. Switch detectors; watch recognize ms change. Point: this only answers where, not who.
  3. 15 minRecognition + enrollment. Switch to Recognize. Click a student's face, type a name (enrollment = storing a faceprint). The robot greets by name. Introduce the faceprint idea.
  4. 15 minThe threshold game. Drag the threshold down until the robot loses the enrolled student (false negative), then up until it mistakes someone else (false positive). Name the tradeoff.
  5. 15 minSpeed & hardware. Try presets (Fast / Balanced / Accurate). Toggle Full/Fast and watch the picture and the numbers. Compare the laptop dashboard with the on-device one for the same face.
  6. 15 minEthics + wrap. Run the discussion questions. Close by connecting the whole path: lens → box → numbers → name → wave.

04 · Experiments → concepts

What each activity teaches

ActivityConceptWhat to look forAsk the class
Switch detectorsspeed vs. accuracyrecognize ms swings; some detectors miss facesWhy is the fast one sometimes wrong?
Tune thresholdfalse neg vs. false posthe same face flips between known/unknownWhich error is worse here, and why?
Full → Fastresolution & compute costpicture blurs; process fps jumps upWhat did we trade away for speed?
Laptop vs. deviceedge AI tradeoffsdifferent recognize ms and mem MBWhen would you run on the robot itself?
Draw a zonescoping / triggersfaces outside the box are ignoredWhere is “only react in this area” useful?

05 · Talk about it

Discussion & check for understanding

Discussion (open-ended)

  • When is a false positive worse than a false negative? Compare unlocking your phone, tagging photos, and building security.
  • Should a robot be allowed to recognize people who didn't agree to it? Who should decide?
  • Why might a model be less accurate for some people than others? How would you test whether yours is fair?
  • Name one place face recognition should not be used. Defend it.

Quick checks (with answers)

Q. Which control decides “who is it” — detector or recognizer?

A. The recognizer. The detector only finds where faces are.

Q. You lower the threshold. Does the robot recognize more people or fewer?

A. Fewer — lower is stricter (more false negatives).

Q. Camera fps is 25 and process fps is 2. What's the bottleneck?

A. Compute — frames arrive faster than the model can process them.

Q. Switching to a faster detector but it now misses a far-away face. What happened?

A. You traded accuracy (especially on small/distant faces) for speed.

06 · Curriculum fit

Mapping to your “Enrollment & Inference” framing

This lab lines up with the standard face-pipeline framing — with one correction worth making explicit to students:

Your termIn this lab
EnrollmentClick a face → type a name. Stores that person's faceprint (embedding).
InferenceThe live loop: make a faceprint of each face, compare to enrolled ones.
Confidence thresholdingPresent, but it's a distance, not a percentage: lower = stricter. Frame the “thresholding game” that way so students tune in the right direction.
Feature template / signatureThe faceprint/embedding — produced by the deep recognizer, not from facial landmarks (landmarks just align the face first).

07 · Glossary

Terms, plainly

DetectionFinding that a face is present and where (a box). No identity.
RecognitionDeciding whose face it is, by comparing to known people.
Detector / RecognizerThe model that finds faces / the model that identifies them.
Embedding / faceprintA face turned into a fixed list of numbers (a point in space).
DistanceHow far apart two faceprints are; small = alike.
Match thresholdMax distance still counted as the same person. Lower = stricter.
False positive / negativeWrongly matching a stranger / wrongly missing a known person.
EnrollmentRegistering a person by saving their faceprint.
InferenceRunning the model live to get an answer.
Edge / on-device / NPURunning the model on the device itself; an NPU is a chip built for that.
Robot Vision Lab — teacher's guide. Pair with the student field guide and RUN.md.