Getting the best shot with an occluded face#
In LUNA ID, you can define whether images with occluded faces can be considered best shots.
In LUNA ID for Android#
To define whether an image with an occluded face will be considered the best shot, use the LunaConfig.acceptOccludedFaces
parameter.
The acceptOccludedFaces
parameter has the following values:
Value | Description |
---|---|
true |
An image with an occluded face can be the best shot. |
false |
An image with an occluded face cannot be the best shot. The NotificationDetectionError event will appear in LunaID.allEvents() with payload DetectionError.OccludedFace every time an occluded face is recognized. |
To estimate an image on face occlusion:
1․ Add the required .plan files to the dependency:
implementation("ai.visionlabs.lunaid:mask:1.7.0@aar")
2․ Specify the acceptOccludedFaces
parameter in LunaConfig
:
LunaConfig.create(
acceptOccludedFaces = false
)
If
acceptOccludedFaces = true
, you do not need to add the dependency.
In LUNA ID for iOS#
To define whether an image with an occluded face will be considered the best shot, set the LCLunaConfiguration.occludeCheck
parameter to true
.