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

IFightsEstimator.h
1 #pragma once
2
3 #include <fsdk/Def.h>
4 #include <fsdk/FSDKError.h>
5 #include <fsdk/IRefCounted.h>
6 #include <fsdk/Types/Image.h>
7 #include <fsdk/Types/Ref.h>
8 #include <fsdk/Types/Result.h>
9 #include <fsdk/Types/ResultValue.h>
10 #include <fsdk/Types/Span.h>
11
12 namespace fsdk {
13
14 #ifndef DOXYGEN_SHOULD_SKIP_THIS
15 DECLARE_SMARTPTR(IFightsEstimator);
16 DECLARE_SMARTPTR(IFightsEstimatorContext);
17 #endif
18
29 struct FightsEstimation {
30 enum class State {
31 NoFight,
32 Fight
33 };
34 State state;
35 float score;
36 };
37
42 struct IFightsEstimatorContext : IRefCounted {
43 enum class State {
44 NotReady,
45 Ready
46 };
51 virtual State getState() const noexcept = 0;
52
53 virtual FightsEstimation getResult() const noexcept = 0;
54 };
55
63 struct IFightsEstimator : IRefCounted {
64
68 virtual size_t getBatchSize() const noexcept = 0;
69
76 virtual size_t getMinBatchCount() const noexcept = 0;
77
89 virtual ResultValue<FSDKError, IFightsEstimatorContextPtr>
90 estimate(Span<const Image> framesBatch, IFightsEstimatorContextPtr context) const noexcept = 0;
91
102 virtual Result<FSDKError>
103 validate(Span<const Image> framesBatch, Span<Result<FSDKError>> errors) const noexcept = 0;
104 };
105
107 } // namespace fsdk
fsdk::IFightsEstimator::getMinBatchCount
virtual size_t getMinBatchCount() const noexcept=0
Returns the minimun count of batches from the video for analysis.
fsdk::IFightsEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > framesBatch, Span< Result< FSDKError >> errors) const noexcept=0
Validates input batch of frames in a single function call.
fsdk::IFightsEstimator::estimate
virtual ResultValue< FSDKError, IFightsEstimatorContextPtr > estimate(Span< const Image > framesBatch, IFightsEstimatorContextPtr context) const noexcept=0
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
fsdk::FightsEstimation::State::Fight
Fight detected on the input frames.
FSDKError.h
Common SDK error codes.
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:37
fsdk::IFightsEstimatorContext::getState
virtual State getState() const noexcept=0
Returns the current processing state.
fsdk::FightsEstimation::state
State state
Estimation status.
Definition: IFightsEstimator.h:34
Def.h
Common SDK definitions.
fsdk::IFightsEstimator::getBatchSize
virtual size_t getBatchSize() const noexcept=0
Returns the required size for each batch from the video for analysis.
fsdk::FightsEstimation::State::NoFight
There is no fight on the input framess.
fsdk::ResultValue
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
fsdk::FightsEstimation
FightsEstimation result structure. This structure will return from the IFightsEstimatorContext::getRe...
Definition: IFightsEstimator.h:29
fsdk::IFightsEstimatorContext
FightsEstimator context stucture This structure will return from the IFightsEstimator::estimate metho...
Definition: IFightsEstimator.h:42
fsdk::FightsEstimation::score
float score
Estimation score normalized to [0..1] range.
Definition: IFightsEstimator.h:35
fsdk::FightsEstimation::State
State
Definition: IFightsEstimator.h:30
fsdk::IFightsEstimator
FightsEstimator estimator interface.
Definition: IFightsEstimator.h:63
fsdk::Span
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14
IRefCounted.h
Reference counted object interface.