How Selfbaus measures a photo.
Every check runs the same open pipeline: a frame-check gate first, then deterministic pixel and geometry measurements, then a draft technical score. This page documents each step, its units, and its limits. Engine version 0.2.0, report contract selfbaus.analysis/2.
Step 1 - the frame-check gate
Before anything is scored, the photo must pass independent capture checks. If any fails, Selfbaus reports retake needed with practical guidance and produces no score. A bad input is never graded.
| Check | Rule (engine 0.2.0) | What you are told |
|---|---|---|
| Readable image | Single-frame JPEG or PNG, up to 20 MiB and 24 megapixels | Capture a new JPEG or PNG |
| One face | Exactly one verified face; zero or more than one fails | Keep one complete face visible |
| Face large enough | Shorter image edge at least 256 px; face box at least 3% of frame and 64 px on its short side; aspect ratio between 0.5 and 2 | Keep the complete face clearly visible |
| Sharp | Laplacian variance at least 8 (at 256 px long edge) | Brace the phone, clean the lens, tap to focus |
| Not underexposed | Mean luminance at least 0.12 and shadow clipping at most 70% | Move to brighter, even frontal light |
| Not overexposed | Mean luminance at most 0.92 and highlight clipping at most 70% | Reduce direct light, avoid a bright background |
| Verifiable pose | Head yaw and pitch within 10 degrees, roll within 5 degrees (proposed limits) | Camera at eye level, face the lens squarely |
Step 2 - what is measured
When a complete face is detected, exposure, contrast, sharpness and noise are measured inside the face box; otherwise on the whole frame. No fitted rating models are involved at this step.
| Metric | Method | Units |
|---|---|---|
| Exposure | Mean luminance of the histogram, plus shadow and highlight clipping | luminance 0-1; clipping percent |
| Contrast | Histogram RMS and 5th-to-95th percentile spread | 0-1 |
| Sharpness | Laplacian variance after bilinear resize to 256 px long edge | variance |
| Noise | High-frequency residual proxy (Immerkær-style high-pass sigma) at up to 1024 px long edge | sigma 0-255 |
| Color balance | Reported as not measurable - no verified neutral reference is available | - |
| Resolution | Megapixels and minimum dimension | MP; px |
| Face framing | Face-box share of the frame and offset from frame center | percent; normalized offset |
| Head pose | Yaw, pitch, roll from the pinned face model | degrees |
| Frame geometry | Reflection symmetry and facial proportions normalized by iris-center separation (IPD ratios) | IPD ratio |
Measurement overlay and three ratios
Step 3 - the photo-quality score
The 0-100 photo-quality score is a draft heuristic composite (rubric/1.0-draft) over the photo leaves only: sharpness, exposure, noise, contrast, color balance, resolution, framing and pose, with fixed draft weights. Leaves that cannot be measured stay empty and the remaining weights are renormalized - unavailable evidence never becomes a number. It is an indicative technical score of that shot, not a rater prediction and not a score of your face.
Category, overall and potential scores, and every per-aspect score, deliberately report not measurable in this build: the presentation and aesthetic detectors they would require are not validated, so the product does not show them.