# Face Matching

As the name suggests this helps in matching two face images.

### How do I take a face image which has to be matched?

In the image type of field, there are **Face detection settings** using which the user can ensure that an image field can have only the face image as its value. So, the user creating the form creates an image field with [<mark style="color:purple;">Face detection settings</mark>](https://docs.senpiper.com/form-builder/creating-forms/additional-form-settings/conditions/pages/-MlTKz6Y8xUCmZEa9lxP#1.-image).

### How can I get the face image with which I have to match?

The user can use the [<mark style="color:purple;">master database</mark>](/form-builder/creating-forms/adding-fields-and-saving-a-form/creating-master-records.md) to fetch the face images which can be used as a source image for face matching.

### How do I use the two images to create the condition?

Let's take an example to understand this.

We need to set up a process for logging in the daily attendance of the staff in a Company. So, we create a master database with all the staff details with their face images (face image need to be captured in an image field with face detection settings configured). Now, we create an **Attend**a**nce form** that will be filled by the staff members regularly to log in their attendanc&#x65;**.** We configure Face detection settings for an image field and set Face Matching condition for it.

Stepwise explanation:&#x20;

1. Create a [<mark style="color:purple;">master form</mark> ](/form-builder/creating-forms/adding-fields-and-saving-a-form/creating-master-records.md#how-can-i-make-any-form-a-master-database)**Employees details** which should have an image field with **Face detection settings** configured.
2. Create another form **Attendance form** with an image field with **Face detection settings** configured and [<mark style="color:purple;">link the master form</mark>](/form-builder/creating-forms/adding-fields-and-saving-a-form/creating-master-records.md#how-can-i-link-a-master-database-to-a-form) Employee details to it.&#x20;
3. In the **Attendance form** click on the **Settings** tab and click on [<mark style="color:purple;">**Conditions**</mark>](/form-builder/creating-forms/additional-form-settings/conditions.md) in the left pane. Click on the option **Face Matching.**
4. Set the parameters required for the Face Matching:&#x20;

<figure><img src="/files/fKpDZt2EGzJ1ck8nsbNw" alt=""><figcaption></figcaption></figure>

* <<mark style="color:red;">1</mark>> Select the field over which you want to apply Face Matching. In our case, it is the image field of **Attendance form.**
* <<mark style="color:red;">2</mark>> Select the field with which you want to match the image captured. In our case its image field of **Employees details**. As we have linked the **Employees details** as a master form to the **Attendance form**, when the user clicks on Select field (marked as <mark style="color:red;">2</mark> in the above image), all the image fields with **Face detection settings** of **Employee details** form are visible in the dropdown.
* <<mark style="color:red;">3</mark>> Error message that should be displayed to the user creating the submission, in case the Face Matching fails.

5\. Click on **Save** once all is set.

Using this process, we make sure that every staff member logs in their attendance with their faces being matched with the ones stored in the master database.

{% hint style="info" %}
To be able to use the Face Matching condition the user has to ensure that the toggle for the option [<mark style="color:purple;">**Enable the system to generate the unique ID for the faces for the faces captured for future face matching**</mark> ](https://docs.senpiper.com/form-builder/creating-forms/additional-form-settings/conditions/pages/-MlTKz6Y8xUCmZEa9lxP#1.-image)is on for both the image fields (the one being matched and the one with which it has to be matched).
{% endhint %}


---

# 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.senpiper.com/form-builder/creating-forms/additional-form-settings/conditions/face-matching.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.
