Skip to main content

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

FieldTypeRequiredDefaultDescription
tritonobjectYesTriton server configuration (see below)
label_filestringYesPath to label file
batch_sizeintegerNonext power of 2 ≥ stream countInference batch size
operate_onstringNoName of parent model (for secondary detection)
operate_on_classeslist of intNoall parent classesParent class IDs to process

Triton configuration

FieldTypeRequiredDefaultDescription
model_namestringYesName of the model on the Triton server
server_urlstringYesTriton gRPC endpoint (e.g., "localhost:8001")
model_versionintegerNolatestSpecific model version to use
preprocessobjectNosee defaultsPreprocessing overrides

Triton preprocessing

FieldTypeDefaultDescription
scale_factorfloat0.00392156862 (1/255)Input normalization scale
color_formatstring"RGB"Input color format: "RGB", "BGR", or "GRAY"
offsetslist of floatnoneChannel mean offsets (e.g., [0.485, 0.456, 0.406])
maintain_aspect_ratiointeger01 to maintain aspect ratio during resize
symmetric_paddinginteger01 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