Skip to main content

EmbeddingTracker

Track embeddings and assign repeat identifications if they are within a certain distance.

This module provides an pipeline element to track embeddings and assign repeat identifications of the same item if they are within a certain distance. This module is mainly a reference for custom embedding tracker implementations.

Examples:

REST API:

WIP

Configuration File:

short-from : embedding-tracker

pipeline:
- person-detection-nano:a:0.3:0.3
- demux
- resnet-50-reid:a:0.3:0.3
- mux
- embedding-tracker
sources:
- address: videos/sample.mp4
- type: file

EmbeddingTracker Objects

class EmbeddingTracker(Element)

Track embeddings and assign repeat identifications if they are within a certain distance.

Attributes:

  • name str - The name of the element.

Examples:

ele = EmbeddingTracker()

process

 | def process(meta)

Process the detections and assign repeat identifications if they are within a certain distance.

This is the main function for the element. It takes the detection and searches for the identification in the embedding database. If the identification with the threshold is found, the detection is assigned the identification.

Arguments:

  • meta dict - The metadata to process.

Returns:

  • meta dict - The processed metadata.

Examples:

ele = EmbeddingTracker()
meta = ele.process(meta)