# Face Recognizer

## What is FaceRecognizer?

`FaceRecognizer` processes images and video frames independently without temporal tracking. It detects and identifies faces in single images, image batches, or video streams (frame-by-frame via `predict_batch()`).

## When to Use FaceRecognizer

Choose `FaceRecognizer` when you need to:

* Process photo albums or image collections
* Analyze video files frame-by-frame without temporal tracking
* Run batch recognition on multiple images or video streams
* Build a face database from images
* Work without real-time tracking requirements

**For video with persistent face tracking**, use [FaceTracker](/face-recognition/guides/overview-1.md) instead - it maintains face identities across frames and supports real-time alerts.

## Core Concepts

### Configuration

All settings are controlled through `FaceRecognizerConfig`:

```python
import degirum_face

config = degirum_face.FaceRecognizerConfig(
    face_detection_model_spec=detector_spec,   # Detection model
    face_embedding_model_spec=embedding_spec,  # Embedding model
    db_path="./face_db.lance",                 # Database location
    cosine_similarity_threshold=0.6,           # Match threshold
)

face_recognizer = degirum_face.FaceRecognizer(config)
```

See [Configuration Guide](/face-recognition/guides/overview/configuration.md) for all options.

## Methods

`FaceRecognizer` provides methods for enrollment, prediction, and database management:

* [**enroll\_image()**](/face-recognition/guides/overview/methods.md#enroll_image) / [**enroll\_batch()**](/face-recognition/guides/overview/methods.md#enroll_batch) - Add faces to database
* [**predict()**](/face-recognition/guides/overview/methods.md#predict) / [**predict\_batch()**](/face-recognition/guides/overview/methods.md#predict_batch) - Recognize faces in images/video

See [Methods Reference](/face-recognition/guides/overview/methods.md) for complete API documentation with examples.


---

# 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.degirum.com/face-recognition/guides/overview.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.
