Skip to main content

EmbeddingSink

Creates an embedding database for each sources with the annotated metadata.

This module contains the embedding sink. It is responsible for creating an embedding database for each source with the annotated metadata. The embedding database is a nested directory structure. The first directory level is the channel ID, the second directory level is the individual frames. Finally each frame folder contains the frame itself as a .jpg as well as an .emb file for each embedding in the frame. You can optionally include the arcface-identifier element to create candidate identification files .cid for each frame.

For a detailed example of how to use this sink, please refer to the Facial Recognition Example.

Examples:

REST API:

WIP

Configuration File:

sink:
- address: ./tmp
- filter: *
- type: embedding

EmbeddingSink Objects

class EmbeddingSink(Sink)

Creates an embedding database for each source with the annotated metadata.

Attributes:

  • sink_address str - The location of the output embedding database.
  • sink_filter function - A function that filters the metadata.

Examples:

sink = EmbeddingSink("./tmp", lambda x: True)