Skip to main content

ReIDPreprocessing

Crop the bounding box from the original image for ReID

This module provides a pipeline element to Crop the bounding box from the original image for use in the ReID model.

Examples:

REST API:

WIP

Configuration File:

```yaml
elements:
- name: infer
args:
model: person-v2
- name: demux
- name: reid-preprocessing
- name: infer
args:
model: reid
- name: mux
- name: reid-postprocessing
sources:
- address: videos/sample.mp4
type: file
```

ReIDPreprocessing Objects

class ReIDPreprocessing(Element)

Crop the image for reid.

Attributes:

  • name str - The name of the element

Examples:

```python
ele = ReIDPreprocessing()
```

process

def process(meta: PipelineMetadata)

Crop the input frame for reid.

This main function crops the bounding box from the image for reid.

Arguments:

  • meta PipelineMetadata - The metadata to process.

Returns:

  • meta PipelineMetadata - The processed metadata.

Examples:

```python
meta = ReIDPreprocessing().process(meta)
```