| Face Engine SDK 5.34.0 A face detection, recognition and tracking engine.

ILivenessOneShotRGBEstimator.h
1 #pragma once
2
3 #include <fsdk/IObject.h>
4 #include <fsdk/FSDKError.h>
5 #include <fsdk/Optional.h>
6 #include <fsdk/Types.h>
7
8 namespace fsdk {
9
10 #ifndef DOXYGEN_SHOULD_SKIP_THIS
11 DECLARE_SMARTPTR(ILivenessOneShotRGBEstimator);
12 #endif
13
24 struct LivenessOneShotRGBEstimation {
25 enum class State {
26 Alive = 0,
27 Fake,
28 Unknown
29 };
30
31 float score;
32 State state;
33 float qualityScore;
34 };
35
40 struct ILivenessOneShotRGBEstimator : IRefCounted {
52 virtual Result<FSDKError> estimate(
53 const Image& image,
54 const Detection& detection,
55 const Landmarks5& landmarks5,
56 LivenessOneShotRGBEstimation& estimation,
57 float qualityThreshold = -1.f) const noexcept = 0;
58
73 virtual Result<FSDKError> estimate(
74 Span<const Image> images,
75 Span<const Detection> detections,
76 Span<const Landmarks5> landmarks5,
77 Span<LivenessOneShotRGBEstimation> estimations,
78 float qualityThreshold = -1.f,
79 LivenessOneShotRGBEstimation* aggregation = nullptr) const noexcept = 0;
80
93 virtual Result<FSDKError> validate(
94 Span<const Image> images,
95 Span<const Detection> detections,
96 Span<const Landmarks5> landmarks5,
97 Span<Result<FSDKError>> errors) const noexcept = 0;
98 };
99
101 } // namespace fsdk
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:70
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::LivenessOneShotRGBEstimation::State::Unknown
The liveness status of person on image is Unknown.
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
Types.h
Common data types and structures.
fsdk::Landmarks
Face landmarks template structure.
Definition: Landmarks.h:23
fsdk::LivenessOneShotRGBEstimation::State::Fake
The person on image is fake (photo, printed image)
fsdk::LivenessOneShotRGBEstimation::State::Alive
The person on image is real.
IObject.h
Object system types and interfaces.
fsdk::LivenessOneShotRGBEstimation::State
State
Definition: ILivenessOneShotRGBEstimator.h:25
FSDKError.h
Common SDK error codes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:37
fsdk::ILivenessOneShotRGBEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Detection > detections, Span< const Landmarks5 > landmarks5, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
fsdk::ILivenessOneShotRGBEstimator::estimate
virtual Result< FSDKError > estimate(const Image &image, const Detection &detection, const Landmarks5 &landmarks5, LivenessOneShotRGBEstimation &estimation, float qualityThreshold=-1.f) const noexcept=0
OneShot RGB Liveness estimation.
fsdk::Image
Image.
Definition: Image.h:38
fsdk::LivenessOneShotRGBEstimation
Liveness OneShotRGB estimation structure.
Definition: ILivenessOneShotRGBEstimator.h:24
fsdk::ILivenessOneShotRGBEstimator
OneShot RGB Liveness estimator interface.
Definition: ILivenessOneShotRGBEstimator.h:40
fsdk::LivenessOneShotRGBEstimation::state
State state
Liveness status.
Definition: ILivenessOneShotRGBEstimator.h:32
fsdk::LivenessOneShotRGBEstimation::score
float score
Estimation score.
Definition: ILivenessOneShotRGBEstimator.h:31
fsdk::Detection
Detection structure. Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
fsdk::LivenessOneShotRGBEstimation::qualityScore
float qualityScore
Liveness quality score.
Definition: ILivenessOneShotRGBEstimator.h:33
fsdk::Span
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14