Skip to main content

Configuration File

info

Using configuration files to deploy pipelines should only be used for debugging/testing. The REST API is the recommended method.

Nimble is primarily controlled using its REST API. However, Nimble also supports using a configuration file to create pipelines on application startup. The REST API is the only method for dynamically updating the configuration after Nimble has started.

For an example of the REST deployment method, please refer to Deployer Example.

The configuration file must be in YAML format and must be specified using the -c (or --config) option on the command line. When running Nimble in a Docker container, the configuration file must be mounted into the container for it to be available at runtime.

The configuration file follows this YAML schema:

- sources:
- type: "video" # string: "video", "file", "nimble", "zmq", "inf"
address: "rtsp://camera:554/path" # string: url or path, depending on 'type' property
rate: 25 # integer: desired input rate
elements:
- name: "element name" # string: name of the pipeline element
args: {} # object: element initialization arguments
config: {} # object, or array of objects: static metadata
sinks:
- type: "file" # string: "file", "embedding", "pickle", "zmq", "inf"
address: "video.mp4" # string: url or path, depending on 'type' property
filter: [] # array of integers: source(s) to allow (by zero-based index), no filter if list is empty

Each component of the configuration is (mostly) equivalent to how it is in the API:

info

The only difference is that the sources and sinks are directly embedded in the pipeline definition instead of being connected via their IDs. Whenever a resource ID is required, a zero-based index should be used as a replacement.

Example: For a sink's filter property, the source's index should be used to identify the source to filter by.

Sample Configuration Files

Samples for the different supported high-level use cases are provided in the samples directory. The following pipelines can be created at startup by specifying the configuration file on the command line:

  • CPU pipelines

    • c1_person-detection.yaml : This is config for a single channel person detection pipeline.
    • c1_ppe-compliance.yaml : This is config for a single channel ppe compliance detection pipeline.
    • c3_person-detection.yaml : This is config for a 3 channel person detection pipeline.
    • c1_camera_person-detection.yaml : This is config for a single channel person detection pipeline streaming from a live camera, that also applies the social distancing algorithm with multiple zmq sinks. Please configure the camera url in the yaml.
    • c1_mask-detection.yaml : This is config for a single channel mask detection pipeline.
    • c1_person-detection_privacy.yaml : This is config for a single channel person detection and face detection pipeline that applies blurring to faces for privacy.
    • c1_intrusion-detection.yaml : This is config for a single channel intrusion detection pipeline.
    • c1_people-tracking.yaml : This is config for a single channel people tracking pipeline.
    • c1_line-crossing.yaml : This is config for a single channel line crossing pipeline.
    • c1_person-detection_c1_mask-detection.yaml : This is config for a combination of c1_person-detection.yaml and c1_mask-detection.yaml.
    • c1_person-detection_c1_intrusion-detection_c1_people-tracking.yaml : This is config for a combination of c1_person-detection.yaml and c1_intrusion-detection.yaml and c1_people-tracking.yaml.
    • c1_intrusion-detection_c1_people-tracking.yaml : This is config for a combination of c1_intrusion-detection.yaml and c1_people-tracking.yaml.
    • c1_fire-detection.yaml : This is config for a single channel fire detection pipeline.
  • iGPU pipelines

    • c1_igpu_person-detection.yaml : This is config for a single channel person detection pipeline.
  • GPU pipelines

    • c1_gpu_person-detection.yaml : This is config for a single channel person detection pipeline.