Face occlusion estimation#
The face occlusion estimation determines whether the face in a frame is covered by an object.
Behavior in different platforms#
In LUNA ID for Android#
You can enable or disable via the LunaConfig.acceptOccludedFaces
parameter. By default, this parameter is set to true
, meaning that no estimations for occluded faces are performed.
val config = LunaConfig.create(
...
acceptOccludedFaces = true
...
)
When acceptOccludedFaces = false
, LUNA ID checks for occlusions of the nose, mouth, and lower part of the face. If an occlusion is detected, it triggers the OccludedFace
error.
Dependency on the medical mask estimation#
If acceptOccludedFaces
or acceptMask
are set to true
, LUNA ID skips the corresponding estimations for face occlusions or medical masks, respectively.
In LUNA ID for iOS#
The face occlusion estimation checks if the face in a frame are occluded by an object. However, you can still perform the mouth and medical mask estimations separately.
The faceOcclusionEstimatorEnabled
parameter controls whether the system should check one face for an occlusion. Setting it to false
disables this estimation, while setting it to true
enables it.
Dependency on mouth estimation#
The face occlusion estimation is performed after the mouth estimation if both the estimations are enabled.
Error handling#
- LUNA ID for Android: Returns the
DetectionError.OccludedFace
error message. - LUNA ID for iOS: Returns the following error codes:
- 1031
- 1033
- 1034
- 1035
- 1036
Implementation#
Platform | Implementation |
---|---|
LUNA ID for Android | public val acceptOccludedFaces: Boolean = true |
LUNA ID for iOS | @property (nonatomic, assign) BOOL faceOcclusionEstimatorEnabled; |