@sssxyd/face-liveness-detector 0.4.1-beta.1 → 0.4.1-beta.2
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 +2 -2
- package/dist/index.esm.js.map +1 -1
- package/dist/index.js +2 -2
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1651,7 +1651,7 @@
|
|
|
1651
1651
|
return this.config;
|
|
1652
1652
|
}
|
|
1653
1653
|
isReady() {
|
|
1654
|
-
return this.
|
|
1654
|
+
return this.normalizedLandmarksHistory.length >= 5; // 只需要5帧就能检测
|
|
1655
1655
|
}
|
|
1656
1656
|
reset() {
|
|
1657
1657
|
this.eyeAspectRatioHistory = [];
|
|
@@ -1684,7 +1684,7 @@
|
|
|
1684
1684
|
}
|
|
1685
1685
|
}
|
|
1686
1686
|
// 数据不足时,继续收集
|
|
1687
|
-
if (this.
|
|
1687
|
+
if (!this.isReady()) {
|
|
1688
1688
|
return new MotionDetectionResult(true, {
|
|
1689
1689
|
frameCount: Math.max(this.eyeAspectRatioHistory.length, this.mouthAspectRatioHistory.length)
|
|
1690
1690
|
});
|