---
agent:
  instructions: "Use this search API to find relevant content across this site with keywords or natural-language queries, instead of crawling individual pages. Results are returned in Markdown."
  endpoint: "https://mixpeek.com/.well-known/search?q={query}"
  method: GET
  documentation: "https://mixpeek.com/llms.txt"
---

1.  [](/)
2.  [Code examples](/recipes)
3.  Face Search Pipeline

Back to code examples

# Face Search Pipeline

Detect, align, and embed faces across your image and video library, then search by face identity. Uses SCRFD for detection and ArcFace for 512-dimensional identity embeddings, enabling large-scale face recognition and matching.

image

video

Multi-Tier

[Run in Builder](/build?recipe=face-search-pipeline)

Python

cURL

from mixpeek import Mixpeek

client \= Mixpeek(api\_key\="YOUR\_API\_KEY", namespace\="face-search")

\# 1. A bucket for the video content, and a collection that detects, aligns and embeds every face with ArcFace

bucket \= client.buckets.create(

    bucket\_name\="video-content",

    bucket\_schema\={

        "properties": {

            "video": {

                "type": "video",

            },

        },

    },

)

collection \= client.collections.create(

    collection\_name\="video\_faces",

    source\={"type": "bucket", "bucket\_ids": \[bucket\["bucket\_id"\]\]},

    feature\_extractor\={

        "feature\_extractor\_name": "face\_identity\_extractor",

        "version": "v1",

    },

)

\# 2. Upload and process

client.buckets.upload(

    bucket\["bucket\_id"\],

    blobs\=\[{"property": "video", "type": "video", "data": "s3://your-bucket/videos/panel-2026-06.mp4"}\],

)

client.collections.trigger(collection\["collection\_id"\])

\# 3. An example face searched against the ArcFace index, then labeled from tax\_your\_known\_faces, a flat taxonomy over a collection of reference photos

retriever \= client.retrievers.create(

    retriever\_name\="face-search",

    collection\_identifiers\=\["video\_faces"\],

    input\_schema\={

        "face": {

            "type": "image",

            "required": True,

        },

    },

    stages\=\[

        {

            "stage\_name": "search",

            "stage\_id": "feature\_search",

            "parameters": {

                "searches": \[

                    {

                        "feature\_uri": "mixpeek://face\_identity\_extractor@v1/insightface\_\_arcface",

                        "query": {

                            "input\_mode": "content",

                            "value": "{{INPUT.face}}",

                        },

                        "top\_k": 50,

                    },

                \],

                "final\_top\_k": 50,

            },

        },

        {

            "stage\_name": "label",

            "stage\_id": "taxonomy\_enrich",

            "parameters": {

                "taxonomy\_id": "tax\_your\_known\_faces",

                "top\_k": 1,

            },

        },

    \],

)

\# 4. Search

results \= client.retrievers.execute(

    retriever\["retriever\_id"\],

    inputs\={

    "face": "https://example.com/person-photo.jpg",

},

)

for doc in results\["documents"\]:

    print(doc\["timestamp"\], doc\["score"\])

### Feature Extractors

Face Identity Extractor

Detect, align, and embed faces to 512-D ArcFace vectors across image, video and PDF, using SCRFD for detection.

### Retriever Stages

feature search

Search and filter documents by vector similarity using feature embeddings

filter

taxonomy enrich

Classify documents against taxonomy nodes via vector similarity

apply

## Frequently asked questions

### What is the minimum face size for detection?

SCRFD can detect faces as small as 20x20 pixels in the source image. For best search accuracy, query images should be at least 200x200 pixels.

### How does face search handle multiple faces in one frame?

Each detected face is extracted, aligned, and stored as a separate document with its own embedding. A single video frame can produce multiple face documents.

### Is face search robust to angles and lighting changes?

Yes. ArcFace embeddings are trained for pose, illumination, and expression invariance. Profile and partial faces may have lower match scores but still work.

## Related code examples and resources

Pages on the same stages, extractors and patterns.

[

Extractor

### Face Identity Extractor

Detect, align, and embed faces to 512-D ArcFace vectors across image, video and PDF, using SCRFD for detection.

Learn more





](/extractors/face-identity)[

Recipe

### Visual Similarity Search

Unified visual similarity search across both images and video frames. Query with a photo, screenshot, or frame to discover visually related content regardless of format, with MMR diversification to ensure variety in results.

Learn more





](/recipes/visual-similarity-search)[

Recipe

### Reverse Image Search

Build a reverse image search engine that accepts an image as input and returns visually similar results from your indexed collection. Uses multimodal embeddings to match visual features like color, shape, composition, and semantic content.

Learn more





](/recipes/reverse-image-search)[

Recipe

### Visual Product Search

Enable camera-based product discovery for e-commerce. Customers snap a photo of a product they like, and the pipeline returns visually similar items from your catalog along with pricing, availability, and product metadata.

Learn more





](/recipes/visual-product-search)[

Recipe

### AI-Powered Catalog Search

Replace keyword-based catalog search with AI-powered semantic and visual search. Understands natural language queries like "lightweight summer dress under $50" and combines text understanding with visual similarity for comprehensive product discovery.

Learn more





](/recipes/ai-catalog-search)[

Extractor

### Image Embedding

Generate visual embeddings for similarity search and clustering

Learn more





](/extractors/image)