# Face Recognition

### Face Recognition <a href="#face-recognition" id="face-recognition"></a>

A device configured to reauthenticate by facial recognition will require that the BlueFletch Vision reauthentication APK be installed on the device and a Vision Database ZIP file be downloaded to the file location `/sdcard/Download/ems_vision_database.zip`. Contact your BlueFletch representative to request a Database ZIP file. On the hardware side, Vision requires a device with a front-facing camera to operate.

To reauthenticate with Vision, login with the BlueFletch Authentication module. If the device has been configured as indicated below to include a logged-in layout with the Vision application's Training activity, then after the user logs in, they can open that activity. Vision will "train" itself to recognize the user's face by collecting multiple images, ideally from a variety of angles as the user shifts the device in relation to their face.

The user may lock the device's screen. Upon unlocking, the user will be prompted for reauthentication by Vision turning on the front-facing camera. If the user's face image matches within a threshold of similarity against the expected images stored in the database, then the user is reauthenticated and returned to the logged-in state.

#### Configuration <a href="#configuration_1" id="configuration_1"></a>

Vision Training [application object](/bluefletch-enterprise/product-guides/bluefletch-launcher/launcher3/technical-guide.md#application-object) in a [layout](/bluefletch-enterprise/product-guides/bluefletch-launcher/launcher3/technical-guide.md#layouts):

```
"layouts": {
    "Layout Group Example": [
      {
        "label" : "Vision Training",
        "package": "com.bluefletch.ems.vision",
        "activity": "FaceTrainActivity"
      }
      ...
    ]
    ...
}
```

The following key-value pairs can be set within the [`settings`](/bluefletch-enterprise/product-guides/bluefletch-launcher/launcher3/technical-guide.md#settings) object of the Launcher configuration JSON file.

**Settings for Vision application:**

| Field             | Data Type | Description                                                                                         |
| ----------------- | --------- | --------------------------------------------------------------------------------------------------- |
| useSecondaryAuth  | string    | (See description above.) Assign the value `"face"`.                                                 |
| vision\_threshold | double    | When using Vision reauthentication, what is the percentage threshold to indicate a match. ie. 0.45. |
| vision\_attempts  | integer   | When using Vision reauthentication, number of attempts to match a face to the vision database.      |

<br>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bluefletch.com/bluefletch-enterprise/product-guides/authentication-and-sso/features/secondary-authentication/face-recognition.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
