Skip to main content

SmokeFireDetection

Counts every object detected by fire-smoke model per frame.

This module provides a pipeline element to count all the objects detected as fire/smoke.

Examples:

REST API:

WIP

Configuration File:

```yaml
elements:
- name: infer
args:
model: yolo-v3-tiny-fire-smoke
mode: a
score_threshold: 0.3
iou_threshold: 0.3
- name: smoke-fire-detection
sources:
- address: videos/fire-detection.mp4
type: file
```

SmokeFireDetection Objects

class SmokeFireDetection(Element)

Counts every object detected by fire-smoke model per frame.

Attributes:

  • name str - The name of the element.

Examples:

```python
ele = SmokeFireDetection()
```

process

def process(meta: PipelineMetadata)

Process the bounding boxes.

This is the main function for this element. It will take the bounding boxes and count the number of detections by fire-smoke model.

Arguments:

  • meta PipelineMetadata - The metadata to process.

Returns:

  • meta PipelineMetadata - The processed metadata.

Examples:

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