![]() |
Face Engine SDK
5.17.0
A face detection, recognition and tracking engine.
|
00001 #pragma once 00002 00003 #include <fsdk/IObject.h> 00004 #include <fsdk/FSDKError.h> 00005 #include <fsdk/Optional.h> 00006 #include <fsdk/Types.h> 00007 00008 namespace fsdk { 00009 00010 #ifndef DOXYGEN_SHOULD_SKIP_THIS 00011 DECLARE_SMARTPTR(ILivenessOneShotRGBEstimator); 00012 #endif 00013 00024 struct LivenessOneShotRGBEstimation { 00025 enum class State { 00026 Alive = 0, 00027 Fake, 00028 Unknown 00029 }; 00030 00031 float score; 00032 State state; 00033 float qualityScore; 00034 }; 00035 00040 struct ILivenessOneShotRGBEstimator : IRefCounted { 00052 virtual Result<FSDKError> estimate( 00053 const Image& image, 00054 const Detection& detection, 00055 const Landmarks5& landmarks5, 00056 LivenessOneShotRGBEstimation& estimation, 00057 float qualityThreshold = -1.f) const noexcept = 0; 00058 00073 virtual Result<FSDKError> estimate( 00074 Span<const Image> images, 00075 Span<const Detection> detections, 00076 Span<const Landmarks5> landmarks5, 00077 Span<LivenessOneShotRGBEstimation> estimations, 00078 float qualityThreshold = -1.f, 00079 LivenessOneShotRGBEstimation* aggregation = nullptr) const noexcept = 0; 00080 00093 virtual Result<FSDKError> 00094 validate( 00095 Span<const Image> images, 00096 Span<const Detection> detections, 00097 Span<const Landmarks5> landmarks5, 00098 Span<Result<FSDKError>> errors) const noexcept = 0; 00099 }; 00101 } // namespace fsdk