From 3b5aa69536c0bed312de7cf3f081aa108e5aae78 Mon Sep 17 00:00:00 2001 From: Jorijn van der Graaf Date: Thu, 3 Sep 2026 00:20:34 +0200 Subject: [PATCH] Threshold at 1.5x doubles the tap rate; add coverage-guided enrolment The threshold change is the first thing to move accuracy. Labelled protocol, enrolled quick taps: 4 of 10, against 2 of 10 for every previous build. Seven of fifteen presses now get two or more frames where none did before, and the landing frames the old threshold discarded turn up in the transcript at 207, 213, 242 and 284. Wrong finger still 0 of 5. It also explains the latency asymmetry Jorijn noticed. A match ends the loop the moment it happens, mean 1317 ms. A no-match waits for the finger to lift, mean 2190 ms, because a later frame in the same press may still match -- and they do, at frames 3, 5 and 8. That is the press rule working, not a fault. What the same run says about the template is worse than the loop ever was. One press produced eight frames at full contact, 362 to 367, and every one rejected; another produced six. Roughly one frame in seven matches, against the 47 to 75 percent the journal records for the template the research harness enrolled. The first template here was ten quick taps in about one position, so the algorithm was handed ten near-duplicate images of one spot. fpenrol.sh enrols with a different contact position per ACCEPTED sample -- centre, left, right, tip, joint, rolled either way -- driven by fprintd-enroll's own per-stage output rather than by counting presses. Enrol as a SECOND finger so both templates coexist and the comparison holds the loop constant; the trustlet reports which fid matched, and the daemon's map turns that back into a name. --- packaging/fpenrol.sh | 48 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100755 packaging/fpenrol.sh diff --git a/packaging/fpenrol.sh b/packaging/fpenrol.sh new file mode 100755 index 0000000..3bf46f8 --- /dev/null +++ b/packaging/fpenrol.sh @@ -0,0 +1,48 @@ +#!/bin/sh +# fpenrol.sh -- enrol a finger with COVERAGE guidance. +# +# fpenrol.sh [finger_name] default right-middle-finger +# +# The first template on this device was enrolled from ten quick taps in +# roughly one position, and it matches roughly one frame in seven -- against +# 47-75% for the template the research harness enrolled. The algorithm was +# given ten near-duplicate images of one spot, so it recognises that spot and +# little else. +# +# This walks a different contact position per accepted sample. It reads +# fprintd-enroll's per-stage output and prompts the next position as each +# stage passes, so the guidance tracks what the trustlet ACCEPTED rather than +# how many times you pressed. +F=${1:-right-middle-finger} +i=1 +set -- "centre of the pad" \ + "slightly LEFT of centre" \ + "slightly RIGHT of centre" \ + "higher up, toward the TIP" \ + "lower down, toward the JOINT" \ + "centre again, rolled LEFT" \ + "centre again, rolled RIGHT" \ + "tip, rolled slightly left" \ + "joint, rolled slightly right" \ + "centre, pressed a little firmer" +echo "enrolling $F with position guidance -- 10 samples" +echo "press FLAT and firm, hold about a second, then LIFT fully." +echo +# The reader runs in a subshell, so `shift` there cannot advance the caller's +# list. Index into it instead. +pos() { eval "printf '%s' \"\$$1\""; } +echo ">>> sample 1/10: $(pos 1)" +fprintd-enroll -f "$F" user 2>&1 | while IFS= read -r line; do + case "$line" in + *enroll-stage-passed*) + i=$((i+1)) + if [ "$i" -le 10 ]; then + echo " accepted." + echo ">>> sample $i/10: $(pos $i)" + fi ;; + *enroll-retry-scan*) echo " not accepted -- same position, press flatter and firmer" ;; + *enroll-completed*) echo; echo "COMPLETED." ;; + *enroll-failed*) echo; echo "FAILED." ;; + *) printf '%s\n' "$line" ;; + esac +done