Getting the best shot with faces with occluded eyes#
In LUNA ID, you can define whether an image in which a person is wearing glasses can be considered the best shot.
In LUNA ID for Android#
To get best shots with faces with occluded eyes, 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.
In LUNA ID for iOS#
To get best shots with faces with occluded eyes, set the LCLunaConfiguration.glassesCheckEnabled
property to true
. This will enable the eye occlusion estimation.
If LCLunaConfiguration.glassesCheckEnabled
is true
, frames that contains faces with sunglasses will be excluded from best shot candidates. Images that contains faces with eyeglasses can be considered to be best shots.