At a glance
| Upstream model | dima806/fairface_age_image_detection |
|---|---|
| Loaded ONNX repo |
onnx-community/fairface_age_image_detection-ONNX
(onnx/model_quantized.onnx)
|
| Pipeline task | image-classification · { top_k: null } (all 9 scores) |
| Architecture |
ViTForImageClassification — ViT-Base/16, 12 layers, 768-d, 224×224 input,
ViTFeatureExtractor (rescale 1/255, normalise mean 0.5 / std 0.5)
|
| Labels (live id2label) | 0-2 · 3-9 · 10-19 · 20-29 · 30-39 · 40-49 · 50-59 · 60-69 · more than 70 |
| Backend & size |
CPU WASM q8 — 87.34 MB (87,339,068 B) via the shared
@huggingface/transformers@3.7.5 pin in lib/webai.js. No GPU required.
|
| License | Apache-2.0 (model card); FairFace dataset CC BY 4.0 |
Predictions are noisy, swing with lighting, crop, pose, make-up and image quality, and only reflect how the FairFace annotators' bracket taxonomy maps onto a face. Never use this for age-gating, identity verification, eligibility, or any automated decision about a person. Photos never leave your device.
Interactive 9-bracket distribution & uncertainty
Pick a rights-cleared portrait, or upload / drop / paste your own photo (or take one with your camera). The model scores all nine brackets; we derive the expected midpoint, the 10th–90th percentile interval, and the entropy that tells you how unsure it is.
Initialising model loader…
No photo selected yet.
Top-3 brackets
- Run the model to see the top-3 brackets.
Bars are ordered youngest → oldest. "more than 70" is open-ended; for midpoint maths we assume [70, 85) — a documented modelling choice, not a model output.
Raw pipeline output (exact label/score pairs)
[]
See inside the code
The exact ES modules running on this page — the off-main-thread worker and the pure uncertainty maths.
Show the code — worker.js: ensureLoaded() (shared 3.7.5 WASM q8 + epoch guards)
Show the code — worker.js: classifyImage() (0×0 guard, white-flatten, top_k: null)
Show the code — age-core.mjs: orderDistribution() (dynamic 9-bracket ordering)
Show the code — age-core.mjs: computeAgeStats() (midpoint, interval, entropy)
Explore the 5-route use-case ladder
Basics: Crop & Framing Sensitivity
Run full scene vs head-and-shoulders vs tight face on the same photo and watch the age distribution move.
Practical: Photo-Archive Auditor
Queue many photos, compare soft vs hard bracket totals, flag high-uncertainty images, export CSV/JSON.
Wild: Lighting/Blur Stress-Tester
Apply real brightness, contrast, blur and grayscale perturbations, or monitor a live webcam's entropy.
Multi-model: YuNet → FairFace
Detect every face in a group photo (0.23 MB YuNet), crop each one, and estimate its age distribution.