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.
from mixpeek import Mixpeekclient = Mixpeek(api_key="YOUR_API_KEY")# Create reference collection for known facesref_collection = client.collections.create(namespace_id="ns_your_namespace",name="known_faces",extractors=["face-identity-extractor"],params={"include_face_crops": True})# Create target collection for video contentvideo_collection = client.collections.create(namespace_id="ns_your_namespace",name="video_faces",extractors=["face-identity-extractor"],params={"include_face_crops": True})# Upload reference face photosclient.buckets.upload(bucket_id="bkt_faces", url="s3://your-bucket/faces/")# Search for a person across all video contentresults = client.retrievers.execute(retriever_id="ret_face_search",query={"image_url": "https://example.com/person-photo.jpg"},input_mode="content")for doc in results["results"]:print(f"Found in: {doc['root_object_id']} at {doc['start_time']}s")
