Getting the best shot with faces with occluded eyes#
Important: This topic applies to LUNA ID for Android.
In LUNA ID, you can define whether an image in which a person is wearing any glasses can be considered the best shot.
To do this, use the acceptGlasses
parameter. The parameter has the following values:
Parameter | Description |
---|---|
true |
An image in which eyes are occluded can be the best shot. |
false |
An image in which eyes are occluded cannot be the best shot. The NotificationDetectionError event will appear in LunaID.allEvents() with payload DetectionError.GlassesOn every time an occluded face is recognized. |
To estimate an image on eye occlusion:
1․ Add the required .plan files to the dependency:
implementation("ai.visionlabs.lunaid:glasses:1.7.6@aar")
2․ Specify the acceptGlasses
parameter in LunaConfig
:
LunaConfig.create(
acceptGlasses = false,
)
If
acceptGlasses = true
, you do not need to add the dependency.