5 #include <fsdk/Optional.h>
12 #ifndef DOXYGEN_SHOULD_SKIP_THIS
21 float africanAmerican;
80 Optional<EthnicityEstimation> ethnicity;
136 const float* arr = &this->africanAmerican;
137 return static_cast<EthnicityEstimation::Ethnicities
>(
138 std::distance(arr, std::max_element(arr, arr+EthnicityEstimation::Count))
147 EthnicityEstimation::Ethnicities ethnicity
149 return *(&this->africanAmerican +
static_cast<uint32_t
>(ethnicity));
161 static_cast<int>(first) | static_cast<int>(second)
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
virtual Result< FSDKError > validate(Span< const Image > warps, const EstimationRequest request, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
A structure that encapsulates an action result enumeration.
Definition: Result.h:29
Face image attribute estimator interface.
Definition: IAttributeEstimator.h:56
Common data types and structures.
virtual Result< FSDKError > estimate(const Image &warp, const EstimationRequest request, EstimationResult &out) const noexcept=0
Estimate unified attributes.
Optional< float > gender
gender score if was requested (100% - male, 0% - female), empty otherwise
Definition: IAttributeEstimator.h:76
Estimate gender.
Definition: IAttributeEstimator.h:64
Unified Attribute Estimator output structure.
Definition: IAttributeEstimator.h:72
Ethnicities getPredominantEthnicity() const
Returns ethnicity with greatest score.
Definition: IAttributeEstimator.h:135
Object system types and interfaces.
Optional< float > age
< age estimation if was requested, empty otherwise
Definition: IAttributeEstimator.h:74
Base strong reference counted object interface.
Definition: IRefCounted.h:36
float getEthnicityScore(Ethnicities ethnicity) const
Returns score of required ethnicity.
Definition: IAttributeEstimator.h:146
EstimationRequest
EstimationRequest lists all possible estimation attributes that AttributeEstimator is currently able ...
Definition: IAttributeEstimator.h:62
Addon for Result to output some value aside the result. Specialization for copiable types...
Definition: ResultValue.h:21
Optional< float > genderScore
ethnicity estimation if was requested, empty otherwise
Definition: IAttributeEstimator.h:78
Make full estimation (all attributes)
Definition: IAttributeEstimator.h:66
Image.
Definition: Image.h:37
Ethnicity estimation structure. Each estimation is given in normalized [0, 1] range.
Definition: IAttributeEstimator.h:20
Estimate Ethnicity.
Definition: IAttributeEstimator.h:65
Span. Not owning data view. It incapsulated pointer to the continuous array with one or more T objec...
Definition: Span.h:14
Estimate age.
Definition: IAttributeEstimator.h:63