Face Engine SDK  5.21.0
A face detection, recognition and tracking engine.
INIRLivenessEstimator.h
1 #pragma once
2 
3 #include <fsdk/FSDKError.h>
4 #include <fsdk/IObject.h>
5 #include <fsdk/Types.h>
6 
7 namespace fsdk {
8 
9 #ifndef DOXYGEN_SHOULD_SKIP_THIS
10  DECLARE_SMARTPTR(INIRLivenessEstimator);
11 #endif
12 
23  enum class NIRLivenessMode {
24  Default, // Specified in config file.
25  M1, // M1.
26  M2 // M2.
27  };
28 
35  enum class State {
36  Real = 0,
37  Fake = 1,
38  Unknown
39  };
40 
41  float score;
42  State state;
43  };
44 
59  virtual Result<FSDKError>
60  estimate(const Image& warp, NIRLivenessEstimation& irEstimation) const noexcept = 0;
61 
72  virtual Result<FSDKError>
73  estimate(Span<const Image> warps, Span<NIRLivenessEstimation> irEstimation) const noexcept = 0;
74 
85  virtual Result<FSDKError>
86  validate(Span<const Image> warps, Span<Result<FSDKError>> errors) const noexcept = 0;
87  };
88 
90 } // namespace fsdk
fsdk::Span
Span. @detail Not owning data view. It incapsulated pointer to the continuous array with one or more ...
Definition: Span.h:14
fsdk::NIRLivenessEstimation::State
State
Definition: INIRLivenessEstimator.h:35
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
fsdk::INIRLivenessEstimator::estimate
virtual Result< FSDKError > estimate(const Image &warp, NIRLivenessEstimation &irEstimation) const noexcept=0
Check whether or not infrared warp corresponds to the real person.
fsdk::INIRLivenessEstimator::estimate
virtual Result< FSDKError > estimate(Span< const Image > warps, Span< NIRLivenessEstimation > irEstimation) const noexcept=0
Check whether or not array of infrared warps corresponds to the real person.
fsdk::NIRLivenessEstimation::State::Real
@ Real
The person on image is real.
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::INIRLivenessEstimator
Infra red liveness estimator interface.
Definition: INIRLivenessEstimator.h:50
fsdk::NIRLivenessEstimation::State::Fake
@ Fake
The person on image is fake.
fsdk::NIRLivenessMode
NIRLivenessMode
NIRLiveness estimation mode. Currently, available values to select the estimation mode are: Default,...
Definition: INIRLivenessEstimator.h:23
fsdk::NIRLivenessEstimation
NIR Liveness estimation structure. Each score in normalized [0, 1] range, state shows real person or ...
Definition: INIRLivenessEstimator.h:34
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
fsdk::INIRLivenessEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > warps, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:37