@sssxyd/face-liveness-detector 0.4.0-alpha.7 → 0.4.0-alpha.9
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.en.md +844 -0
- package/README.md +544 -393
- package/dist/index.esm.js +18 -1
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +18 -1
- package/dist/index.js.map +1 -1
- package/dist/types/face-detection-engine.d.ts.map +1 -1
- package/dist/types/types.d.ts +82 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/README.zh-Hans.md +0 -695
package/dist/index.js
CHANGED
|
@@ -138,7 +138,7 @@
|
|
|
138
138
|
motion_liveness_strict_photo_detection: false,
|
|
139
139
|
// Screen Capture Detection Settings
|
|
140
140
|
screen_capture_confidence_threshold: 0.7,
|
|
141
|
-
screen_capture_detection_strategy: '
|
|
141
|
+
screen_capture_detection_strategy: 'accurate',
|
|
142
142
|
screen_moire_pattern_threshold: 0.65,
|
|
143
143
|
screen_moire_pattern_enable_dct: true,
|
|
144
144
|
screen_moire_pattern_enable_edge_detection: true,
|
|
@@ -4833,6 +4833,22 @@
|
|
|
4833
4833
|
this.scheduleNextDetection(this.options.detect_error_retry_delay);
|
|
4834
4834
|
return;
|
|
4835
4835
|
}
|
|
4836
|
+
else {
|
|
4837
|
+
this.emitDebug('screen-capture-detection', 'No screen capture detected', {
|
|
4838
|
+
isScreenCapture: screenResult.isScreenCapture,
|
|
4839
|
+
overallConfidence: screenResult.confidenceScore,
|
|
4840
|
+
minConfidenceThreshold: this.options.screen_capture_confidence_threshold,
|
|
4841
|
+
detectionStrategy: screenResult.strategy,
|
|
4842
|
+
riskLevel: screenResult.riskLevel,
|
|
4843
|
+
processingTimeMs: screenResult.processingTimeMs,
|
|
4844
|
+
executedMethods: screenResult.executedMethods.map((m) => ({
|
|
4845
|
+
method: m.method,
|
|
4846
|
+
isScreenCapture: m.isScreenCapture,
|
|
4847
|
+
confidence: m.confidence
|
|
4848
|
+
})),
|
|
4849
|
+
skippedMethods: screenResult.skippedMethods
|
|
4850
|
+
});
|
|
4851
|
+
}
|
|
4836
4852
|
// 运动检测
|
|
4837
4853
|
const motionResult = this.detectionState.motionDetector.analyzeMotion(grayFrame, face, faceBox);
|
|
4838
4854
|
if (this.detectionState.motionDetector.isReady()) {
|
|
@@ -5025,6 +5041,7 @@
|
|
|
5025
5041
|
this.emitDetectorInfo({ code: exports.DetectionCode.MULTIPLE_FACE, faceCount: faceCount });
|
|
5026
5042
|
}
|
|
5027
5043
|
if (this.detectionState.period !== exports.DetectionPeriod.DETECT) {
|
|
5044
|
+
this.emitDebug('detection', 'Multiple or no faces detected, resetting detection state', { faceCount });
|
|
5028
5045
|
this.resetDetectionState();
|
|
5029
5046
|
}
|
|
5030
5047
|
this.scheduleNextDetection();
|