Skip to content

Getting the best shot with faces with occluded eyes#

In LUNA ID POS, you can define whether an image in with occluded eyes can be considered the best shot.

You can specify the following eye occlusion rules:

  • Images of people in sunglasses cannot be best shots.
  • Images of people in eyeglasses cannot be best shots.
  • Images of people in any glasses cannot be best shots.

To get best shots with faces with occluded eyes:

1․ Add the required .plan files to the dependency:

implementation("ai.visionlabs.lunaid:glasses:X.X.X@aar")

2․ Specify the glassesChecks parameter in LunaConfig to define the type of glasses in the image and whether the image can be the best shot:

lunaConfig = LunaConfig.create(
            glassesChecks = setOf(GlassesCheckType.GLASSES_CHECK_SUN, GlassesCheckType.GLASSES_CHECK_DIOPTER)
        )

The glassesChecks parameter specifies what images with glasses can be best shots.

Possible values:

Value Description
GlassesCheckType.GLASSES_CHECK_SUN Defines that images with people in sunglasses cannot be best shots.
GlassesCheckType.GLASSES_CHECK_DIOPTER Defines that images with people in eyeglasses cannot be best shots.

You can specify either one, none, or both possible values.

The default value is not set.