114 lines
2.8 KiB
Python
114 lines
2.8 KiB
Python
from __future__ import annotations
|
|
import paravision.liveness2d.sdk
|
|
import typing
|
|
import paravision.liveness2d.types
|
|
import paravision.recognition.sdk
|
|
import paravision.recognition.types
|
|
|
|
__all__ = [
|
|
"Metadata",
|
|
"SDK"
|
|
]
|
|
|
|
|
|
class Metadata():
|
|
def __init__(self) -> None: ...
|
|
|
|
@property
|
|
def engine(self) -> str:
|
|
"""
|
|
The engine or accelerator of the Liveness2D SDK instance being used.
|
|
|
|
:type: str
|
|
"""
|
|
@engine.setter
|
|
def engine(self, arg0: str) -> None:
|
|
"""
|
|
The engine or accelerator of the Liveness2D SDK instance being used.
|
|
"""
|
|
@property
|
|
def engine_version(self) -> str:
|
|
"""
|
|
The version of the engine or accelerator being used.
|
|
|
|
:type: str
|
|
"""
|
|
@engine_version.setter
|
|
def engine_version(self, arg0: str) -> None:
|
|
"""
|
|
The version of the engine or accelerator being used.
|
|
"""
|
|
@property
|
|
def generation(self) -> int:
|
|
"""
|
|
The generation of the Liveness2D SDK.
|
|
|
|
:type: int
|
|
"""
|
|
@generation.setter
|
|
def generation(self, arg0: int) -> None:
|
|
"""
|
|
The generation of the Liveness2D SDK.
|
|
"""
|
|
@property
|
|
def model_version(self) -> str:
|
|
"""
|
|
The version of the Liveness2D models.
|
|
|
|
:type: str
|
|
"""
|
|
@model_version.setter
|
|
def model_version(self, arg0: str) -> None:
|
|
"""
|
|
The version of the Liveness2D models.
|
|
"""
|
|
@property
|
|
def sdk_version(self) -> str:
|
|
"""
|
|
The version of the Liveness2D SDK.
|
|
|
|
:type: str
|
|
"""
|
|
@sdk_version.setter
|
|
def sdk_version(self, arg0: str) -> None:
|
|
"""
|
|
The version of the Liveness2D SDK.
|
|
"""
|
|
pass
|
|
|
|
|
|
class SDK():
|
|
"""
|
|
SDK()
|
|
|
|
A sdk object contains an instance of the Paravision model and its
|
|
associated resources.
|
|
|
|
SDK objects are long-living and do not need to be re-instantiated between
|
|
method calls.
|
|
"""
|
|
def __init__(self, models_dir: typing.Optional[str] = None, settings: typing.Optional[paravision.liveness2d.types.Settings] = None) -> None:
|
|
"""
|
|
Create a new SDK instance.
|
|
"""
|
|
|
|
def check_validness(self, face: paravision.recognition.types.Face, validness_settings: paravision.liveness2d.types.ValidnessSettings, reco_sdk: paravision.recognition.sdk.SDK) -> paravision.recognition.types.ValidnessResult:
|
|
"""
|
|
Check if a face is valid for liveness inference.
|
|
"""
|
|
|
|
def get_liveness(self, face: paravision.recognition.types.Face) -> paravision.liveness2d.types.LivenessResult:
|
|
"""
|
|
Get the liveness of a face.
|
|
"""
|
|
|
|
@staticmethod
|
|
def get_metadata(models_dir: typing.Optional[str] = None) -> Metadata:
|
|
"""
|
|
Returns metadata for SDK and model info.
|
|
"""
|
|
|
|
pass
|
|
|
|
|