DeepStream Engine File Only Detecting Single Class After Conversion

I have a custom 3-class object detection model.

.pt → works fine, all 3 classes detected correctly.

Converted to ONNX → still works fine, correct detections for all 3 classes.

Integrated into DeepStream pipeline and generated an engine (.engine) file from the ONNX.

Problem:
When running inference with the engine file in DeepStream, it only outputs detections for a single class — specifically, the one that appears first in my labels file. All detected objects are being assigned this same class, even though visually they belong to different classes.

Notes:

The .pt and .onnx models are working correctly outside DeepStream.

The DeepStream configuration (labels.txt, num-detected-classes, etc.) seems correct.

The issue only happens after TensorRT engine generation in DeepStream.

Has anyone faced this issue before? Any suggestions on what to check.

config file :—
[property]

gpu-id=0
net-scale-factor=0.0039215697906911373

onnx-file=../../../surveillance_ai_model/x86_64/Person_Vehicle_Detection/VehicleDetection_V1.9_YOLOn640.onnx
model-engine-file=../../../surveillance_ai_model/x86_64/Person_Vehicle_Detection/VehicleDetection_V1.9_YOLOn640.onnx_b1_fp32.engine
labelfile-path=../../../surveillance_ai_model/x86_64/Person_Vehicle_Detection/labels.txt

infer-dims=3;640;640
uff-input-blob-name=input

cluster-mode=3
batch-size=4
network-mode=0
process-mode=1
model-color-format=0
num-detected-classes=3
interval=0
gie-unique-id=1
#output-blob-names=conv2d_bbox;conv2d_cov/Sigmoid
#output-blob-names=output_bbox/BiasAdd;output_cov/Sigmoid
#output-blob-names=output_bbox;output_cov
output-blob-names=output
#use-gpu-preprocess=1
enable_vic=0

Minimum object filtering

input-object-min-width=40
input-object-min-height=30

enable-dla=1

Force GPU scaling to avoid VIC limit

scaling-compute-hw=0

parse-bbox-func-name=NvDsInferParseYolo
custom-lib-path=/home/smarg/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo/libnvdsinfer_custom_impl_Yolo.so

min-box-width=30
min-box-height=30
max-box-width=1920
max-box-height=1080

[class-attrs-0]
#detected-min-w=50
#detected-min-h=50
pre-cluster-threshold=0.10
eps=0.7
minBoxes=1
group-threshold=1
#bbox-border-color=0;1;0;0.3

[class-attrs-1]
pre-cluster-threshold=0.20
eps=0.7
minBoxes=1
group-threshold=1
#bbox-border-color=0;1;0;0.3

[class-attrs-2]
pre-cluster-threshold=0.10
eps=0.7
minBoxes=1
group-threshold=1
#bbox-border-color=0;1;0;0.3

Please provide complete information as applicable to your setup.

• Hardware Platform (Jetson / GPU)

• DeepStream Version

• JetPack Version (valid for Jetson only)

• TensorRT Version

• NVIDIA GPU Driver Version (valid for GPU only)

• Issue Type( questions, new requirements, bugs)

• How to reproduce the issue ? (This is for bugs. Including which sample app is using, the configuration files content, the command line used and other details for reproducing)

• Requirement details( This is for new requirement. Including the module name-for which plugin or for which sample application, the function description)

Sorry for the late reply, Is this still an DeepStream issue to support? Thanks!
Do you mean the bboxes are only the the labels of bboxes are the same? if so, coud you share the content of Person_Vehicle_Detection/labels.txt? Please refer to the native sample labels.

/opt/nvidia/deepstream/deepstream/samples/models/Primary_Detector/labels.txt
/opt/nvidia/deepstream/deepstream/samples/models/Secondary_VehicleTypes/labels.txt

and nvinfer plugin is opensource. you can add logs in InferPostprocessor::parseLabelsFile of /opt/nvidia/deepstream/deepstream-7.1/sources/libs/nvdsinfer/nvdsinfer_context_impl.cpp to check if the parsing is fine.