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

IMedicalMaskEstimator.h
1 #pragma once
2
3 #pragma once
4
5 #include <fsdk/IObject.h>
6 #include <fsdk/FSDKError.h>
7 #include <fsdk/Optional.h>
8 #include <fsdk/Types.h>
9
10 namespace fsdk {
11
12 #ifndef DOXYGEN_SHOULD_SKIP_THIS
13 DECLARE_SMARTPTR(IMedicalMaskEstimator);
14 #endif
15
20 enum class MedicalMask {
21 Mask = 0,
22 NoMask,
23 OccludedFace
24 };
25
30 enum class MedicalMaskExtended {
31 Mask = 0,
32 NoMask,
33 MaskNotInPlace,
34 OccludedFace
35 };
36
43 struct MedicalMaskEstimation {
44 MedicalMask result;
45 // scores
46 float maskScore;
47 float noMaskScore;
48 float occludedFaceScore;
49 };
50
57 struct MedicalMaskEstimationExtended {
58 MedicalMaskExtended result;
59 // scores
60 float maskScore;
61 float noMaskScore;
62 float maskNotInPlace;
63 float occludedFaceScore;
64 };
65
70 struct IMedicalMaskEstimator : IRefCounted {
79 virtual Result<FSDKError>
80 estimate(
81 const Image& warp,
82 MedicalMaskEstimation& estimation) const noexcept = 0;
83
92 virtual Result<FSDKError>
93 estimate(
94 const Image& warp,
95 MedicalMaskEstimationExtended& estimation) const noexcept = 0;
96
106 virtual Result<FSDKError>
107 estimate(
108 const Image& image,
109 const Detection& detection,
110 MedicalMaskEstimation& estimation) const noexcept = 0;
111
121 virtual Result<FSDKError>
122 estimate(
123 const Image& image,
124 const Detection& detection,
125 MedicalMaskEstimationExtended& estimation) const noexcept = 0;
126
137 virtual Result<FSDKError> estimate(
138 Span<const Image> warps,
139 Span<MedicalMaskEstimation> estimations) const noexcept = 0;
140
151 virtual Result<FSDKError> estimate(
152 Span<const Image> warps,
153 Span<MedicalMaskEstimationExtended> estimations) const noexcept = 0;
154
166 virtual Result<FSDKError> estimate(
167 Span<const Image> images,
168 Span<const Detection> detections,
169 Span<MedicalMaskEstimation> estimations) const noexcept = 0;
170
182 virtual Result<FSDKError> estimate(
183 Span<const Image> images,
184 Span<const Detection> detections,
185 Span<MedicalMaskEstimationExtended> estimations) const noexcept = 0;
196 virtual Result<FSDKError>
197 validate(
198 Span<const Image> warps,
199 Span<Result<FSDKError>> errors) const noexcept = 0;
200
212 virtual Result<FSDKError>
213 validate(
214 Span<const Image> images,
215 Span<const Detection> detections,
216 Span<Result<FSDKError>> errors) const noexcept = 0;
217 };
218
219 } // namespace fsdk
fsdk::Span
Span. @detail Not owning data view. It incapsulated pointer to the continuous array with one or more ...
Definition: Span.h:15
fsdk::IMedicalMaskEstimator::estimate
virtual Result< FSDKError > estimate(Span< const Image > warps, Span< MedicalMaskEstimationExtended > estimations) const noexcept=0
Estimate Medical Mask probabilities.
fsdk::IMedicalMaskEstimator::estimate
virtual Result< FSDKError > estimate(const Image &warp, MedicalMaskEstimationExtended &estimation) const noexcept=0
Estimate MedicalMask probabilities.
DECLARE_SMARTPTR
#define DECLARE_SMARTPTR(X)
Smart ptr declaration helper macro.
Definition: Def.h:59
fsdk::IMedicalMaskEstimator::estimate
virtual Result< FSDKError > estimate(Span< const Image > images, Span< const Detection > detections, Span< MedicalMaskEstimation > estimations) const noexcept=0
Estimate Medical Mask probabilities.
fsdk::MedicalMaskEstimation::occludedFaceScore
float occludedFaceScore
face is occluded by something score
Definition: IMedicalMaskEstimator.h:48
fsdk::IMedicalMaskEstimator
MedicalMask estimator interface.
Definition: IMedicalMaskEstimator.h:70
fsdk::MedicalMask::Mask
@ Mask
medical mask is on the face
fsdk
SDK namespace.
Definition: IAGSEstimator.h:8
fsdk::MedicalMask
MedicalMask
MedicalMask estimator output enum. This enum contains all possible estimation results.
Definition: IMedicalMaskEstimator.h:20
fsdk::MedicalMaskEstimationExtended::occludedFaceScore
float occludedFaceScore
face is occluded by something score
Definition: IMedicalMaskEstimator.h:63
fsdk::IMedicalMaskEstimator::estimate
virtual Result< FSDKError > estimate(const Image &image, const Detection &detection, MedicalMaskEstimation &estimation) const noexcept=0
Estimate MedicalMask probabilities.
fsdk::IMedicalMaskEstimator::estimate
virtual Result< FSDKError > estimate(const Image &image, const Detection &detection, MedicalMaskEstimationExtended &estimation) const noexcept=0
Estimate MedicalMask probabilities.
fsdk::MedicalMaskEstimation::noMaskScore
float noMaskScore
no medical mask on the face score
Definition: IMedicalMaskEstimator.h:47
fsdk::MedicalMaskEstimation::maskScore
float maskScore
medical mask is on the face score
Definition: IMedicalMaskEstimator.h:46
fsdk::IMedicalMaskEstimator::estimate
virtual Result< FSDKError > estimate(Span< const Image > warps, Span< MedicalMaskEstimation > estimations) const noexcept=0
Estimate Medical Mask probabilities.
fsdk::MedicalMaskExtended::Mask
@ Mask
medical mask is on the face
fsdk::IMedicalMaskEstimator::estimate
virtual Result< FSDKError > estimate(const Image &warp, MedicalMaskEstimation &estimation) const noexcept=0
Estimate MedicalMask probabilities.
fsdk::IMedicalMaskEstimator::validate
virtual Result< FSDKError > validate(Span< const Image > images, Span< const Detection > detections, Span< Result< FSDKError >> errors) const noexcept=0
Validate input of multiple frames in a single function call.
fsdk::Detection
Detection structure. @detail Stores a detected bounding box within a source image rect.
Definition: Detection.h:10
fsdk::Result
A structure that encapsulates an action result enumeration.
Definition: Result.h:30
fsdk::MedicalMaskEstimationExtended::noMaskScore
float noMaskScore
no medical mask on the face score
Definition: IMedicalMaskEstimator.h:61
fsdk::MedicalMaskEstimation
MedicalMask estimator output structure. This structure contains the result of estimation (.
Definition: IMedicalMaskEstimator.h:43
fsdk::MedicalMaskEstimationExtended::maskScore
float maskScore
medical mask is on the face score
Definition: IMedicalMaskEstimator.h:60
fsdk::MedicalMaskEstimationExtended::result
MedicalMaskExtended result
estimation result (
Definition: IMedicalMaskEstimator.h:58
fsdk::MedicalMaskEstimationExtended::maskNotInPlace
float maskNotInPlace
mask is not on the right place
Definition: IMedicalMaskEstimator.h:62
fsdk::IMedicalMaskEstimator::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::MedicalMaskExtended
MedicalMaskExtended
MedicalMask estimator output enum. This enum contains all possible extended estimation results.
Definition: IMedicalMaskEstimator.h:30
fsdk::Image
Image.
Definition: Image.h:38
fsdk::IMedicalMaskEstimator::estimate
virtual Result< FSDKError > estimate(Span< const Image > images, Span< const Detection > detections, Span< MedicalMaskEstimationExtended > estimations) const noexcept=0
Estimate Medical Mask probabilities.
fsdk::MedicalMaskEstimationExtended
MedicalMask estimator output structure. This structure contains the result of estimation (.
Definition: IMedicalMaskEstimator.h:57
fsdk::MedicalMaskEstimation::result
MedicalMask result
estimation result (
Definition: IMedicalMaskEstimator.h:44
fsdk::IRefCounted
Base strong reference counted object interface.
Definition: IRefCounted.h:36