Face Engine SDK  5.21.0
A face detection, recognition and tracking engine.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
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 
30  enum class State {
31  NoFight,
32  Fight
33  };
35  float score;
36  };
37 
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 
64 
68  virtual size_t getBatchSize() const noexcept = 0;
69 
76  virtual size_t getMinBatchCount() const noexcept = 0;
77 
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
virtual size_t getMinBatchCount() const noexcept=0
Returns the minimun count of batches from the video for analysis.
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.
virtual ResultValue< FSDKError, IFightsEstimatorContextPtr > estimate(Span< const Image > framesBatch, IFightsEstimatorContextPtr context) const noexcept=0
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:56
A structure that encapsulates an action result enumeration.
Definition: Result.h:27
Fight detected on the input frames.
Common SDK error codes.
Base strong reference counted object interface.
Definition: IRefCounted.h:37
virtual State getState() const noexcept=0
Returns the current processing state.
State state
Estimation status.
Definition: IFightsEstimator.h:34
Common SDK definitions.
virtual size_t getBatchSize() const noexcept=0
Returns the required size for each batch from the video for analysis.
There is no fight on the input framess.
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
FightsEstimation result structure. This structure will return from the IFightsEstimatorContext::getRe...
Definition: IFightsEstimator.h:29
FightsEstimator context stucture This structure will return from the IFightsEstimator::estimate metho...
Definition: IFightsEstimator.h:42
float score
Estimation score normalized to [0..1] range.
Definition: IFightsEstimator.h:35
State
Definition: IFightsEstimator.h:30
FightsEstimator estimator interface.
Definition: IFightsEstimator.h:63
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14
Reference counted object interface.