← All models

face-image-quality · vision · WASM · ~7 MB

Face image-quality assessment

Before a system tries to recognise a face, it asks a cheaper question: is this capture even good enough? A blurry, dark, or off-angle face wastes compute and produces unreliable matches. Face image-quality assessment scores exactly that — a single number for how usable a face crop is. eDifFIQA(T) is a tiny (~7 MB) model distilled from a diffusion-based quality teacher. Rank real faces below, then blur or darken one and watch the score fall. Runs entirely on your device; nothing leaves the tab.

At a glance

Modelopencv/face_image_quality_assessment_ediffiqa — eDifFIQA(T), OpenCV Zoo
Taskface-image-quality (biometric capture-quality scoring) — run via raw ONNX Runtime Web (see note below)
Runtimeonnxruntime-web 1.21 (transformers.js has no face-IQA class / no such task)
Inputinput [1, 3, 112, 112] float32 in 0–1 — an aligned face crop (plain RGB)
Outputoutput [1, 1] float32 — a scalar quality score (higher = a better face for recognition)
Quantizationfp32 ONNX — runs on the plain WASM execution provider, no WebGPU needed
BackendWebAssembly (single-threaded on GitHub Pages) — well under a second per face
Download~7 MB, cached after first load (auto-inits on return)
LicenseApache-2.0 (OpenCV Zoo)
Web APIsWebAssembly, Web Workers, OffscreenCanvas, ImageBitmap — all Baseline widely available

Run it

Licensed portraits, scored + ranked by the model (higher = more usable capture).

Degrade a face → watch the score fall

Blur or darken a real capture and re-score it — the honesty check that the model tracks quality, not identity.

Adds your face photo (centre-cropped square) to the Face list and scores it.

Use-case ladder

Why raw ONNX Runtime Web?

Transformers.js has no face-IQA model class or task, so we run eDifFIQA's ONNX graph directly with onnxruntime-web: crop the face to 112×112, pack it as [1,3,112,112] float32 in 0–1, and read the scalar quality output. It doesn't identify anyone — it only judges the capture — and it all happens on your device.