-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathconstants.js
More file actions
47 lines (37 loc) · 1.57 KB
/
Copy pathconstants.js
File metadata and controls
47 lines (37 loc) · 1.57 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
export const VERSION = '1.0.0';
export const MEDIAPIPE_CDN = 'https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.17';
export const MEDIAPIPE_WASM = `${MEDIAPIPE_CDN}/wasm`;
export const MEDIAPIPE_VISION = `${MEDIAPIPE_CDN}/vision_bundle.mjs`;
export const MEDIAPIPE_MODEL =
'https://storage.googleapis.com/mediapipe-models/' +
'face_landmarker/face_landmarker/float16/1/' +
'face_landmarker.task';
export const FACEAPI_CDN = 'https://cdn.jsdelivr.net/npm/face-api.js@0.22.2/dist/face-api.min.js';
export const FACEAPI_MODEL_CDN =
'https://cdn.jsdelivr.net/gh/justadudewhohacks/face-api.js@master/weights';
export const MAX_RETRIES = 3;
export const ERROR_STEP_SECONDS = 5;
export const AGE_INPUT_SIZE = 320;
export const AGE_SAMPLE_FRAMES = 9;
export const AGE_SAMPLE_INTERVAL_MS = 220;
export const AGE_FRAME_TIMEOUT_MS = 4000;
export const BURST_FRAMES = AGE_SAMPLE_FRAMES;
export const BURST_INTERVAL_MS = AGE_SAMPLE_INTERVAL_MS;
export const POSITION_CHECK_MS = 100;
export const MOTION_CAPTURE_MS = 3000;
export const MOTION_SAMPLE_MS = 100;
export const TOKEN_EXPIRY_S = 300;
export const STABLE_FRAMES_REQUIRED = 10;
export const MIN_BRIGHTNESS = 80;
export const MIN_AGE_SAMPLES = 4;
export const MIN_FACE_SCORE = 0.6;
export const PASS_MARGIN = 2;
export const BORDERLINE_BAND = 2;
export const MAX_AGE_SPREAD = 6;
export const TASK_TIMEOUT_MS = 8000;
export const MIN_TASK_TIME_MS = 500;
export const TASK_COUNT = 3;
export const REQUIRED_TASK_PASSES = 2;
export const POPUP_MIN_WIDTH = 340;
export const POPUP_MIN_HEIGHT = 520;
export const POPUP_MARGIN = 12;