Hello NVIDIA Team,
I am trying to deploy a custom YOLOv8s model on DeepStream (Jetson Orin nano), and I am facing an issue where no bounding boxes appear during inference inside the DeepStream pipeline, even though the model works correctly in Python.Model Details
YOLOv8s model, fine-tuned for 2 classes only:
person
roll_stopper
Trained using Ultralytics.
Exported to ONNX, verified that ONNX produces correct outputs for both classes.
Built FP16 TensorRT engine (.engine) from the ONNX file using trtexec, also validated engine loads correctly in TensorRT runtime.
DeepStream Setup
I am using the official NVIDIA GitHub sample:
https://github.com/NVIDIA-AI-IOT/deepstream_tools/tree/main/yolo_deepstream/deepstream_yolo
I have done the following:
. Custom YOLO parser modified for 2 classes
I edited both:
nvdsparsebbox_Yolo.cpp
nvdsparsebbox_Yolo_cuda.cu
Specifically, I set:
static const int NUM_CLASSES_YOLO = 2;
I also verified using grep that no other hard-coded 80 class constants exist.
Then I performed:
make clean
make
and verified the .so is updated and loaded by DeepStream.
- ONNX Model Verified
The ONNX model outputs correct detections (both classes) in Python using onnxruntime.
I checked ONNX initializers to ensure no tensor dimension = 80 exist
ONNX clearly reflects 2 classes, not COCO-80.
- TensorRT Engine Verified
TRT engine was built on the same Jetson device as DeepStream.
Built with:
--fp16 --explicitBatch --minShapes=1x3x640x640
--optShapes=1x3x640x640 --maxShapes=1x3x640x640
Engine deserializes correctly using a TensorRT test script.
No mismatch warnings appear regarding engine version or shape.
- DeepStream Config Verified
Key settings in
config_infer.txt:
model-engine-file=.../best_fp16_b1.engine
# onnx-file commented out
num-detected-classes=2
labelfile-path=/abs/path/labels.txt
parse-bbox-func-name=NvDsInferParseCustomYoloV8_cuda
custom-lib-path=/abs/path/libnvdsinfer_custom_impl_Yolo.so
infer-dims=3;640;640
batch-size=1
network-mode=2 # FP16
DeepStream successfully loads:
-
the engine and runs via RTSP stream.
-
Problem
DeepStream runs without errors, but no bounding boxes appear on the video output at all. -
the custom parser library
🚀 Platform Details
Jetson Platform: JetPack 5.1.5
nvdsparsebbox_Yolo.cpp.txt (12.0 KB)
nvdsparsebbox_Yolo_cuda.cu.txt (7.1 KB)
DeepStream SDK: 6.3
CUDA: 11.4
TensorRT: (version included with JetPack 5.1.5
Running on a Jetson device (Orin)