Getting the best shot with an occluded face#
In LUNA ID POS, you can define whether images with occluded faces can be considered as best shots. This feature allows you to customize the behavior based on your specific requirements.
To determine 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 considered the best shot. |
false |
An image with an occluded face cannot be considered the best shot. The BestShotsFound event will appear in LunaID.bestShots() with payload DetectionError.OccludedFace every time an occluded face is recognized. |
Warning
The acceptOccludedFaces parameter requires the lunaid-mask-X.X.X.aar dependency.
To define that images with occluded faces can be considered as best shots:
1․ Add the required .plan files to your project dependencies:
implementation("ai.visionlabs.lunaid:mask:X.X.X@aar")
2․ Specify the acceptOccludedFaces parameter in LunaConfig:
LunaConfig.create(
acceptOccludedFaces = true
)