PPECompliance
Flags 'person' bounding boxes that don't have an associated 'hardhat' and 'vest' bounding box.
This module provides a pipeline element for checking PPE Compliance. It will flag any 'person' bounding box that doesn't have an associated 'hardhat' and 'vest' bounding boxes.
Examples:
REST API:
WIP
Configuration File:
```yaml
source:
- address: videos/sd_london_station_sd.mp4
type: file
elements:
- name: infer
args:
model: ppe-detection
score_threshold: 0.3
iou_threshold: 0.3
- name: ppe-compliance
```
PPECompliance Objects
class PPECompliance(Element)
Flags any 'person' bounding box that doesn't have an associated 'hardhat' and 'vest' bounding box.
Attributes:
name
str - The name of the element.
Examples:
```python
ele = PPECompliance()
```
process
def process(meta: PipelineMetadata)
Process the bounding boxes.
This is the main function for this element. It will take the bounding boxes and flag any 'person' bounding box that doesn't have an associated 'hardhat' and 'vest' bounding boxes.
Arguments:
meta
PipelineMetadata - The metadata to process.
Returns:
meta
PipelineMetadata - The processed metadata.
Examples:
```python
ele = PPECompliance()
meta = ele.process(meta)
```