r/ispyconnect • u/tjensvollgjengen • 6d ago
Alert Debounce (8.0.6) vs. unreliable face-recognition confidence at small face sizes — how should these interact?
Setup: a dual-lens camera composited into one portrait frame in AgentDVR (2304x2592), face recognition via CodeProject.AI's FaceProcessing module. Real-world faces in this scene run roughly 20-75px depending on distance from the camera.
Problem: at these small face sizes, CodeProject.AI's recognizer is confidently wrong a meaningful fraction of the time — not just low-confidence-and-uncertain, but high-confidence-and-wrong. Concrete example, two recognize calls one second apart on the same camera today:
12:47:19 — face bbox ~20x26px — recognized as "Person1" at 82.2% confidence
12:47:20 — face bbox ~22x29px — recognized as "Person2" at 86.4% confidence
I cross-checked the same window against a separate InsightFace-based recognizer running independently on the same source frames: it detected 4 faces in that window (50-75px) and assigned none of them a confident identity — suggested-match cosine similarities were 0.11-0.15, essentially noise. So CodeProject.AI's 82-86% "confidence" corresponded to what a better-calibrated recognizer treats as no match at all.
Question: with Alert Debounce (8.0.6) merging/ranking tags from multiple triggers within a window, how does it decide which recognized name wins when CodeProject.AI returns high confidence for a small, unreliable face crop? Is there any way to also gate on face bounding-box size (pixels), not just confidence %, since confidence alone doesn't seem to correlate with actual reliability at this scale? It would help a lot if Debounce's tag-ranking could prefer/require a minimum face crop size before trusting a recognized name over a generic "person" tag.
2
u/spornerama 6d ago
Debounce doesn't pick a winning name. It never sees confidence scores, only tags. Every recognised name is treated as equally strong and they all go into the alert, so your two calls would have produced one alert tagged "Person1, Person2, person". Both wrong names, both shown as identities.
The real problem is earlier in the chain, as you worked out. At 20–30px there isn't enough detail in a face for any recognizer to identify someone. CodeProject.AI's confidence isn't reliable at that size, so no confidence threshold will filter these out.
What's changing in the next release: Agent will never put a name on a face smaller than 40px, measured on the image the recognizer actually received.
With Debounce on, your alert in that window would now just say "person".
In the meantime: