A recognition system is defined less by its matches than by its edges, what it does with a face it does not know, and how honestly its operator understands its errors. This post is both edges as built, the unknown-face alerts, and the accuracy truths that decide what a system like this may responsibly be used for.
Unknowns first. The matching post’s code already produces the answer’s raw material, a face whose distance to every known encoding exceeds tolerance comes back as Unknown, and the app treats that as an event, not a shrug. An unknown detection captures the frame, logs the event with camera and time like any other, and raises an alert, a popup in the interface plus an optional sound, with its own cooldown so one stranger at the door is one alert, not a siren:
def handle_unknown(self, frame, camera_name):
now = time.time()
if now - self.last_unknown_alert < self.detection_cooldown:
return
self.last_unknown_alert = now
image_path = self.save_capture(frame, 'unknown', camera_name)
self.db_manager.log_event('Unknown', camera_name, image_path)
self.alert_queue.put(('Unknown person detected', camera_name, image_path))
The captured image is the design’s honesty, an Unknown log row alone is noise, the saved frame lets a human answer the only question that matters, who was that actually, a delivery, a guest, or a stranger, the system flags, the human judges.
Now accuracy, in plain words, because this is where such systems get oversold. Two error types exist and trade against each other through the tolerance, false rejects, a known person read as Unknown, and false accepts, a stranger matched to a known name. Conditions move both, backlighting and dim scenes degrade encodings, angles and partial faces miss detection entirely, and the known-photo quality from earlier posts sets each person’s baseline. On my hardware at my doorway, well-lit frontal faces recognise reliably, and edge conditions produce edge results, which is the honest sentence most marketing omits. And one boundary is structural, this system performs no liveness detection, a printed photo of a known face can match, because matching is what it does, which is exactly why the idea post scoped it as a logger and assistant, evidence and awareness, a record with images a human reviews, and never the sole lock on anything that matters.
A few things people ask me about this
How do I reduce false alarms for family members? Better known photos first, clear, frontal, well-lit, one per person, then a slightly looser tolerance tested against your own people, and decent lighting at the camera, most false rejects are lighting wearing a bug’s costume.
Can it tell a real face from a photo? No, and honest systems say so. Liveness detection is separate, harder technology. Treat matches as strong hints with saved evidence, not as proof of presence.
Next
Every recognition, known and unknown, flows into the system’s memory, the log database with search, filters, and export. That layer is the next post.
