Skip to main content

IdentificationVoting

Assign the most common identity out of the last 10 detections for that bounding box.

This module provides a pipeline element whose purpose is to remove some of the identification "noise" inherent in frame-by-frame identification. It achieves this by keeping a sliding windows of the last 10 identities for each bounding box and assigning the most common identity to the bounding box.

This pipeline element relies on the following elements for its metadata:

Examples:

REST API:

WIP

Configuration File:

short-from : identification-voting

```yaml
elements:
- name: infer
args:
model: yolov5s-face
mode: a
score_threshold: 0.3
iou_threshold: 0.3
- name: demux
- name: face-alignment
- name: infer
args:
model: arcface
- name: mux
- name: arcface-identifier
args:
database: redis
- name: object-tracking
args:
max_age: 100
history: 1000
sampling_frequency: 10
- name: identification-voting
sources:
- address: videos/sample.mp4
type: file
```

IdentificationVoting Objects

class IdentificationVoting(Element)

Assign the most common identity out of the last 10 detections for that bounding box.

Attributes:

  • name str - Name of the element.

Examples:

```python
ele = IdentificationVoting()
```

process

def process(meta: PipelineMetadata)

Assign the most common identity out of the last 10 detections for that bounding box.

This is the main function for the element. In this case we are going to create a sliding window of the identities for specific bounding boxes and then vote on the most common identity for each window and assign it to the bounding box.

Arguments:

  • meta PipelineMetadata - The metadata of the frame.

Returns:

  • meta PipelineMetadata - The processed metadata.

Examples:

```python
ele = IdentificationVoting()
meta = ele.process(meta)
```