Skip to content

armgit / facex

Public Imported from GitHub
0

Full face stack that runs entirely in the browser. Detection, 576-point 3D mesh, recognition, anti-spoof, smile — all WebAssembly, zero server. Apache 2.0.

Remove 160px retry — too slow on mobile, 96px only

atynov02faaaff9fbd
diff --git a/docs/demo/index.html b/docs/demo/index.html
index 97e939a..42deaad 100644
--- a/docs/demo/index.html
+++ b/docs/demo/index.html
@@ -383,19 +383,11 @@ async function doCapture() {
finishCapture(faces, detMs);
return;
}
- // WASM fallback
- $('resultBar').textContent = 'Detecting face (96px)...';
+ // WASM fallback — 96px only (160px too slow on mobile)
+ $('resultBar').textContent = 'Detecting face...';
setTimeout(() => {
- let { faces, detMs } = runDetect(96);
- if (faces.length) {
- finishCapture(faces, detMs);
- } else {
- $('resultBar').textContent = 'Not found. Retrying at 160px...';
- setTimeout(() => {
- const r2 = runDetect(160);
- finishCapture(r2.faces, detMs + r2.detMs);
- }, 50);
- }
+ const { faces, detMs } = runDetect(96);
+ finishCapture(faces, detMs);
}, 50);
}
function finishCapture(faces, detMs) {