Configuration
caution
This page is out of date and currently being worked on. Proceed at your own risk.
Nimble is controlled by an initial configuration file or by using the REST API.
The configuration files are in YAML format and needs to be named config.yaml
in the root directory.
The REST API accepts data in the JSON format.
Upon starting the docker container, the config.yaml
is mounted into the container and loaded by the Nimble application.
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 follows this YAML schema:
- sources:
- type: "video" # string: "video", "file", "youtube", "inf", "zmq", "zmqinternal"
address: "rtsp://camera:554/path" # string: url or path, depending on 'type' property
rate: 25 # integer: desired input rate
pipeline:
- "pipeline element"
- name: "pipeline element" # string: name of the pipeline element
hw: "cpu" # string: "cpu", "igpu", "gpu", or "fpga"
mode: "a" # string: "a" for high-throughput or "s" for low-latency
config: {} # object, or array of objects:
sinks:
- type: "file" # string: "file", "inf", "zmq", "zmqinternal"
address: "video.mp4" # string: url or path, depending on 'type' property
filter: [] # array of integers: source(s) to filter on (by zero-based index), no filter if list is empty
Each element in the config is explained in this section:
Instructions to add custom models is explained in this section: Add Custom Model
Instructions to add custom pipeline stages is explained in this section: Add Custom Pipeline Stage
Sample Configuration Files
Samples for the different supported use cases are provided in the samples
directory.
The following pipelines can be realized by overwriting the contents of config.yaml
with each of these configurations:
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 zmqsinks
. 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 ofc1_person-detection.yaml
andc1_mask-detection.yaml
.c1_person-detection_c1_intrusion-detection_c1_people-tracking.yaml
: This is config for a combination ofc1_person-detection.yaml
andc1_intrusion-detection.yaml
andc1_people-tracking.yaml
.c1_intrusion-detection_c1_people-tracking.yaml
: This is config for a combination ofc1_intrusion-detection.yaml
andc1_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.
FPGA pipelines
c1_fpga_physical-distancing.yaml
: This is config for a single channel physical distancing pipeline.c1_fpga_intrusion-detection.yaml
: This is config for a single channel intrusion detection pipeline.c1_fpga_people-tracking.yaml
: This is config for a single channel people tracking pipeline.c1_fpga_line-crossing.yaml
: This is config for a single channel line crossing pipeline.cn_fpga_physical-distancing.yaml
: This is config for a 16 channel physical distancing pipeline.