FaceAntiSpoofingOnnx class
ONNX-based Face Anti-Spoofing Service Uses the anti-spoof-mn3.onnx model for liveness detection
Properties
- clearnessThreshold → int
-
final
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
antiSpoofing(
Image image) → Future< bool> - Performs complete anti-spoofing check on an image Returns true if the image is a real face, false if it's a spoof/fake
-
checkLiveness(
Image image) → Future< bool> - Runs the ONNX model to get liveness score Returns a score between 0 and 1, where higher = more likely to be real
-
dispose(
) → void - Releases resources
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- livenessThreshold → double
-
no setter
- spoofThreshold → double
-
no setter
Static Methods
-
calculateLaplacian(
Image image) → int - Calculates Laplacian score to detect image blur
-
create(
{int clearnessThreshold = 800}) → Future< FaceAntiSpoofingOnnx> -
Creates and initializes the ONNX anti-spoofing service
clearnessThreshold- Minimum clearness score for image quality (default: 800)