Skip to main content

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:

short-from : ppe-compliance

source:
- address: https://youtu.be/jY86pXeTOLw
- type: youtube
pipeline:
- ppe-detection:a:0.3:0.3
- 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:

ele = PPECompliance()

process

 | def process(meta)

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 dict - The metadata to process.

Returns:

  • meta dict - The processed metadata.

Examples:

ele = PPECompliance()
meta = ele.process(meta)