# CPU reference-quality probe — 2026-09-10

Evidence for `182.C.06.06`, and **a correction**. This item was recorded earlier
the same day as `blocked-local` on the grounds that it needed a hosted GPU
worker and an image decoder the BFF does not have. That was wrong. Most of it
runs on this machine, and the numbers below are the check.

## Machine

Linux, 15 GiB RAM, 4 cores. Not the 16 GB MacBook Air the phase constraints
describe — worth noting, because the "hardware-blocked locally" assumption in
`182.C.01.10` was inherited from that description rather than measured here.

Available: `ffmpeg` with `blurdetect`, `signalstats`, `freezedetect`,
`signature`; `onnxruntime` 1.25.1; `numpy`. Not available: `cv2`, `mediapipe`,
`PIL`, `insightface` — but `pip` and PyPI/GitHub/HuggingFace are reachable, and
Python packages do not touch the pnpm lockfile, so the `CLAUDE.md` install
caution does not apply. `opencv-python-headless` was installed into a **venv**
rather than the shared system interpreter.

## Blur and exposure — ffmpeg, no new dependency

| Image                         | `lavfi.blur` | `YAVG`    | `YMIN` |
| ----------------------------- | ------------ | --------- | ------ |
| `face_one_person.png` (sharp) | **6.43**     | 114.1     | 16     |
| same, `boxblur=8:2`           | **23.88**    | 114.1     | 17     |
| same, `eq=brightness=0.45`    | 5.63         | **203.6** | 127    |

Blur separates 3.7×, and brightness moves `YAVG` 114 → 204 while leaving blur
alone. The default thresholds (`maxBlur` 15, `maxLumaAverage` 200) sit between
the measured pairs, and tests assert that separation directly.

This repo already shells to ffmpeg for `video-probe.ts` and `audio-probe.ts`, so
these two metrics needed no new dependency at all — which is the part of the
original "blocked" call that was least defensible.

## Face geometry and head pose — YuNet on CPU

`tools/human-video/face-geometry.py`, using YuNet
(`face_detection_yunet_2023mar.onnx`, OpenCV Zoo, **Apache-2.0**, 227 KB, sha256
`8f2383e4…`). Licence matters here: it is commercially usable, unlike the
insightface weights `182.C.02.06` flagged in `apps/psyche/avatar-engine`.

Head pose is a real **SQPnP** fit of a canonical 3D face model against YuNet's
five landmarks, so the angles are degrees rather than a ratio named as one.

Run against the same office photo the vision-model probe used
(`../2026-09-10-openrouter-face-detection/`):

| Face (by size) | `relativeArea` | yaw   | pitch | roll  |
| -------------- | -------------- | ----- | ----- | ----- |
| foreground #1  | 0.01027        | 0.1°  | 0.7°  | −1.4° |
| foreground #2  | 0.00966        | −0.4° | −1.2° | 0.3°  |
| background     | 0.00195        | 0.9°  | 41.7° | −0.4° |
| background     | 0.00084        | 85.0° | 86.1° | 6.3°  |
| background     | 0.00049        | 45.5° | 75.3° | 2.5°  |

`face_no_people.png` → 0 faces. `face_one_person.png` → 1 face, yaw −1.5°.

**This is what the vision-language model could not do.** Asked to count, two
VLMs said "2" and "6" and both were defensible. The detector says: two faces at
~1% of frame facing the camera, three at 0.05–0.2% turned 45–85° away. That
separation is numeric, reproducible, and is exactly the subject-versus-bystander
distinction the identity pack gate needs.

## Duplicate detection

dHash over an ffmpeg-decoded 9×8 grayscale, computed in TypeScript. Gradient
based rather than average based, so it survives the exposure change a re-encode
introduces — asserted by a test that a 40-level brightness shift stays within
the duplicate threshold while an inverted ramp does not.

## What is still outstanding

Two of the nine metrics the task lists are **not** delivered:

- **Occlusion.** YuNet returns five landmarks with no per-landmark visibility,
  and nothing here can tell a hand in front of a mouth from a closed mouth.
  Needs a landmark-visibility or segmentation model.
- **Full-body visibility.** `cv2` 5.0 dropped `HOGDescriptor`, and no person
  detector is bundled. What is implemented is `fullBodyLikelyInFrame`, a
  geometric estimate from head height against the 7.5-head canon — named for
  what it is. It answers "is the frame tall enough to hold this body", not "is
  the body unoccluded"; a desk in the way is invisible to it.

So `182.C.06.06` stayed **unchecked** after this probe — seven of nine metrics
were real measurements, one was an honestly-scoped estimate, and one was missing
— but its status was no longer `blocked-local`. It was ordinary remaining work,
and the blocker that had been recorded against it did not exist.

**Both were delivered later the same day**, on this machine's CPU, in
[`../2026-09-10-cpu-occlusion-and-body/`](../2026-09-10-cpu-occlusion-and-body/):
occlusion from MediaPipe's multiclass selfie segmenter (face-skin 0.835 clear
against 0.248–0.568 occluded, with an untouched control face steady at
0.733–0.840), and full-body visibility from MediaPipe Pose Landmarker, which is
also the person detector this section said was missing. That folder also records
the approach that failed: MediaPipe's own per-landmark `visibility` score does
not move when a landmark is covered.

`182.C.19` is a separate matter and remains genuinely blocked: YuNet detects and
poses, it does not **embed**, and the C4 identity threshold compares
ArcFace-class embeddings.
