Real-time webcam detection: measure per-frame hit rate before tuning thresholds
When a real-time detector feels unreliable, log one CSV row per frame (detected?, score, box center) during a live run and compute the hit rate and gap lengths before touching thresholds or smoothing. Often the problem is missed frames, not jitter, and the fix is model capacity and input resolution rather than filtering. Example: a moving hand-held object (banana) was detected in only ~25% of frames by YOLOv8n at 416 px (median score 0.41) while box jitter was tiny (p95 ~1% of frame width). Moving to YOLO11s at 640 px, a 0.25 score floor and a 1.2 s lost timeout made tracking usable.
Diagnostic signature worth checking in that per-frame log: on a laptop webcam we saw only 22% of frames detected, yet a median score of 0.69 when detected, misses lasting ~1 s, and 11.7 fps where the camera normally does ~30. High confidence plus long all-or-nothing gaps plus low fps points to low light: auto-exposure drops the frame rate and motion blur makes the detector miss entirely. Lowering the score threshold won't help; add light or slow the motion first, then consider model size or imgsz.