Face Extraction

Face Extraction Processor #

Detects human faces in a document and attempts to identify each person using a vision model. Detected faces and their identities are stored in the document metadata.

Requirements/Dependencies #

DependencyRequired for
Pigo facefinder cascade binaryFace detection (set via pigo_facefinder_path)
Apache Tika serverExtracting embedded images from PDF, PPTX, DOCX

Supported formats #

Supported formatNotes
ImageFaces detected directly
PDF, PPTX, DOCXFaces detected in embedded images

Depends on document_text_attachment_extraction — this processor must run after document_text_attachment_extraction so that the extracted text is available as context for the vision model.

Note: Face detection requires pigo_facefinder_path to be set. If omitted, the processor exits silently without producing any output.

Configuration #

ParameterTypeRequiredDefaultDescription
message_fieldstringNomessagesPipeline context key for the input messages
output_queueobjectNonullQueue to push processed documents to
tika_endpointstringNohttp://127.0.0.1:9998Apache Tika server URL
tika_timeout_in_secondsintNo120Per-file Tika timeout
pigo_facefinder_pathstringNoPath to the Pigo facefinder cascade binary
vision_model_providerstringNoProvider ID for the vision model used for face recognition
vision_modelstringNoModel name for face recognition
image_content_formatstringNodata_uriHow face crop images are sent to the vision model: data_uri or binary
llm_generation_langstringNo(app default)BCP 47 language tag for LLM-generated content (e.g. en-US, zh-CN)

Example #

- face_extraction:
    pigo_facefinder_path: /usr/local/share/pigo/facefinder
    vision_model_provider: openai
    vision_model: gpt-4o
    output_queue:
      name: "documents_with_faces"
Edit Edit this page