CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/face-recognition-calibration

Production-grade dlib face_recognition toolkit: piecewise confidence formula, enrollment quality diagnostics, and producer-side persistence for flicker suppression.

69

Quality

87%

Does it follow best practices?

Run evals on this skill

Adds up to 20 points to the overall score

View guide

SecuritybySnyk

Passed

No findings from the security scan

Overview
Quality
Evals
Security
Files

face-recognition-calibration

A Tessl plugin that encodes a perceptually-correct confidence formula for the face_recognition (dlib) library, plus enrollment best practices and the Python 3.14 install trap.

What this plugin provides

KindNamePurpose
Skillface-recognition-confidencePiecewise distance → confidence mapping, enrollment workflow, validation checks.
Ruleface-recognition-calibration-rulesConcise in-context reminder card.
Scriptscripts/confidence.pyReference implementation of the mapping and enrollment helpers.

Why it exists

The textbook 1 - distance / tolerance mapping is technically correct and empirically useless — a strong match at d = 0.38 shows up as 0.37 on a UI meter and the demo looks broken. This plugin uses a piecewise mapping that reflects how operators actually read the numbers:

d <= 0.30  ->  1.0   (strong match)
d >= 0.60  ->  0.0   (reject)
else       ->  (0.60 - d) / 0.30

Same d = 0.38 now scores 0.73. The meter matches the vibe.

It also documents the Python 3.14 install trap: face_recognition_models depends on pkg_resources, which setuptools removed in 82+. Pin setuptools==75.8.0.

Install

tessl install jbaruch/face-recognition-calibration

Or from this repo:

tessl install github:jbaruch/face-recognition-calibration

Usage (quick)

from scripts.confidence import confidence, best_match, load_enrollment

enrolled = load_enrollment("faces.pkl")
name, distance, conf = best_match(live_encoding, enrolled)
print(f"{name} d={distance:.2f} conf={conf:.2f}")

See skills/face-recognition-confidence/SKILL.md for the full guidance and rules/face-recognition-calibration-rules.md for the short version.

License

MIT — see LICENSE.

Workspace
jbaruch
Visibility
Public
Created
Last updated
Publish Source
GitHub
Badge
jbaruch/face-recognition-calibration badge