EmbeddingTracker
Track embeddings and assign repeat identifications if they are within a certain distance.
This module provides a 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:
```yaml
elements:
- name: infer
args:
model: person-detection-nano
- name: demux
- name: infer
args:
model: resnet-50-reid
- name: mux
- name: 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:
```python
ele = EmbeddingTracker()
```
process
def process(meta: PipelineMetadata)
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
PipelineMetadata - The metadata to process.
Returns:
meta
PipelineMetadata - The processed metadata.
Examples:
```python
ele = EmbeddingTracker()
meta = ele.process(meta)
```