fix: lower detection threshold and improve IR camera timing for Lenovo#38
Open
amletoflorio wants to merge 2 commits intoVladush:masterfrom
Open
fix: lower detection threshold and improve IR camera timing for Lenovo#38amletoflorio wants to merge 2 commits intoVladush:masterfrom
amletoflorio wants to merge 2 commits intoVladush:masterfrom
Conversation
Owner
|
@amletoflorio Thanks for opening the PR. I'll take a look on it as soon as my schedule will allow me that. |
- Lower DEFAULT_DETECTION_THRESHOLD from 0.9 to 0.6 - Increase IR_TRIGGER_DELAY_MS from 200ms to 1500ms - Increase CAMERA_WARMUP_FRAMES (10->15) and CAMERA_WARMUP_DELAY_MS (100->200ms) - Always save failed enrollment frame with brightness and score info - Add YuNet face score logging to help diagnose threshold issues - Add docs/LENOVO_IR_DEBUG.md with full troubleshooting guide Tested on Lenovo with Ubuntu 26.04, /dev/video2 IR camera.
59e3450 to
7cc2ba1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
On Lenovo laptops with IR cameras, enrollment fails with:
ENROLL_FAIL Found 0 faces in ir. Expecting exactly 1.Root causes
detection_threshold = 0.9is too high for IR cameras — YuNet scoresrarely exceed 0.7 on grayscale/low-contrast IR images.
IR_TRIGGER_DELAY_MS = 200msis too short for Lenovo IR emitters,resulting in near-black frames (brightness ~14/255) at capture time.
Changes
DEFAULT_DETECTION_THRESHOLDfrom 0.9 to 0.6IR_TRIGGER_DELAY_MSfrom 200ms to 1500msCAMERA_WARMUP_FRAMES(10→15) andCAMERA_WARMUP_DELAY_MS(100→200ms)docs/LENOVO_IR_DEBUG.mdwith full troubleshooting guideTested on
Lenovo laptop, Ubuntu 26.04, kernel 7.x, IR camera on /dev/video2