CtrlK
BlogDocsLog inGet started
Tessl Logo

jbaruch/face-recognition-calibration-djl

Empirical calibration for DJL face_feature (ArcFace/FaceNet 512-d) embeddings: cosine distance bands, piecewise confidence formula, enrollment quality targets. Replaces the dlib-based jbaruch/face-recognition-calibration tile for Kotlin/JVM pipelines.

81

2.17x
Quality

86%

Does it follow best practices?

Impact

100%

2.17x

Average score across 2 eval scenarios

SecuritybySnyk

Passed

No known issues

Overview
Quality
Evals
Security
Files

face-recognition-calibration-djl

A Tessl plugin encoding empirical calibration for DJL face_feature embeddings (ArcFace-derived, 512-d L2-normalized, cosine distance) — the Kotlin/JVM equivalent of jbaruch/face-recognition-calibration, which targets dlib's Python face_recognition library instead.

What this plugin provides

KindNamePurpose
Skillface-recognition-confidence-djlPiecewise confidence mapping for DJL cosine distances. d ≤ 0.30 → 1.0, d ≥ 0.65 → 0.0, linear between. Includes the full FaceFeatureTranslator + L2-normalized enrollment averaging + threshold guidance.
Ruleface-recognition-calibration-djl-rulesDistance band cheat sheet, color order, Haar parameter relaxation for enrollment, install traps.

Why it exists

The textbook similarity formula conf = 1 - d / tolerance (where tolerance = 0.6) is technically correct and demo-wrong for DJL face_feature distances. A strong recognition at d ≈ 0.30 returns conf = 0.50 — yellow in any 3-band semaphore. The user leans into the camera to "improve the signal" and confidence climbs from 0.50 to 0.67. They look uncertain about the demo.

The piecewise formula in this plugin returns conf = 1.0 at d = 0.30 — solid green where it belongs. Calibrated against the actual distance distribution we measured on hardware: strong matches cluster at 0.18–0.40, rejects above 0.65, with a clear gap between.

Use this plugin if

  • You're using DJL face_feature (PyTorch engine, 512-d) for face recognition on Kotlin/JVM.
  • A strong-looking recognition still reads as "weak" downstream.
  • You're driving a confidence display (semaphore, progress bar, gauge) that needs strong matches to register as strong.

Use jbaruch/face-recognition-calibration instead if you're on Python with dlib's face_recognition library — the constants differ (d ≥ 0.60 → 0.0 for dlib L2 vs d ≥ 0.65 → 0.0 for DJL cosine).

Install

tessl install jbaruch/face-recognition-calibration-djl

License

MIT — see LICENSE.

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