Methodology
The math, the thresholds, and the caveats.
This is a geometry-led styling tool, not a clinical or biometric classifier. The goal is to make the estimate inspectable, not to claim scientific certainty.
Landmark alignment
The model returns normalized coordinates. The app converts them to image pixels, finds the midpoint of the outer eye corners, and rotates every point by the negative eye-line angle. This reduces the effect of head roll before widths and lengths are compared. Measurements are still sensitive to yaw, pitch, lens distortion, and cropping.
Measurement definitions
The report uses the following normalized features. Distances are computed after eye-line alignment.
| Feature | Formula | Inputs |
|---|---|---|
| lengthToWidth | Face length ÷ cheek width | Hairline point to chin, divided by the widest cheekbone distance (landmarks 234/454). |
| foreheadToJaw | Forehead width ÷ jaw width | Temple width (landmarks 127/356) divided by the distance between the jaw corners (58/288). |
| cheekToJaw | Cheek width ÷ jaw width | Cheekbone width divided by jaw-corner width. |
| foreheadToCheek | Forehead width ÷ cheek width | Upper-face width relative to the mid-face. |
| jawToFace | Jaw width ÷ cheek width | Lower-face width relative to the widest cheek line. |
| chinTaper | (Jaw width − lower-jaw width) ÷ jaw width | Lower-jaw taper: how much the lower face narrows between the jaw corners (58/288) and the lower-jaw points (172/397). |
| jawAngle | Angle at the jaw corner | Reported for inspection. It is not used in the score because it overlaps across shapes and shifts with head pose. |
Classification
Each of the seven shapes has a prototype: a target range and a tolerance for each feature, plus a weight. A value inside the range scores 1. Outside the range, the score decays with a Gaussian penalty based on the distance and the tolerance. The weighted scores are averaged, normalized so they sum to 1, and sorted.
The highest normalized score is the primary reading. The next distinct shape is shown as the secondary reading when it has a meaningful share. The report displays relative geometry fit, with the top reading indexed to 100. It is not a probability.
The jaw contour angle is shown in the report but is deliberately excluded from the weighted score. Its measured ranges overlap across prototypes, and the angle changes with yaw, pitch, and jaw definition.
Confidence
- Clear: capture quality is at least 58, the top prototype fits at least 0.66 on the raw scale, and the top reading leads the second by at least 0.09 normalized score.
- Moderate: capture quality is at least 58, the top prototype fits at least 0.52, and the margin is at least 0.035.
- Exploratory: the margin is below 0.035, the top prototype fits below 0.52, or capture quality is below 58. Treat the result as a starting point.
These labels describe the internal geometry fit, not validated accuracy against expert labels.
The manual correction is a human override. It changes the primary label and is stored with the report, but it does not change the measured ratios or the underlying scores.
Capture-quality checks
The app scores face count, face area, sharpness (variance of a Laplacian on the face crop), mean luminance, clipped highlights, head roll, yaw estimate, pitch estimate, and eye openness from blendshapes. Each issue carries a severity and a deduction. The score is a heuristic, not a calibrated image-quality index.
Skin-tone estimate
Pixels are sampled from ellipses on both cheeks and the forehead. Very dark, very bright, and strongly saturated pixels are skipped. The median sRGB colour is converted to CIE Lab (D65) and used to calculate ITA = atan((L − 50) / b) in degrees. Depth bands follow broad ITA ranges. Undertone is a hue/warmth heuristic with an olive check. Confidence combines sample count and the median absolute deviation of L.
This is a visible-colour estimate from a photograph. It is not a dermatological measurement, a race category, or a stable identity label. Lighting, makeup, filters, and camera processing can change it substantially.
Styling rules
Hair, glasses, grooming, colour, outfit, shoe, and fragrance suggestions come from fixed rules and curated lists keyed to shape, undertone, occasion, and fit. The outfit builder is deterministic: the same inputs produce the same output. There is no generative model and no remote recommendation service.
Validation status
A small, documented 7-class set is included under tests/fixtures/face-shapes: seven tuning images, fourteen diagnostic images, and five external 5-class images. The publisher-assigned labels are single-source and unaudited. The 7-class images look synthetic or template-derived, and the external celebrity labels are visibly inconsistent with their measured proportions.
Thirteen of the fourteen diagnostic images read as Square. That is not an accuracy result. The set's measured proportions are nearly constant, the two images per class share dimensions, and several cross-class perceptual hashes are very close. The scorer already marks every one of them exploratory because the top readings are near-tied. The set is useful for exercising the pipeline and documenting failure modes; it is not a trustworthy benchmark.
The app also does not use a trained image classifier. The public five-class celebrity dataset evaluated for this project contains only female celebrities, has unaudited single-source labels, includes near-duplicate images across its published splits, and carries embedded third-party copyright notices that conflict with its CC0 metadata. Those limitations make it unsuitable for a production model that must work for men and women and be distributed commercially. No per-class, per-gender, or confusion-matrix accuracy is claimed.
The automatic lower-jaw taper was corrected to use landmarks 136/365 on the jaw contour below the gonion and above the chin, instead of the jaw-angle level. On five local public-domain portraits the corrected value ranged 0.209-0.249 with a standard deviation of about 0.015, so it is displayed for inspection but excluded from the automatic score. This is a measurement correction, not a threshold tuned against the diagnostic labels. The same five portraits produced near-tied Square/Round or Square/Oval readings and were all marked ambiguous. The full data and model audit is in docs/DATA_AND_MODEL_AUDIT.md.
What would justify a trained model
A future image classifier would need commercially compatible image and model licenses, independently annotated labels with reported agreement, identity-disjoint splits, and meaningful male/female, age, skin-tone, hairstyle, facial-hair, lighting, and image-quality coverage. It would also need a frozen independent test set and per-class, per-gender, and per-skin-tone error reporting. Until then, the geometric estimate with visible uncertainty is the honest production choice. Diamond and Triangle remain exploratory; no training labels were invented for them.
Known limitations
- The model sees a 2D image, not bone structure. It estimates visible proportions.
- No accuracy benchmark against expert anthropometric measurement is claimed. The thresholds are design choices, not published clinical cutoffs.
- No representative demographic validation exists. The app reports uncertainty rather than a demographic accuracy claim.
- Lens distortion, head pose, hairstyle, glasses, facial hair, and cropping can shift the result.
- Face-shape labels are a styling convenience. Real faces often sit between categories.
- The app does not assess attractiveness, age, gender, ethnicity, health, or identity.
Third-party components
Face landmarks are produced by the MediaPipe Face Landmarker (Apache 2.0). Fonts are Geist and Geist Mono via Fontsource. Icons are Lucide and inline SVG. The site has no analytics, advertising, or external AI API dependencies at runtime.
Contact and corrections
If you find a measurement bug or a misleading claim, please send a note. Corrections to the methodology are welcome.