Medical mask estimation#
The medical mask estimation recognizes full or partial face coverage by a medical mask. This feature allows you to define whether such frames can still be considered as best shots. For details, see Getting the best shot with an occluded face.
Dependency on face occlusion estimation#
- LUNA ID for Android: If
acceptOccludedFacesoracceptMaskare set totrue, LUNA ID skips the corresponding estimations for face occlusions or medical masks, respectively. - LUNA ID for iOS: Face occlusion and medical mask estimations are performed independently. If both face occlusion and medical mask estimations are enabled, the mask estimator runs first. When a medical mask is detected, the face occlusion estimation is omitted.
For details, see Face occlusion estimation.
Error handling#
- LUNA ID for Android: Returns the
FaceWithMaskerror message. - LUNA ID for iOS: Returns error code 1010.
Implementation#
| Platform | Implementation |
|---|---|
| LUNA ID for Android | public val acceptMask: Boolean = true |
| LUNA ID for iOS | @property (nonatomic, assign) BOOL occludeCheck; |
Additional notes#
- LUNA ID for Android: By default,
acceptMaskis set totrue, allowing frames with occluded faces to be considered as potential best shots. Adjust this setting based on your specific requirements. - LUNA ID for iOS: The
occludeCheckparameter toggles the medical mask estimation. Setting it tofalsedisables this estimation, while setting it totrueenables it. Ensure that you adjust this parameter according to your application's needs.