Discrepancies in Object Detection Results between Ultralytics and DeepStream at Yolov8

• Hardware Platform (Jetson / GPU): dPU A40.
• DeepStream Version: 6.4-triton-multiarch.
• TensorRT Version: 8.6.2.3.
• NVIDIA GPU Driver Version (valid for GPU only): 525.147.05.
• Issue Type( questions, new requirements, bugs): questions.
• 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)

I am using DeepStream with Python, specifically the repository GitHub - marcoslucianops/DeepStream-Yolo: NVIDIA DeepStream SDK 6.3 / 6.2 / 6.1.1 / 6.1 / 6.0.1 / 6.0 / 5.1 implementation for YOLO models to convert a YOLOv8x.pt model to ONNX for use in a single-class person detection pgie model. I’ve noticed significant differences in the results when comparing the model’s performance using Ultralytics for inference versus using DeepStream. In Ultralytics, I set the iou to 0.7 and the threshold to 0.5, and similarly in DeepStream, I set the nms-iou-threshold to 0.7 and the pre-cluster-threshold to 0.5. Am I configuring something incorrectly? Can you identify why there might be such a significant discrepancy in the results between the two methods?
Below are the results of using ultralytics for inference:


And here is the result from deepstream:

Here is the ultralytics code I am using for inference, config pgie deepstream, model pt and model onnx:
yolov8 - Google Drive

Could you attach the original image to us? And how to run that with Ultralytics?

I uploaded everything to this link: yolov8 - Google Drive. 204_origin is the original image, 204_ultralytics is the inference image using ultralytics, 204_deepstream is the result I get when using deepstream and built_in_infer.py is the script for inference using ultralytics. Please help me, thank you very much.

DId you implement the NvDsInferParseYolo yourself? We have summarized some experience in accuracy. Could you refer to the Debug Tips for DeepStream Accuracy Issue and check if that helps?

@taolanhat were you able to find a solution for the issue? I’m having an identical issue using the following nvinfer config.

Found the following git issue from DeepStream-Yolo repository owner.

Apparently, TensorRT drops the accuracies when converting model, particularly, during layer optimizations.

The issue is still open and I couldn’t find any resolution in the shape of a fix, alternative or workaround.