> For the complete documentation index, see [llms.txt](https://docs.recognito.vision/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.recognito.vision/how-to-implement-1-n-identification-with-recognito-sdk.md).

# How to implement 1:N identification with RECOGNITO SDK

Using RECOGNITO FaceSDK, you can implement 1:N face identification function.

## 1. Face Enrollment

<figure><img src="/files/mGLbkUxlwtuH2RnYhL7P" alt=""><figcaption><p>Face Enrollment Step</p></figcaption></figure>

## 2. Face Identification

<figure><img src="/files/TzDZlO55dOROMNu68csT" alt=""><figcaption><p>Face Identification Step</p></figcaption></figure>

### 1:N Face Template Matching Sample Code

{% code title="Android-FaceRecognition-FaceLivenessDetection/app/src/main/java/com/bio/facerecognition /CameraActivityKt.kt" %}

```kotlin
...
if(faceBoxes.size > 0) {
    val faceBox = faceBoxes[0]
    if (faceBox.liveness > SettingsActivity.getLivenessThreshold(context)) {
        val templates = FaceSDK.templateExtraction(bitmap, faceBox)

        var maxSimiarlity = 0f
        var maximiarlityPerson: Person? = null
        for (person in DBManager.personList) {
            val similarity = FaceSDK.similarityCalculation(templates, person.templates)
            if (similarity > maxSimiarlity) {
                maxSimiarlity = similarity
                maximiarlityPerson = person
            }
        }
        if (maxSimiarlity > SettingsActivity.getMatchThreshold(context)) {
            recognized = true
            val identifiedPerson = maximiarlityPerson
            val identifiedSimilarity = maxSimiarlity

            runOnUiThread {
                val faceImage = Utils.cropFace(bitmap, faceBox)
                val intent = Intent(context, ResultActivity::class.java)
                intent.putExtra("identified_face", faceImage)
                intent.putExtra("enrolled_face", identifiedPerson!!.face)
                intent.putExtra("identified_name", identifiedPerson!!.name)
                intent.putExtra("similarity", identifiedSimilarity)
                intent.putExtra("liveness", faceBox.liveness)
                intent.putExtra("yaw", faceBox.yaw)
                intent.putExtra("roll", faceBox.roll)
                intent.putExtra("pitch", faceBox.pitch)
                startActivity(intent)
            }
        }
    }
}
```

{% endcode %}

## Examples

### - Linux 1:N Face Search Demo

{% embed url="<https://github.com/recognito-vision/Linux-FaceRecognition-FaceLivenessDetection/tree/main/Identification(1%3AN)-Demo>" %}

### - Window-Face SDK Video Surveillance Demo

{% content-ref url="/pages/6stv2ijfJ6cGEbebU0gP" %}
[Sample Application](/face-recognition-sdk/integration-guide/windows/sample-application.md)
{% endcontent-ref %}

### - Android-Face SDK Demo

{% content-ref url="/pages/Qz2IcmBxv25uBiCKrHJO" %}
[Sample Application](/face-recognition-sdk/integration-guide/android/sample-application.md)
{% endcontent-ref %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.recognito.vision/how-to-implement-1-n-identification-with-recognito-sdk.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.
