models
The models list defines the AI inference pipeline. It can contain detectors, pose estimators, segmentation models, classifiers, Triton models, and an optional tracker. Entries are processed in the order they appear, which controls the inference chain.
models:
- name: "my-detector"
type: "detector"
architecture: "yolo11"
onnx_file: /path/to/model.onnx
label_file: /path/to/labels.txt
Common fields
These fields apply to all model types except tracker.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
name | string | No | auto-generated (e.g., detector_0) | Unique name for this model. Used by operate_on for chaining. |
type | string | Yes | — | Model type — see model types |
onnx_file | string | Yes (non-Triton) | — | Path to ONNX model file |
label_file | string | Yes | — | Path to label file (one class name per line) |
batch_size | integer | No | next power of 2 ≥ stream count | Inference batch size (always rounded up to a power of 2) |
precision | string | No | "fp16" | Inference precision: "fp32" or "fp16" |
tip
num_classes is determined automatically by counting non-empty lines in label_file. The DeepStream nvinfer config file is auto-generated — you only need to provide the ONNX model and labels.
Model types
type value | Description |
|---|---|
detector | Object detection with bounding boxes |
pose | Human keypoint estimation (17 COCO joints) |
segmentation | Instance segmentation with mask overlay |
classifier | Secondary classification on detected objects |
triton_detector | Object detection via Triton Inference Server |
triton_classifier | Classification via Triton Inference Server |
tracker | Object tracking |
See Model types for detailed usage of each.
Model chaining rules
- At least one primary model (without
operate_on) is required in every pipeline. operate_onmust reference a model defined before it in the list.- Classifiers must always have
operate_on. operate_on_classesindices must be valid class IDs of the parent model.
Supported chains:
| Chain | Description |
|---|---|
detector → classifier | Detect objects, then classify each detection |
detector → detector | Detect objects, then run a secondary detector on each crop |
triton_detector → triton_classifier | Same pattern using Triton models |