@moveris/shared 3.10.0 → 3.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +59 -24
- package/dist/index.d.mts +3 -3
- package/dist/index.d.ts +3 -3
- package/dist/index.js +66 -10
- package/dist/index.mjs +66 -10
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -213,18 +213,42 @@ Model selection for liveness detection speed/accuracy trade-off.
|
|
|
213
213
|
|
|
214
214
|
```typescript
|
|
215
215
|
type FastCheckModel =
|
|
216
|
+
| 'mixed-10-v3_1'
|
|
217
|
+
| 'mixed-30-v3_1'
|
|
218
|
+
| 'mixed-60-v3_1'
|
|
219
|
+
| 'mixed-90-v3_1' // Mixed v3_1 models (latest)
|
|
220
|
+
| 'mixed-10-v3'
|
|
221
|
+
| 'mixed-30-v3'
|
|
222
|
+
| 'mixed-60-v3' // Mixed v3 models
|
|
216
223
|
| 'mixed-10-v2'
|
|
217
224
|
| 'mixed-30-v2'
|
|
218
225
|
| 'mixed-60-v2'
|
|
219
226
|
| 'mixed-90-v2'
|
|
220
|
-
| 'mixed-120-v2' //
|
|
227
|
+
| 'mixed-120-v2' // Mixed v2 models
|
|
221
228
|
| '10'
|
|
222
229
|
| '50'
|
|
223
230
|
| '250' // Legacy standard models
|
|
224
231
|
| (string & object); // Forward-compatible with future model IDs
|
|
225
232
|
```
|
|
226
233
|
|
|
227
|
-
|
|
234
|
+
Mixed v3_1 models (alias: `'v3_1'`):
|
|
235
|
+
|
|
236
|
+
| Value | Frames | Description |
|
|
237
|
+
| ----------------- | ------ | ------------------------------ |
|
|
238
|
+
| `'mixed-10-v3_1'` | 10 | Fast verification, low latency |
|
|
239
|
+
| `'mixed-30-v3_1'` | 30 | Balanced speed and accuracy |
|
|
240
|
+
| `'mixed-60-v3_1'` | 60 | Higher accuracy |
|
|
241
|
+
| `'mixed-90-v3_1'` | 90 | High accuracy |
|
|
242
|
+
|
|
243
|
+
Mixed v3 models (alias: `'v3'`):
|
|
244
|
+
|
|
245
|
+
| Value | Frames | Description |
|
|
246
|
+
| --------------- | ------ | ------------------------------ |
|
|
247
|
+
| `'mixed-10-v3'` | 10 | Fast verification, low latency |
|
|
248
|
+
| `'mixed-30-v3'` | 30 | Balanced speed and accuracy |
|
|
249
|
+
| `'mixed-60-v3'` | 60 | Higher accuracy |
|
|
250
|
+
|
|
251
|
+
Mixed v2 models (alias: `'v2'`):
|
|
228
252
|
|
|
229
253
|
| Value | Frames | Description |
|
|
230
254
|
| ---------------- | ------ | ------------------------------ |
|
|
@@ -374,12 +398,23 @@ interface CropData {
|
|
|
374
398
|
Version alias sent via the `X-Model-Version` request header for server-side model resolution.
|
|
375
399
|
|
|
376
400
|
```typescript
|
|
377
|
-
type ModelVersion =
|
|
401
|
+
type ModelVersion =
|
|
402
|
+
| 'latest'
|
|
403
|
+
| 'v3_1'
|
|
404
|
+
| 'v3'
|
|
405
|
+
| 'v2'
|
|
406
|
+
| 'v1'
|
|
407
|
+
| 'fast'
|
|
408
|
+
| 'spatial'
|
|
409
|
+
| 'hybrid'
|
|
410
|
+
| (string & object);
|
|
378
411
|
```
|
|
379
412
|
|
|
380
413
|
| Value | Resolves to |
|
|
381
414
|
| ----------- | ----------------------------------- |
|
|
382
415
|
| `'latest'` | Current production mixed-v2 model |
|
|
416
|
+
| `'v3_1'` | Mixed v3_1 models |
|
|
417
|
+
| `'v3'` | Mixed v3 models |
|
|
383
418
|
| `'v2'` | Pinned mixed-v2 version |
|
|
384
419
|
| `'v1'` | Legacy mixed-v1 models (deprecated) |
|
|
385
420
|
| `'fast'` | Model `'10'` |
|
|
@@ -578,27 +613,27 @@ const status = getStatusMessage('capturing', DEFAULT_LOCALE);
|
|
|
578
613
|
|
|
579
614
|
#### Feedback Keys
|
|
580
615
|
|
|
581
|
-
| Key | English
|
|
582
|
-
| ------------------- |
|
|
583
|
-
| `no_face` | "No face detected"
|
|
584
|
-
| `face_not_centered` | "Center your face in the
|
|
585
|
-
| `too_close` | "Move back a little"
|
|
586
|
-
| `too_far` | "Move closer"
|
|
587
|
-
| `poor_lighting` | "Improve lighting"
|
|
588
|
-
| `hold_still` | "Hold still"
|
|
589
|
-
| `capturing` | "Capturing..."
|
|
590
|
-
| `processing` | "Processing..."
|
|
591
|
-
| `success` | "Verification complete"
|
|
592
|
-
| `failed` | "Verification failed"
|
|
593
|
-
| `eyes_not_visible` | "Eyes not clearly visible"
|
|
594
|
-
| `eyes_shadowed` | "Eyes are in shadow…"
|
|
595
|
-
| `eyes_overexposed` | "Eye region overexposed…"
|
|
596
|
-
| `glasses_glare` | "Glare detected…"
|
|
597
|
-
| `eye_quality_poor` | "Eye region quality is poor"
|
|
598
|
-
| `camera_angle_low` | "Raise camera to eye level"
|
|
599
|
-
| `camera_angle_high` | "Lower camera to eye level"
|
|
600
|
-
| `camera_tilted` | "Hold camera level"
|
|
601
|
-
| `flat_lighting` | "Find better lighting"
|
|
616
|
+
| Key | English | Description |
|
|
617
|
+
| ------------------- | -------------------------------- | --------------------------------------------------------------------------------- |
|
|
618
|
+
| `no_face` | "No face detected" | Face detection failed |
|
|
619
|
+
| `face_not_centered` | "Center your face in the circle" | Face outside guide |
|
|
620
|
+
| `too_close` | "Move back a little" | Face too close to camera |
|
|
621
|
+
| `too_far` | "Move closer" | Face too far from camera |
|
|
622
|
+
| `poor_lighting` | "Improve lighting" | Insufficient light |
|
|
623
|
+
| `hold_still` | "Hold still" | Movement detected |
|
|
624
|
+
| `capturing` | "Capturing..." | Frame capture in progress |
|
|
625
|
+
| `processing` | "Processing..." | API verification in progress |
|
|
626
|
+
| `success` | "Verification complete" | Successful completion |
|
|
627
|
+
| `failed` | "Verification failed" | Failed verification |
|
|
628
|
+
| `eyes_not_visible` | "Eyes not clearly visible" | Eye region featureless |
|
|
629
|
+
| `eyes_shadowed` | "Eyes are in shadow…" | Eye region too dark |
|
|
630
|
+
| `eyes_overexposed` | "Eye region overexposed…" | Eye region too bright |
|
|
631
|
+
| `glasses_glare` | "Glare detected…" | Specular highlights on eyes |
|
|
632
|
+
| `eye_quality_poor` | "Eye region quality is poor" | Generic eye quality failure |
|
|
633
|
+
| `camera_angle_low` | "Raise camera to eye level" | Camera below face (Y < 0.3) |
|
|
634
|
+
| `camera_angle_high` | "Lower camera to eye level" | Camera above face (Y > 0.7) |
|
|
635
|
+
| `camera_tilted` | "Hold camera level" | Device tilt > 15° (via transformation matrix, falls back to eye-corner landmarks) |
|
|
636
|
+
| `flat_lighting` | "Find better lighting" | Face-region dynamic range < 60 L-units — soft warning, capture continues |
|
|
602
637
|
|
|
603
638
|
---
|
|
604
639
|
|
package/dist/index.d.mts
CHANGED
|
@@ -42,8 +42,8 @@ interface ModelEntry {
|
|
|
42
42
|
aliases?: string[];
|
|
43
43
|
}
|
|
44
44
|
type ModelsResponse = ModelEntry[];
|
|
45
|
-
type FastCheckModel = '10' | '50' | '250' | 'hybrid-v2-10' | 'hybrid-v2-30' | 'hybrid-v2-50' | 'hybrid-v2-60' | 'hybrid-v2-90' | 'hybrid-v2-100' | 'hybrid-v2-125' | 'hybrid-v2-150' | 'hybrid-v2-250' | 'mixed-10' | 'mixed-30' | 'mixed-60' | 'mixed-90' | 'mixed-120' | 'mixed-150' | 'mixed-250' | 'mixed-10-v2' | 'mixed-30-v2' | 'mixed-60-v2' | 'mixed-90-v2' | 'mixed-120-v2' | (string & object);
|
|
46
|
-
type ModelVersion = 'latest' | 'v2' | '
|
|
45
|
+
type FastCheckModel = '10' | '50' | '250' | 'hybrid-v2-10' | 'hybrid-v2-30' | 'hybrid-v2-50' | 'hybrid-v2-60' | 'hybrid-v2-90' | 'hybrid-v2-100' | 'hybrid-v2-125' | 'hybrid-v2-150' | 'hybrid-v2-250' | 'mixed-10' | 'mixed-30' | 'mixed-60' | 'mixed-90' | 'mixed-120' | 'mixed-150' | 'mixed-250' | 'mixed-10-v2' | 'mixed-30-v2' | 'mixed-60-v2' | 'mixed-90-v2' | 'mixed-120-v2' | 'mixed-10-v3' | 'mixed-30-v3' | 'mixed-60-v3' | 'mixed-10-v3_1' | 'mixed-30-v3_1' | 'mixed-60-v3_1' | 'mixed-90-v3_1' | (string & object);
|
|
46
|
+
type ModelVersion = 'latest' | 'v1' | 'v2' | 'v3' | 'v3_1' | 'fast' | 'spatial' | 'hybrid' | (string & object);
|
|
47
47
|
interface DeprecationInfo {
|
|
48
48
|
deprecated: boolean;
|
|
49
49
|
resolvedModel: string;
|
|
@@ -849,7 +849,7 @@ declare const DEFAULT_STATUS_MESSAGES: {
|
|
|
849
849
|
};
|
|
850
850
|
type StatusMessageKey = keyof typeof DEFAULT_STATUS_MESSAGES;
|
|
851
851
|
declare const FEEDBACK_MESSAGES: {
|
|
852
|
-
readonly position_face: "Position your face in the
|
|
852
|
+
readonly position_face: "Position your face in the circle";
|
|
853
853
|
readonly no_face: "No face detected - move into frame";
|
|
854
854
|
readonly multiple_faces: "Multiple people detected - please verify alone";
|
|
855
855
|
readonly move_closer_to_center: "Move closer to center";
|
package/dist/index.d.ts
CHANGED
|
@@ -42,8 +42,8 @@ interface ModelEntry {
|
|
|
42
42
|
aliases?: string[];
|
|
43
43
|
}
|
|
44
44
|
type ModelsResponse = ModelEntry[];
|
|
45
|
-
type FastCheckModel = '10' | '50' | '250' | 'hybrid-v2-10' | 'hybrid-v2-30' | 'hybrid-v2-50' | 'hybrid-v2-60' | 'hybrid-v2-90' | 'hybrid-v2-100' | 'hybrid-v2-125' | 'hybrid-v2-150' | 'hybrid-v2-250' | 'mixed-10' | 'mixed-30' | 'mixed-60' | 'mixed-90' | 'mixed-120' | 'mixed-150' | 'mixed-250' | 'mixed-10-v2' | 'mixed-30-v2' | 'mixed-60-v2' | 'mixed-90-v2' | 'mixed-120-v2' | (string & object);
|
|
46
|
-
type ModelVersion = 'latest' | 'v2' | '
|
|
45
|
+
type FastCheckModel = '10' | '50' | '250' | 'hybrid-v2-10' | 'hybrid-v2-30' | 'hybrid-v2-50' | 'hybrid-v2-60' | 'hybrid-v2-90' | 'hybrid-v2-100' | 'hybrid-v2-125' | 'hybrid-v2-150' | 'hybrid-v2-250' | 'mixed-10' | 'mixed-30' | 'mixed-60' | 'mixed-90' | 'mixed-120' | 'mixed-150' | 'mixed-250' | 'mixed-10-v2' | 'mixed-30-v2' | 'mixed-60-v2' | 'mixed-90-v2' | 'mixed-120-v2' | 'mixed-10-v3' | 'mixed-30-v3' | 'mixed-60-v3' | 'mixed-10-v3_1' | 'mixed-30-v3_1' | 'mixed-60-v3_1' | 'mixed-90-v3_1' | (string & object);
|
|
46
|
+
type ModelVersion = 'latest' | 'v1' | 'v2' | 'v3' | 'v3_1' | 'fast' | 'spatial' | 'hybrid' | (string & object);
|
|
47
47
|
interface DeprecationInfo {
|
|
48
48
|
deprecated: boolean;
|
|
49
49
|
resolvedModel: string;
|
|
@@ -849,7 +849,7 @@ declare const DEFAULT_STATUS_MESSAGES: {
|
|
|
849
849
|
};
|
|
850
850
|
type StatusMessageKey = keyof typeof DEFAULT_STATUS_MESSAGES;
|
|
851
851
|
declare const FEEDBACK_MESSAGES: {
|
|
852
|
-
readonly position_face: "Position your face in the
|
|
852
|
+
readonly position_face: "Position your face in the circle";
|
|
853
853
|
readonly no_face: "No face detected - move into frame";
|
|
854
854
|
readonly multiple_faces: "Multiple people detected - please verify alone";
|
|
855
855
|
readonly move_closer_to_center: "Move closer to center";
|
package/dist/index.js
CHANGED
|
@@ -239,7 +239,7 @@ async function sleep(ms) {
|
|
|
239
239
|
}
|
|
240
240
|
|
|
241
241
|
// package.json
|
|
242
|
-
var version = "3.
|
|
242
|
+
var version = "3.12.0";
|
|
243
243
|
|
|
244
244
|
// src/utils/deviceIntelligence.ts
|
|
245
245
|
var IPINFO_URL = "https://ipinfo.io/json";
|
|
@@ -1357,6 +1357,64 @@ var MODEL_CONFIGS = {
|
|
|
1357
1357
|
description: "Mixed V2 120-frame model",
|
|
1358
1358
|
deprecated: false,
|
|
1359
1359
|
aliases: ["latest", "v2"]
|
|
1360
|
+
},
|
|
1361
|
+
// Mixed V3 models
|
|
1362
|
+
"mixed-10-v3": {
|
|
1363
|
+
type: "mixed-10-v3",
|
|
1364
|
+
minFrames: 10,
|
|
1365
|
+
recommendedFrames: 10,
|
|
1366
|
+
description: "Mixed V3 10-frame model",
|
|
1367
|
+
deprecated: false,
|
|
1368
|
+
aliases: ["v3"]
|
|
1369
|
+
},
|
|
1370
|
+
"mixed-30-v3": {
|
|
1371
|
+
type: "mixed-30-v3",
|
|
1372
|
+
minFrames: 30,
|
|
1373
|
+
recommendedFrames: 30,
|
|
1374
|
+
description: "Mixed V3 30-frame model",
|
|
1375
|
+
deprecated: false,
|
|
1376
|
+
aliases: ["v3"]
|
|
1377
|
+
},
|
|
1378
|
+
"mixed-60-v3": {
|
|
1379
|
+
type: "mixed-60-v3",
|
|
1380
|
+
minFrames: 60,
|
|
1381
|
+
recommendedFrames: 60,
|
|
1382
|
+
description: "Mixed V3 60-frame model",
|
|
1383
|
+
deprecated: false,
|
|
1384
|
+
aliases: ["v3"]
|
|
1385
|
+
},
|
|
1386
|
+
// Mixed V3_1 models
|
|
1387
|
+
"mixed-10-v3_1": {
|
|
1388
|
+
type: "mixed-10-v3_1",
|
|
1389
|
+
minFrames: 10,
|
|
1390
|
+
recommendedFrames: 10,
|
|
1391
|
+
description: "Mixed V3.1 10-frame model",
|
|
1392
|
+
deprecated: false,
|
|
1393
|
+
aliases: ["v3_1"]
|
|
1394
|
+
},
|
|
1395
|
+
"mixed-30-v3_1": {
|
|
1396
|
+
type: "mixed-30-v3_1",
|
|
1397
|
+
minFrames: 30,
|
|
1398
|
+
recommendedFrames: 30,
|
|
1399
|
+
description: "Mixed V3.1 30-frame model",
|
|
1400
|
+
deprecated: false,
|
|
1401
|
+
aliases: ["v3_1"]
|
|
1402
|
+
},
|
|
1403
|
+
"mixed-60-v3_1": {
|
|
1404
|
+
type: "mixed-60-v3_1",
|
|
1405
|
+
minFrames: 60,
|
|
1406
|
+
recommendedFrames: 60,
|
|
1407
|
+
description: "Mixed V3.1 60-frame model",
|
|
1408
|
+
deprecated: false,
|
|
1409
|
+
aliases: ["v3_1"]
|
|
1410
|
+
},
|
|
1411
|
+
"mixed-90-v3_1": {
|
|
1412
|
+
type: "mixed-90-v3_1",
|
|
1413
|
+
minFrames: 90,
|
|
1414
|
+
recommendedFrames: 90,
|
|
1415
|
+
description: "Mixed V3.1 90-frame model",
|
|
1416
|
+
deprecated: false,
|
|
1417
|
+
aliases: ["v3_1"]
|
|
1360
1418
|
}
|
|
1361
1419
|
};
|
|
1362
1420
|
var HYBRID_MODEL_CONFIGS = {
|
|
@@ -1537,7 +1595,7 @@ var DEFAULT_STATUS_MESSAGES = {
|
|
|
1537
1595
|
};
|
|
1538
1596
|
var FEEDBACK_MESSAGES = {
|
|
1539
1597
|
// Initial / No face (Red state)
|
|
1540
|
-
position_face: "Position your face in the
|
|
1598
|
+
position_face: "Position your face in the circle",
|
|
1541
1599
|
no_face: "No face detected - move into frame",
|
|
1542
1600
|
multiple_faces: "Multiple people detected - please verify alone",
|
|
1543
1601
|
// Poor alignment (Orange state) - alignment < 50%
|
|
@@ -1601,7 +1659,7 @@ var ES_LOCALE = {
|
|
|
1601
1659
|
},
|
|
1602
1660
|
feedback: {
|
|
1603
1661
|
// Initial / No face (Red state)
|
|
1604
|
-
position_face: "Posiciona tu rostro en el \
|
|
1662
|
+
position_face: "Posiciona tu rostro en el c\xEDrculo",
|
|
1605
1663
|
no_face: "No se detecta rostro - mu\xE9vete al marco",
|
|
1606
1664
|
multiple_faces: "Varias personas detectadas - verifica solo",
|
|
1607
1665
|
// Poor alignment (Orange state)
|
|
@@ -1939,16 +1997,14 @@ function isFaceFullyVisible(boundingBox, frameWidth, frameHeight) {
|
|
|
1939
1997
|
var OVAL_REGION_DESKTOP = {
|
|
1940
1998
|
centerX: 0.5,
|
|
1941
1999
|
centerY: 0.5,
|
|
1942
|
-
width: 0.
|
|
1943
|
-
height: 0.
|
|
1944
|
-
// 0.36 * (4/3)
|
|
2000
|
+
width: 0.45,
|
|
2001
|
+
height: 0.45
|
|
1945
2002
|
};
|
|
1946
2003
|
var OVAL_REGION_MOBILE = {
|
|
1947
2004
|
centerX: 0.5,
|
|
1948
2005
|
centerY: 0.5,
|
|
1949
|
-
width: 0.
|
|
1950
|
-
height: 0.
|
|
1951
|
-
// 0.48 * (4/3)
|
|
2006
|
+
width: 0.62,
|
|
2007
|
+
height: 0.62
|
|
1952
2008
|
};
|
|
1953
2009
|
var DEFAULT_OVAL_REGION = OVAL_REGION_DESKTOP;
|
|
1954
2010
|
function isFaceInOval(faceBox, frameWidth, frameHeight, oval = DEFAULT_OVAL_REGION, tolerance = 0.3) {
|
|
@@ -1980,7 +2036,7 @@ function isFaceInOval(faceBox, frameWidth, frameHeight, oval = DEFAULT_OVAL_REGI
|
|
|
1980
2036
|
} else if (dx > 0.1) {
|
|
1981
2037
|
feedback = "Move face left";
|
|
1982
2038
|
} else {
|
|
1983
|
-
feedback = "Center your face in the
|
|
2039
|
+
feedback = "Center your face in the circle";
|
|
1984
2040
|
}
|
|
1985
2041
|
} else if (tooSmall) {
|
|
1986
2042
|
feedback = "Move closer";
|
package/dist/index.mjs
CHANGED
|
@@ -97,7 +97,7 @@ async function sleep(ms) {
|
|
|
97
97
|
}
|
|
98
98
|
|
|
99
99
|
// package.json
|
|
100
|
-
var version = "3.
|
|
100
|
+
var version = "3.12.0";
|
|
101
101
|
|
|
102
102
|
// src/utils/deviceIntelligence.ts
|
|
103
103
|
var IPINFO_URL = "https://ipinfo.io/json";
|
|
@@ -1215,6 +1215,64 @@ var MODEL_CONFIGS = {
|
|
|
1215
1215
|
description: "Mixed V2 120-frame model",
|
|
1216
1216
|
deprecated: false,
|
|
1217
1217
|
aliases: ["latest", "v2"]
|
|
1218
|
+
},
|
|
1219
|
+
// Mixed V3 models
|
|
1220
|
+
"mixed-10-v3": {
|
|
1221
|
+
type: "mixed-10-v3",
|
|
1222
|
+
minFrames: 10,
|
|
1223
|
+
recommendedFrames: 10,
|
|
1224
|
+
description: "Mixed V3 10-frame model",
|
|
1225
|
+
deprecated: false,
|
|
1226
|
+
aliases: ["v3"]
|
|
1227
|
+
},
|
|
1228
|
+
"mixed-30-v3": {
|
|
1229
|
+
type: "mixed-30-v3",
|
|
1230
|
+
minFrames: 30,
|
|
1231
|
+
recommendedFrames: 30,
|
|
1232
|
+
description: "Mixed V3 30-frame model",
|
|
1233
|
+
deprecated: false,
|
|
1234
|
+
aliases: ["v3"]
|
|
1235
|
+
},
|
|
1236
|
+
"mixed-60-v3": {
|
|
1237
|
+
type: "mixed-60-v3",
|
|
1238
|
+
minFrames: 60,
|
|
1239
|
+
recommendedFrames: 60,
|
|
1240
|
+
description: "Mixed V3 60-frame model",
|
|
1241
|
+
deprecated: false,
|
|
1242
|
+
aliases: ["v3"]
|
|
1243
|
+
},
|
|
1244
|
+
// Mixed V3_1 models
|
|
1245
|
+
"mixed-10-v3_1": {
|
|
1246
|
+
type: "mixed-10-v3_1",
|
|
1247
|
+
minFrames: 10,
|
|
1248
|
+
recommendedFrames: 10,
|
|
1249
|
+
description: "Mixed V3.1 10-frame model",
|
|
1250
|
+
deprecated: false,
|
|
1251
|
+
aliases: ["v3_1"]
|
|
1252
|
+
},
|
|
1253
|
+
"mixed-30-v3_1": {
|
|
1254
|
+
type: "mixed-30-v3_1",
|
|
1255
|
+
minFrames: 30,
|
|
1256
|
+
recommendedFrames: 30,
|
|
1257
|
+
description: "Mixed V3.1 30-frame model",
|
|
1258
|
+
deprecated: false,
|
|
1259
|
+
aliases: ["v3_1"]
|
|
1260
|
+
},
|
|
1261
|
+
"mixed-60-v3_1": {
|
|
1262
|
+
type: "mixed-60-v3_1",
|
|
1263
|
+
minFrames: 60,
|
|
1264
|
+
recommendedFrames: 60,
|
|
1265
|
+
description: "Mixed V3.1 60-frame model",
|
|
1266
|
+
deprecated: false,
|
|
1267
|
+
aliases: ["v3_1"]
|
|
1268
|
+
},
|
|
1269
|
+
"mixed-90-v3_1": {
|
|
1270
|
+
type: "mixed-90-v3_1",
|
|
1271
|
+
minFrames: 90,
|
|
1272
|
+
recommendedFrames: 90,
|
|
1273
|
+
description: "Mixed V3.1 90-frame model",
|
|
1274
|
+
deprecated: false,
|
|
1275
|
+
aliases: ["v3_1"]
|
|
1218
1276
|
}
|
|
1219
1277
|
};
|
|
1220
1278
|
var HYBRID_MODEL_CONFIGS = {
|
|
@@ -1395,7 +1453,7 @@ var DEFAULT_STATUS_MESSAGES = {
|
|
|
1395
1453
|
};
|
|
1396
1454
|
var FEEDBACK_MESSAGES = {
|
|
1397
1455
|
// Initial / No face (Red state)
|
|
1398
|
-
position_face: "Position your face in the
|
|
1456
|
+
position_face: "Position your face in the circle",
|
|
1399
1457
|
no_face: "No face detected - move into frame",
|
|
1400
1458
|
multiple_faces: "Multiple people detected - please verify alone",
|
|
1401
1459
|
// Poor alignment (Orange state) - alignment < 50%
|
|
@@ -1459,7 +1517,7 @@ var ES_LOCALE = {
|
|
|
1459
1517
|
},
|
|
1460
1518
|
feedback: {
|
|
1461
1519
|
// Initial / No face (Red state)
|
|
1462
|
-
position_face: "Posiciona tu rostro en el \
|
|
1520
|
+
position_face: "Posiciona tu rostro en el c\xEDrculo",
|
|
1463
1521
|
no_face: "No se detecta rostro - mu\xE9vete al marco",
|
|
1464
1522
|
multiple_faces: "Varias personas detectadas - verifica solo",
|
|
1465
1523
|
// Poor alignment (Orange state)
|
|
@@ -1797,16 +1855,14 @@ function isFaceFullyVisible(boundingBox, frameWidth, frameHeight) {
|
|
|
1797
1855
|
var OVAL_REGION_DESKTOP = {
|
|
1798
1856
|
centerX: 0.5,
|
|
1799
1857
|
centerY: 0.5,
|
|
1800
|
-
width: 0.
|
|
1801
|
-
height: 0.
|
|
1802
|
-
// 0.36 * (4/3)
|
|
1858
|
+
width: 0.45,
|
|
1859
|
+
height: 0.45
|
|
1803
1860
|
};
|
|
1804
1861
|
var OVAL_REGION_MOBILE = {
|
|
1805
1862
|
centerX: 0.5,
|
|
1806
1863
|
centerY: 0.5,
|
|
1807
|
-
width: 0.
|
|
1808
|
-
height: 0.
|
|
1809
|
-
// 0.48 * (4/3)
|
|
1864
|
+
width: 0.62,
|
|
1865
|
+
height: 0.62
|
|
1810
1866
|
};
|
|
1811
1867
|
var DEFAULT_OVAL_REGION = OVAL_REGION_DESKTOP;
|
|
1812
1868
|
function isFaceInOval(faceBox, frameWidth, frameHeight, oval = DEFAULT_OVAL_REGION, tolerance = 0.3) {
|
|
@@ -1838,7 +1894,7 @@ function isFaceInOval(faceBox, frameWidth, frameHeight, oval = DEFAULT_OVAL_REGI
|
|
|
1838
1894
|
} else if (dx > 0.1) {
|
|
1839
1895
|
feedback = "Move face left";
|
|
1840
1896
|
} else {
|
|
1841
|
-
feedback = "Center your face in the
|
|
1897
|
+
feedback = "Center your face in the circle";
|
|
1842
1898
|
}
|
|
1843
1899
|
} else if (tooSmall) {
|
|
1844
1900
|
feedback = "Move closer";
|