Triton detector
For models served by NVIDIA Triton Inference Server. Uses gRPC to communicate with the Triton server.
models:
- name: "triton-detector"
type: "triton_detector"
triton:
model_name: "my_model"
server_url: "localhost:8001"
label_file: /path/to/labels.txt
note
Triton models do not use onnx_file or architecture. The model definition lives on the Triton server.
Fields
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
triton | object | Yes | — | Triton server configuration (see below) |
label_file | string | Yes | — | Path to label file |
batch_size | integer | No | next power of 2 ≥ stream count | Inference batch size |
operate_on | string | No | — | Name of parent model (for secondary detection) |
operate_on_classes | list of int | No | all parent classes | Parent class IDs to process |
Triton configuration
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
model_name | string | Yes | — | Name of the model on the Triton server |
server_url | string | Yes | — | Triton gRPC endpoint (e.g., "localhost:8001") |
model_version | integer | No | latest | Specific model version to use |
preprocess | object | No | see defaults | Preprocessing overrides |
Triton preprocessing
| Field | Type | Default | Description |
|---|---|---|---|
scale_factor | float | 0.00392156862 (1/255) | Input normalization scale |
color_format | string | "RGB" | Input color format: "RGB", "BGR", or "GRAY" |
offsets | list of float | none | Channel mean offsets (e.g., [0.485, 0.456, 0.406]) |
maintain_aspect_ratio | integer | 0 | 1 to maintain aspect ratio during resize |
symmetric_padding | integer | 0 | 1 to use symmetric padding |
Example: Triton detector with custom preprocessing
models:
- name: "triton-detector"
type: "triton_detector"
triton:
model_name: "yolov8"
server_url: "localhost:8001"
model_version: 1
preprocess:
scale_factor: 0.00392156862
color_format: "RGB"
maintain_aspect_ratio: 1
symmetric_padding: 1
label_file: /path/to/labels.txt
batch_size: 4