← Back to Developer

Computer vision · on a real robot

Teaching a robot to find faces, know who's who, and say hi.

The robot's camera streams to a screen. Software draws a box around every face, turns each one into a string of numbers, and decides if it's someone it knows — then the robot greets them. This guide is how it works, and how you can push it.

01

How a machine sees a face

Two different questions, two different jobs.

People do it in one glance, but for a computer, “there's a face” and “that's Maria” are two separate problems — solved by two separate models you can swap.

Detection

Is there a face?

Scan the image and draw a box around anything that looks like a face. It doesn't care who — just where. Fast, and needs no database.

Recognition

Whose face is it?

Take each boxed face and compare it to people the system has met before. This is the slower, heavier step — and it needs a memory of faces.

The trick: a face becomes numbers

Recognition can't compare pictures pixel-by-pixel — lighting and angle change every pixel. Instead a neural network turns each face into a faceprint: a fixed list of numbers (an embedding) that captures the shape of a face. The same person's faceprints land close together; different people land far apart. Comparing two faces becomes measuring the distance between two number-lists.

The network learned to do this by studying huge collections of faces, so the numbers capture what genuinely makes people look different — not the lighting or the background. Mathematically, a faceprint is a single point in a space of hundreds of dimensions, and “how alike” is just how close two points sit. That's the quiet idea under most modern AI: turn messy real-world things into points, then do geometry.

Strict or forgiving? You decide.

“Close enough to be the same person” is a dial called the match threshold. In this lab it's a distance — smaller distance means more alike — so lower = stricter:

  • Turn it down: only near-perfect matches count. The robot may fail to recognize you after you change the lighting or tilt your head — a false negative.
  • Turn it up: loose matches count. The robot may mistake a stranger for your teammate — a false positive.

There's no “correct” setting — only the right tradeoff for the job. Tuning that dial is real engineering.

02

The pipeline

From lens to “hello” — and where the work actually happens.

The camera lives on the robot, but the thinking can happen somewhere else. Frames flow one way; a greeting flows back.

Robot camera30 frames/s
→
Bridgestream ~200 KB/frame
→
Computefind + recognize
→
Robotspeak + wave

Why split it up?

The camera hands over frames far faster than a heavy model can study them. Sending the video is cheap — each frame is compressed to a couple hundred kilobytes. The expensive part is the thinking. So the network is almost never the bottleneck; the compute is. That single fact shapes every choice that follows.

Three places the brain can live

path A

Your laptop

big models

Runs the largest, most accurate models. Heavy on memory, but you've got plenty.

path B

The robot's own computer

on-device

A lightweight model runs right on the robot — no laptop needed, and a tiny memory footprint.

path C

A GPU box

the fast lane

A dedicated graphics chip runs big models fast — the best of both, when you have the hardware.

Same task, three homes for the brain. Put them side by side and the tradeoffs stop being abstract — you can read them off the numbers.

03

Driving the lab

The dashboard is a cockpit. Here's what every control does.

Open the dashboard and you'll see the live camera on the left and a stack of controls on the right. Nothing you touch can break it — poke everything.

The controls

  • Mode — Detect (just find people) or Recognize (find + identify). The whole page changes color so you always know which brain is on.
  • Presets — one click loads a matched detector + recognizer + the right threshold (Fast, Balanced, or Accurate). Start here, then tweak. Each recognizer needs its own threshold, so the lab sets it for you when you switch.
  • Detector — the model that finds faces. Recognizer — the model that makes the faceprint. Swap either.
  • Match threshold — the strict/forgiving dial from chapter 1 (lower = stricter).
  • Detection zone — drag a box on the video to react only inside it. Handy for “greet people who reach the door.”
  • Click a face — give it a name. That's enrollment: the system stores that person's faceprint so it can recognize them later.

Read the instruments

The live readout is the truth. The two numbers to watch: camera fps (how fast frames arrive) and process fps (how fast the model keeps up). When camera fps is much higher than process fps, the model is the bottleneck — exactly what chapter 2 predicted.

Experiments worth running

  • Speed vs. accuracy. Keep a face in view and switch detectors. Watch recognize ms jump from tens of milliseconds to nearly a second.try: opencv → retinaface, and back
  • Break the recognizer on purpose. Enroll yourself, then drag the threshold until the robot loses you (false negative), then until it “recognizes” a friend as you (false positive).try: find the sweet spot in between
  • Race the hardware. Open the laptop dashboard and the on-device dashboard side by side. Compare recognize ms and mem MB for the same face.try: which is faster? which is lighter?
  • Guard one spot. Drag a detection zone on the video so only faces inside the box count. People get ignored until they step into it.try: greet people only when they reach a marked spot
  • Full vs. Fast. Flip the detection input from Full to Fast — the software shrinks the picture before looking. Watch recognize ms drop and process fps climb — then check what it costs you: does a face across the room still get a box?try: Full → Fast, and back
04

Frontier & fine print

Where this is heading — and the responsibility that comes with it.

The edge is winning

For years, “AI” meant shipping your data to a giant server far away. That's changing. Modern robots, phones, and cameras increasingly carry a dedicated NPU (neural processing unit) — a chip built specifically to run neural networks right where the data is. Computing at the edge like this means answers in milliseconds, no internet required, and the video never has to leave the device. Doorbells, cars, and robots are all moving this way.

What you'd build next

Running a model on a regular processor works, but it leaves the NPU idle. The next step is compiling a model into the special form an NPU understands, which can make detection several times faster on the very same device — a “regular processor vs. NPU” race you can already start to feel in the numbers.

Use it well

Face technology is powerful and sensitive. Recognition models can be less accurate for some groups than others, so a threshold that's fair for one person can be unfair to another. Recognizing people should happen with their knowledge and consent. As you build, keep asking not just “does it work?” but “who could this get wrong, and who gets to say yes?”

You now know the whole path — from a lens, to a box, to a string of numbers, to a name, to a wave. Go make the robot say hi.

+

Key terms

The words you'll hear, plainly.

detectionFinding that a face is present, and where (a box). Doesn't care who.
recognitionDeciding whose face it is, by comparing to people you've added.
detector / recognizerThe model that finds faces / the model that identifies them. Two separate, swappable models.
faceprint (embedding)A face turned into a fixed list of numbers — a point in space. Same person, nearby points.
match thresholdHow close two faceprints must be to count as the same person. Lower = stricter.
false positive / negativeWrongly matching a stranger / wrongly missing someone you know.
enrollmentRegistering a person by saving their faceprint (click a face, add a name).
edge / on-device / NPURunning the model on the device itself; an NPU is a chip built to do that fast.