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 |
Default. 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:X.X.X@aar")
2․ Specify the acceptOccludedFaces
parameter in LunaConfig
:
LunaConfig.create(
acceptOccludedFaces = false
)
Important: The
acceptOccludedFaces
parameter requires the lunaid-mask-X.X.X.aar dependency. For details, see Distribution kit.
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
.