@sssxyd/face-liveness-detector 0.4.3-alpha.13 → 0.4.3-alpha.14
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/dist/index.esm.js
CHANGED
|
@@ -1241,8 +1241,7 @@ function _createHumanConfig(backend, modelPath, wasmPath) {
|
|
|
1241
1241
|
return: true
|
|
1242
1242
|
},
|
|
1243
1243
|
mesh: {
|
|
1244
|
-
enabled: true, // facemesh
|
|
1245
|
-
keepInvalid: false // 只保留有效的网格数据
|
|
1244
|
+
enabled: true, // facemesh 脸部关键点
|
|
1246
1245
|
},
|
|
1247
1246
|
iris: { enabled: false },
|
|
1248
1247
|
antispoof: { enabled: false },
|
|
@@ -1251,7 +1250,7 @@ function _createHumanConfig(backend, modelPath, wasmPath) {
|
|
|
1251
1250
|
body: { enabled: false },
|
|
1252
1251
|
hand: { enabled: false },
|
|
1253
1252
|
object: { enabled: false },
|
|
1254
|
-
gesture: { enabled:
|
|
1253
|
+
gesture: { enabled: true } // 启用手势识别以检测面部表情和头部动作
|
|
1255
1254
|
};
|
|
1256
1255
|
if (modelPath) {
|
|
1257
1256
|
config.modelBasePath = modelPath;
|
|
@@ -3928,9 +3927,6 @@ class FaceDetectionEngine extends SimpleEventEmitter {
|
|
|
3928
3927
|
this.emitDebug('liveness', 'No gestures detected for action verification', { gestureCount: gestures.length ?? 0 }, 'warn');
|
|
3929
3928
|
return detectedActions;
|
|
3930
3929
|
}
|
|
3931
|
-
else {
|
|
3932
|
-
this.emitDebug('liveness', 'Gestures detected for action verification', { gestureCount: gestures.length ?? 0 }, 'warn');
|
|
3933
|
-
}
|
|
3934
3930
|
try {
|
|
3935
3931
|
// Check for BLINK - look for blink or eye-related gestures
|
|
3936
3932
|
if (gestures.some(g => {
|