react-native-vision-camera-spoof-detector 1.2.11 → 1.3.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 +2 -3
- package/index.d.ts +0 -3
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -184,7 +184,7 @@ interface FaceAntiSpoofingResult {
|
|
|
184
184
|
|
|
185
185
|
The detector considers only one eligible face per frame. Android uses ML Kit; iOS uses Apple Vision. Both require a sufficiently large face, face landmarks, a near-frontal pose, and a face inside the frame margin. The model input is a square face crop aligned to the eyes. Frames rejected for brightness, face count, or score thresholds clear the consecutive-live-frame evidence.
|
|
186
186
|
|
|
187
|
-
`onFacesDetected` is optional and receives eligible faces as `{ bounds: { x, y, width, height } }`. `onResult` receives numeric scores only.
|
|
187
|
+
`onFacesDetected` is optional and receives eligible faces as `{ bounds: { x, y, width, height } }`. `onResult` receives numeric scores only.use the scores and your own calibrated policy. `onStableFaceDetected` is the positive event that the configured face-stability and consecutive-live-frame gates passed, and receives the face bounds and latest scores. This event is not a guarantee against presentation attacks.
|
|
188
188
|
|
|
189
189
|
Default output options on both platforms:
|
|
190
190
|
|
|
@@ -236,8 +236,7 @@ Returns `boolean`.
|
|
|
236
236
|
|
|
237
237
|
### `FaceAntiSpoofingResult`
|
|
238
238
|
|
|
239
|
-
The score object delivered to `onResult` and `onStableFaceDetected` has the four numeric fields shown under [`useFaceAntiSpoofFrameOutput`](#usefaceantispoofframeoutputoptions).
|
|
240
|
-
|
|
239
|
+
The score object delivered to `onResult` and `onStableFaceDetected` has the four numeric fields shown under [`useFaceAntiSpoofFrameOutput`](#usefaceantispoofframeoutputoptions).
|
|
241
240
|
Result fields:
|
|
242
241
|
|
|
243
242
|
- `neuralNetworkScore`: raw model score from the TFLite classifier
|
package/index.d.ts
CHANGED
|
@@ -70,8 +70,6 @@ export interface SpoofDetectedFace {
|
|
|
70
70
|
* Anti-spoofing detection state
|
|
71
71
|
*/
|
|
72
72
|
export interface AntiSpoofState {
|
|
73
|
-
/** Whether face is detected as live */
|
|
74
|
-
isLive: boolean;
|
|
75
73
|
/** Confidence score (0.0-1.0) */
|
|
76
74
|
confidence: number;
|
|
77
75
|
/** Consecutive frames detected as live */
|
|
@@ -146,7 +144,6 @@ export interface FacesUpdateData {
|
|
|
146
144
|
* Anti-spoof update callback data
|
|
147
145
|
*/
|
|
148
146
|
export interface OnAntiSpoofUpdateData {
|
|
149
|
-
isLive: boolean;
|
|
150
147
|
confidence: number;
|
|
151
148
|
rawResult?: FaceAntiSpoofingResult;
|
|
152
149
|
consecutiveLiveFrames: number;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-vision-camera-spoof-detector",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "High-performance face anti-spoofing and liveness detection module for React Native Vision Camera. Uses TensorFlow Lite with GPU acceleration and optimized YUV processing.",
|
|
5
5
|
"homepage": "https://github.com/dpraful/react-native-vision-camera-spoof-detector",
|
|
6
6
|
"repository": {
|