DeepStream SDK 및 TensorRT를 사용한 NVIDIA Jetson의 Ultralytics YOLO26



시청: Jetson Orin NX에서 NVIDIA Deepstream과 함께 Ultralytics YOLO26 모델을 사용하는 방법 🚀

이 가이드에서는 DeepStream SDK와 TensorRT를 사용해 NVIDIA Jetson 디바이스에 Ultralytics YOLO26을 배포하는 방법을 안내합니다. 여기서는 Jetson 플랫폼에서 추론 성능을 극대화하기 위해 TensorRT를 사용합니다.

이 가이드에서는 YOLO26용 DeepStream 구성, INT8 보정, 멀티 스트림 설정, 벤치마크 결과를 안내합니다.

NVIDIA DeepStream SDK on Jetson platform
참고

이 가이드는 JetPack JP6.1을 실행하는 NVIDIA Jetson Orin Nano Super Developer Kit, JetPack JP5.1.3을 실행하는 NVIDIA Jetson Orin NX 16GB 기반의 Seeed Studio reComputer J4012, JetPack JP4.6.4을 실행하는 NVIDIA Jetson Nano 4GB 기반의 Seeed Studio reComputer J1020 v2에서 테스트했습니다. 최신 및 레거시 제품을 포함한 NVIDIA Jetson 하드웨어 전 제품군에서 작동할 것으로 예상됩니다.

NVIDIA DeepStream이란 무엇인가요?#

NVIDIA DeepStream SDK는 AI 기반 멀티센서 처리, 비디오, 오디오 및 이미지 이해를 위한 GStreamer 기반의 완전한 스트리밍 분석 툴킷입니다. IVA(지능형 비디오 분석) 앱과 서비스를 개발하는 비전 AI 개발자, 소프트웨어 파트너, 스타트업 및 OEM에 적합합니다. 신경망과 추적, 비디오 인코딩/디코딩, 비디오 렌더링 같은 복잡한 처리 작업을 통합한 스트림 처리 파이프라인을 만들 수 있습니다. 이러한 파이프라인을 통해 비디오, 이미지 및 센서 데이터를 실시간으로 분석할 수 있습니다. DeepStream의 멀티플랫폼 지원을 활용하면 온프레미스, 엣지 및 클라우드에서 비전 AI 애플리케이션과 서비스를 더 빠르고 쉽게 개발할 수 있습니다.

사전 요구 사항#

이 가이드를 시작하기 전에 다음을 수행하세요.

팁

이 가이드에서는 Debian 패키지를 사용하여 Jetson 장치에 DeepStream SDK를 설치했습니다. DeepStream의 이전 버전에 액세스하려면 Jetson용 DeepStream SDK(보관된 버전)도 참조할 수 있습니다.

YOLO26용 DeepStream 구성#

여기서는 YOLO 모델에 대한 NVIDIA DeepStream SDK 지원이 포함된 marcoslucianops/DeepStream-Yolo GitHub 저장소를 사용합니다. marcoslucianops의 기여에 감사드립니다.

  1. 필요한 종속 항목과 함께 Ultralytics를 설치하세요.

    pip install ultralytics onnx onnxslim
  2. DeepStream-Yolo 저장소를 복제하세요.

    cd ~
    git clone https://github.com/marcoslucianops/DeepStream-Yolo
  3. YOLO26 프로젝트에서 원하는 Ultralytics YOLO26 객체 감지 모델(.pt)을 다운로드하세요. 여기서는 yolo26s.pt를 사용합니다.

    wget https://github.com/ultralytics/assets/releases/download/v8.4.0/yolo26s.pt
참고

사용자 지정 학습된 YOLO26 모델도 사용할 수 있습니다.

  1. 모델을 ONNX로 변환하고 DeepStream이 클래스 이름을 읽어 올 labels.txt 파일을 작성하세요.

    from ultralytics import YOLO
    
    model = YOLO("yolo26s.pt")
    model.export(format="onnx", nms=False, agnostic_nms=True)  # creates 'yolo26s.onnx'
    with open("labels.txt", "w") as f:
        f.write("\n".join(model.names.values()))
내보내기 인수

nms=False은 NMS가 없는 헤드를 내보내고, agnostic_nms=True은 감지 결과당 클래스를 하나만 유지하여 DeepStream 구성의 cluster-mode=4(클러스터링 없음)가 상자를 두 번 그리지 않도록 합니다. 추론 크기를 변경하려면 imgsz=1280(기본값: 640)을 추가하고, 배치 크기를 4로 설정하려면 batch=4를 추가하세요(내보낸 배치는 정적이므로 DeepStream 구성의 batch-size와 일치해야 합니다). TensorRT 8.2 이하(DeepStream 6.0.1 이하)의 경우 opset=12을 추가하세요. 전체 목록은 내보내기 인수를 참조하세요.

  1. 생성된 .onnx 모델 파일과 labels.txt 파일을 DeepStream-Yolo 폴더에 복사하세요.

    cp yolo26s.onnx labels.txt ~/DeepStream-Yolo
    cd ~/DeepStream-Yolo
  2. 설치된 JetPack 버전에 따라 CUDA 버전을 설정하세요.

    JetPack 4.6.4의 경우:

    export CUDA_VER=10.2

    JetPack 5.1.3의 경우:

    export CUDA_VER=11.4

    JetPack 6.1의 경우:

    export CUDA_VER=12.6

    JetPack 7.1의 경우:

    export CUDA_VER=13.0
  3. 라이브러리를 컴파일하세요.

    make -C nvdsinfer_custom_impl_Yolo clean && make -C nvdsinfer_custom_impl_Yolo
  4. 모델에 맞게 config_infer_primary_yolo26.txt 파일을 편집하세요(클래스 80개인 YOLO26s의 경우).

    [property]
    ...
    onnx-file=yolo26s.onnx
    ...
    num-detected-classes=80
    ...
    parse-bbox-func-name=NvDsInferParseYolo
    ...
YOLO26 정확도 설정

YOLO26은 입력 이미지에 중앙 패딩을 적용해 크기를 조정하며 NMS 없이 실행됩니다. 최상의 정확도를 얻으려면 config_infer_primary_yolo26.txt의 [property] 섹션에 다음을 추가하세요.

[property]
...
maintain-aspect-ratio=1
symmetric-padding=1
cluster-mode=4
...
  1. deepstream_app_config 파일을 편집하세요.

    ...
    [primary-gie]
    ...
    config-file=config_infer_primary_yolo26.txt
  2. deepstream_app_config 파일에서 비디오 소스를 변경할 수도 있습니다. 여기서는 기본 비디오 파일을 불러옵니다.

    ...
    [source0]
    ...
    uri=file:///opt/nvidia/deepstream/deepstream/samples/streams/sample_1080p_h264.mp4

추론 실행#

deepstream-app -c deepstream_app_config.txt
참고

TensorRT 엔진 파일을 생성하는 데 시간이 오래 걸릴 수 있으며, 생성이 완료된 후에야 추론을 시작할 수 있습니다.

YOLO26 object detection running in NVIDIA DeepStream on Jetson
팁

모델을 FP16 정밀도로 변환하려면 config_infer_primary_yolo26.txt 내부에서 model-engine-file=model_b1_gpu0_fp16.engine 및 network-mode=2을 설정합니다.

INT8 보정#

추론에 INT8 정밀도를 사용하려면 다음 단계를 따르세요.

참고

현재 INT8은 TensorRT 10.x에서 작동하지 않습니다. 이 가이드 섹션은 작동이 예상되는 TensorRT 8.x에서 테스트했습니다.

  1. OPENCV 환경 변수를 설정하세요.

    export OPENCV=1
  2. 라이브러리를 컴파일하세요.

    make -C nvdsinfer_custom_impl_Yolo clean && make -C nvdsinfer_custom_impl_Yolo
  3. COCO 데이터셋의 경우 val2017을 다운로드하고 압축을 푼 다음 DeepStream-Yolo 폴더로 이동하세요.

  4. 보정 이미지를 위한 새 디렉터리를 만드세요.

    mkdir calibration
  5. 보정을 실행하기 위해 COCO 데이터셋에서 무작위 이미지 1000개를 선택하려면 다음 명령을 실행하세요.

    for jpg in $(ls -1 val2017/*.jpg | sort -R | head -1000); do
      cp ${jpg} calibration/
    done
참고

NVIDIA는 정확도를 높이기 위해 최소 500개의 이미지를 권장합니다. 이 예제에서는 더 높은 정확도를 얻기 위해 1000개의 이미지를 선택합니다(일반적으로 이미지가 많을수록 정확도가 높아집니다). head -1000으로 값을 설정할 수 있습니다. 예를 들어 이미지가 2000개라면 head -2000으로 설정합니다. 이 과정은 시간이 오래 걸릴 수 있습니다.

  1. 선택한 이미지를 모두 포함하는 calibration.txt 파일을 만드세요.

    realpath calibration/*jpg > calibration.txt
  2. 환경 변수를 설정하세요.

    export INT8_CALIB_IMG_PATH=calibration.txt
    export INT8_CALIB_BATCH_SIZE=1
참고

INT8_CALIB_BATCH_SIZE 값을 높이면 더 정확하고 빠른 보정 결과를 얻을 수 있습니다. GPU 메모리에 맞춰 값을 설정하세요.

  1. config_infer_primary_yolo26.txt 파일을 업데이트하세요.

    변경 전

    ...
    model-engine-file=model_b1_gpu0_fp32.engine
    #int8-calib-file=calib.table
    ...
    network-mode=0
    ...

    변경 후

    ...
    model-engine-file=model_b1_gpu0_int8.engine
    int8-calib-file=calib.table
    ...
    network-mode=1
    ...

INT8 추론 실행#

동일한 명령을 실행하여 INT8 엔진을 빌드하고 추론을 시작하세요.

deepstream-app -c deepstream_app_config.txt

멀티 스트림 설정#



시청: Jetson Orin에서 NVIDIA DeepStream을 사용해 Ultralytics YOLO26으로 멀티 스트림 추론을 실행하는 방법 🚀

하나의 DeepStream 애플리케이션에서 여러 스트림을 설정하려면 deepstream_app_config.txt 파일을 다음과 같이 변경하세요.

  1. 사용할 스트림 수에 맞춰 행과 열을 변경하여 격자 표시를 구성하세요. 예를 들어 스트림 4개를 사용한다면 행 2개와 열 2개를 추가하면 됩니다.

    [tiled-display]
    rows=2
    columns=2
  2. 각 스트림에 별도의 [sourceN] 그룹을 추가하고, 각 그룹에 자체 uri 및 num-sources=1를 지정하세요.

    [source0]
    enable=1
    type=3
    uri=file:///path/to/video1.mp4
    num-sources=1
    
    [source1]
    enable=1
    type=3
    uri=file:///path/to/video2.mp4
    num-sources=1
    
    [source2]
    enable=1
    type=3
    uri=file:///path/to/video3.mp4
    num-sources=1
    
    [source3]
    enable=1
    type=3
    uri=file:///path/to/video4.mp4
    num-sources=1

멀티 스트림 추론 실행#

동일한 명령을 실행하여 타일 형식의 디스플레이에서 모든 스트림을 시작하세요.

deepstream-app -c deepstream_app_config.txt
DeepStream multi-camera streaming configuration

벤치마크 결과#

다음 벤치마크는 NVIDIA Jetson Orin NX 16GB에서 입력 크기 640x640을 사용하고 TensorRT 정밀도 수준을 달리했을 때 YOLO11 모델의 성능을 요약합니다. YOLO26은 위에서 설명한 것과 동일한 DeepStream 내보내기 및 추론 워크플로를 사용합니다.

비교 차트#

NVIDIA Jetson DeepStream performance benchmarks

상세 비교 표#

성능
형식상태추론 시간(ms/이미지)
TensorRT(FP32)✅8.64
TensorRT(FP16)✅5.27
TensorRT(INT8)✅4.54

감사의 말#

이 가이드는 Seeed Studio의 동료인 Lakshantha와 Elaine이 처음 작성했습니다.

자주 묻는 질문#

  • NVIDIA Jetson 장치에서 Ultralytics YOLO26을 설정하려면 먼저 JetPack 버전과 호환되는 DeepStream SDK를 설치해야 합니다. NVIDIA Jetson에서 YOLO26 배포를 구성하려면 빠른 시작 가이드의 단계별 안내를 따르세요.

  • YOLO26에서 TensorRT를 사용하면 추론에 맞게 모델을 최적화하여 NVIDIA Jetson 장치의 지연 시간을 크게 줄이고 처리량을 높일 수 있습니다. TensorRT는 레이어 융합, 정밀도 보정 및 커널 자동 튜닝을 통해 고성능, 저지연 딥러닝 추론을 제공합니다. 이를 통해 실행 속도와 효율성이 향상되며, 비디오 분석 및 자율 주행 기계와 같은 실시간 애플리케이션에 특히 유용합니다.

  • 예. DeepStream SDK와 TensorRT를 사용하여 Ultralytics YOLO26을 배포하는 가이드는 NVIDIA Jetson 전 제품군과 호환됩니다. 여기에는 JetPack 5.1.3을 사용하는 Jetson Orin NX 16GB와 JetPack 4.6.4을 사용하는 Jetson Nano 4GB가 포함됩니다. 자세한 단계는 YOLO26용 DeepStream 구성 섹션을 참조하세요.

  • Ultralytics 내보내기 도구를 사용해 NMS가 없는 헤드로 모델을 내보내고, DeepStream이 클래스 이름을 읽어 올 labels.txt 파일을 작성하세요.

    from ultralytics import YOLO
    
    model = YOLO("yolo26s.pt")
    model.export(format="onnx", nms=False, agnostic_nms=True)  # creates 'yolo26s.onnx'
    with open("labels.txt", "w") as f:
        f.write("\n".join(model.names.values()))

    TensorRT 8.2 이하(DeepStream 6.0.1 이하)의 경우 opset=12을 추가하세요. 모델 변환에 대한 자세한 내용은 모델 내보내기 섹션을 참조하세요.

  • INT8 추론을 실행하려면 대표 이미지 세트로 모델을 보정하고 DeepStream 구성을 INT8 모드로 전환하세요. COCO val2017 이미지를 다운로드하고 보정 이미지 약 1000개를 선택한 다음 INT8_CALIB_IMG_PATH 및 INT8_CALIB_BATCH_SIZE 환경 변수를 설정하세요. 그런 다음 config_infer_primary_yolo26.txt를 model-engine-file=model_b1_gpu0_int8.engine, int8-calib-file=calib.table, network-mode=1로 업데이트하세요. 전체 단계는 INT8 보정 섹션을 참조하세요. 현재 INT8에는 TensorRT 8.x가 필요합니다.

  • 하나의 DeepStream 애플리케이션에서 여러 스트림을 처리하려면 deepstream_app_config.txt 파일을 편집하여 타일 디스플레이 격자를 추가하고 각 소스 URI를 나열하세요. 격자를 구성하려면 [tiled-display] 아래의 rows 및 columns를 설정하고, 각 스트림에 자체 uri 및 num-sources=1이 포함된 별도의 [sourceN] 그룹을 추가한 다음 스트림 수에 맞게 격자를 조정하세요. 전체 예제는 멀티 스트림 설정 섹션을 참조하세요.

  • NVIDIA Jetson Orin NX 16GB에서 YOLO11 모델의 성능은 TensorRT 정밀도 수준에 따라 달라집니다. 예를 들어 YOLO11s 모델의 성능은 다음과 같습니다.

    • FP32 정밀도: 14.53 ms/im, 68.8 FPS
    • FP16 정밀도: 7.91 ms/im, 126 FPS
    • INT8 정밀도: 6.05 ms/im, 165 FPS

    이 결과는 FP16 및 INT8 TensorRT 엔진이 NVIDIA Jetson 하드웨어에서 YOLO11 모델의 속도를 얼마나 높이는지 보여줍니다.

댓글145

질문을 하거나 결과를 공유하거나 다른 사람을 도와주세요.

  1. Llinz24GitHub

    hi!I encountered the following issue when using NVIDIA's official DeepStream 8.0 gc-triton-devel image to implement deepstream-yolo: I cannot compile the library, and it prompts that my Tensor version is too new. Is there any solution? Could it be that the current code hasn't fully adapted to DeepStream 8.0? ( root@LGDX:/workspace/DeepStream-Yolo# export CUDA_VER=12.8 root@LGDX:/workspace/DeepStream-Yolo# make -C nvdsinfer_custom_impl_Yolo clean && make -C nvdsinfer_custom_impl_Yolo make: Entering directory '/workspace/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo' rm -rf libnvdsinfer_custom_impl_Yolo.so rm -rf nvdsinfer_yolo_engine.o nvdsparsebbox_Yolo.o utils.o yolo.o yoloPlugins.o layers/activation_layer.o layers/batchnorm_layer.o layers/channels_layer.o layers/convolutional_layer.o layers/deconvolutional_layer.o layers/implicit_layer.o layers/pooling_layer.o layers/reorg_layer.o layers/route_layer.o layers/sam_layer.o layers/shortcut_layer.o layers/slice_layer.o layers/upsample_layer.o nvdsparsebbox_Yolo_cuda.o yoloForward.o yoloForward_nc.o yoloForward_v2.o make: Leaving directory '/workspace/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo' make: Entering directory '/workspace/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo' g++ -c -o nvdsinfer_yolo_engine.o -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-12.8/include nvdsinfer_yolo_engine.cpp g++ -c -o nvdsparsebbox_Yolo.o -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-12.8/include nvdsparsebbox_Yolo.cpp In file included from nvdsparsebbox_Yolo.cpp:26: nvdsparsebbox_Yolo.cpp: In function 'void checkFunc_NvDsInferParseYolo(NvDsInferParseCustomFunc)': /opt/nvidia/deepstream/deepstream/sources/includes/nvdsinfer_custom_impl.h:221:17: warning: infinite recursion detected [-Winfinite-recursion] 221 | static void checkFunc_ ## customParseFunc (NvDsInferParseCustomFunc func = customParseFunc)
    | ^~~~~~~~~~ nvdsparsebbox_Yolo.cpp:129:1: note: in expansion of macro 'CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE' 129 | CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE(NvDsInferParseYolo); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /opt/nvidia/deepstream/deepstream/sources/includes/nvdsinfer_custom_impl.h:222:41: note: recursive call 222 | { checkFunc_ ## customParseFunc (); };
    | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~ nvdsparsebbox_Yolo.cpp:129:1: note: in expansion of macro 'CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE' 129 | CHECK_CUSTOM_PARSE_FUNC_PROTOTYPE(NvDsInferParseYolo); | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ g++ -c -o utils.o -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-12.8/include utils.cpp g++ -c -o yolo.o -Wall -std=c++11 -shared -fPIC -Wno-error=deprecated-declarations -I/opt/nvidia/deepstream/deepstream/sources/includes -I/usr/local/cuda-12.8/include yolo.cpp In file included from yolo.cpp:29: yoloPlugins.h:53:59: warning: 'IPluginV2DynamicExt' is deprecated [-Wdeprecated-declarations] 53 | nvinfer1::IPluginV2DynamicExt* clone() const noexcept override; | ^~~~~~~~ In file included from /usr/include/x86_64-linux-gnu/NvInfer.h:22, from /usr/include/x86_64-linux-gnu/NvOnnxParser.h:21, from yolo.cpp:26: /usr/include/x86_64-linux-gnu/NvInferRuntime.h:406:22: note: declared here 406 | class TRT_DEPRECATED IPluginV2DynamicExt : public nvinfer1::IPluginV2Ext | ^~~~~~~~~~~~~~~~~~~ yoloPlugins.h:124:9: warning: 'IPluginV2DynamicExt' is deprecated [-Wdeprecated-declarations] 124 | override { | ^~~~~~~~ /usr/include/x86_64-linux-gnu/NvInferRuntime.h:406:22: note: declared here 406 | class TRT_DEPRECATED IPluginV2DynamicExt : public nvinfer1::IPluginV2Ext | ^~~~~~~~~~~~~~~~~~~ yoloPlugins.h:130:18: warning: 'IPluginV2DynamicExt' is deprecated [-Wdeprecated-declarations] 130 | noexcept override { | ^~~~~~~~ /usr/include/x86_64-linux-gnu/NvInferRuntime.h:406:22: note: declared here 406 | class TRT_DEPRECATED IPluginV2DynamicExt : public nvinfer1::IPluginV2Ext | ^~~~~~~~~~~~~~~~~~~ yolo.cpp: In member function 'nvinfer1::ICudaEngine* Yolo::createEngine(nvinfer1::IBuilder*, nvinfer1::IBuilderConfig*)': yolo.cpp:71:76: error: 'kEXPLICIT_BATCH' is not a member of 'nvinfer1::NetworkDefinitionCreationFlag' 71 | tic_cast<uint32_t>(nvinfer1::NetworkDefinitionCreationFlag::kEXPLICIT_BATCH); | ^~~~~~~~~~~~~~~

    In file included from /usr/include/c++/13/cassert:44, from layers/../utils.h:32, from layers/route_layer.h:9, from yolo.h:39, from yolo.cpp:28: yolo.cpp:155:21: error: 'class nvinfer1::IBuilder' has no member named 'platformHasFastFp16' 155 | assert(builder->platformHasFastFp16()); | ^~~~~~~~~~~~~~~~~~~ yolo.cpp:156:44: error: 'kFP16' is not a member of 'nvinfer1::BuilderFlag' 156 | config->setFlag(nvinfer1::BuilderFlag::kFP16); | ^~~~~ yolo.cpp:159:21: error: 'class nvinfer1::IBuilder' has no member named 'platformHasFastInt8' 159 | assert(builder->platformHasFastInt8()); | ^~~~~~~~~~~~~~~~~~~ yolo.cpp:160:44: error: 'kINT8' is not a member of 'nvinfer1::BuilderFlag' 160 | config->setFlag(nvinfer1::BuilderFlag::kINT8); | ^~~~~ yolo.cpp: In member function 'NvDsInferStatus Yolo::buildYoloNetwork(std::vector&, nvinfer1::INetworkDefinition&)': yolo.cpp:481:36: warning: 'IPluginV2DynamicExt' is deprecated [-Wdeprecated-declarations] 481 | nvinfer1::IPluginV2DynamicExt* yoloPlugin = new YoloLayer(m_InputW, m_InputH, m_NumClasses, m_NewCoords, | ^~~~~~~~~~ /usr/include/x86_64-linux-gnu/NvInferRuntime.h:406:22: note: declared here 406 | class TRT_DEPRECATED IPluginV2DynamicExt : public nvinfer1::IPluginV2Ext | ^~~~~~~~~~~~~~~~~~~ yolo.cpp:484:31: warning: 'IPluginV2Layer' is deprecated [-Wdeprecated-declarations] 484 | nvinfer1::IPluginV2Layer* yolo = network.addPluginV2(yoloTensorInputs, m_YoloCount, yoloPlugin); | ^~~~ /usr/include/x86_64-linux-gnu/NvInfer.h:2542:22: note: declared here 2542 | class TRT_DEPRECATED IPluginV2Layer : public ILayer | ^~~~~~~~~~~~~~ yolo.cpp:484:57: warning: 'nvinfer1::IPluginV2Layer nvinfer1::INetworkDefinition::addPluginV2(nvinfer1::ITensor* const*, int32_t, nvinfer1::IPluginV2&)' is deprecated [-Wdeprecated-declarations] 484 | nvinfer1::IPluginV2Layer* yolo = network.addPluginV2(yoloTensorInputs, m_YoloCount, yoloPlugin); | ~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/include/x86_64-linux-gnu/NvInfer.h:8859:36: note: declared here 8859 | TRT_DEPRECATED IPluginV2Layer addPluginV2(ITensor* const* inputs, int32_t nbInputs, IPluginV2& plugin) noexcept | ^~~~~~~~~~~ make: *** [Makefile:86: yolo.o] Error 1 make: Leaving directory '/workspace/DeepStream-Yolo/nvdsinfer_custom_impl_Yolo' root@LGDX:/workspace/DeepStream-Yolo#)

    1. Glenn JocherUltralytics

      Yes, those build errors are from a TensorRT API mismatch, not your commands: the DeepStream-Yolo path used in this doc was tested with the DeepStream/JetPack combinations listed in the Jetson + DeepStream guide, and DeepStream 8.0 gc-triton-devel is using newer TensorRT APIs where symbols like kEXPLICIT_BATCH, kFP16, and platformHasFastFp16() are gone, so it will not compile unchanged; for now please use a supported version combo from the guide or a direct TensorRT export workflow, and if you want to stay on DS 8.0 please share the exact DeepStream-Yolo commit plus your TensorRT version here so we can point out the required upstream patch areas.

    2. Llinz24GitHub

      root@LGDX:/workspace/DeepStream-Yolo# dpkg -l | grep tensorrt ii tensorrt-dev 11.0.0.114-1+cuda13.2 amd64 Meta package for TensorRT development libraries

      If I plan to use yolo11-pose and yolo26, what kind of adjustments do I need?

    3. Glenn JocherUltralytics(수정됨)

      For YOLO11-pose, use DeepStream-Yolo-Pose with config_infer_primary_yolo11_pose.txt; for YOLO26 detection, use the main DeepStream-Yolo repo and export through its updated export_yolo26.py path or export with the nms argument described in the End-to-End Detection guide for the classic DeepStream parser flow. The bigger blocker is your environment: DeepStream 8.0 on x86 is validated with TensorRT 10.9.0.34, while your container has TensorRT 11.0.0, and TRT 11 removed the older builder-flag/calibrator APIs, so those external DeepStream custom libs need a TRT11 migration before they will compile; the quickest path is a TRT 10.9 DeepStream 8.0 stack plus the latest repo files, and the relevant Ultralytics export compatibility notes are in Export Settings.

  2. User

    Why can't I see my class name in the block boxes with multiple RTSP video streams (like in the single-stream example)?

    Is there a way to fix this?

    1. Glenn JocherUltralytics

      Yes—if you’re using deepstream-app in tiled multistream mode, bbox labels are often hidden unless you start it with -t, so try deepstream-app -c deepstream_app_config.txt -t, then confirm [osd] has display-text=1 and increase text-size if the tiles are small; please keep Jetson/DeepStream questions here in Discussions so the team can track them, and the Jetson + DeepStream guide is the right reference alongside NVIDIA’s DeepStream reference app docs. (forums.developer.nvidia.com)

  3. Llinz24GitHub

    Is YOLO26-seg currently supported for direct deployment and execution in DeepStream? Are there any available tutorials or reference solutions?

    1. Glenn JocherUltralytics

      Not in the published direct DeepStream flow yet—the current Jetson + DeepStream guide is detection-focused and uses DeepStream-Yolo, while the available segmentation reference is DeepStream-Yolo-Seg, which currently lists YOLO11-Seg and YOLOv8-Seg support rather than YOLO26-seg, so there isn’t an official YOLO26-seg DeepStream tutorial at the moment; feel free to keep the details here in Discussions and we can help with the closest path forward. (docs.ultralytics.com)

    2. Llinz24GitHub

      I'm running into an issue with YOLO11-seg + DeepStream and could use some help 🙏 So I exported my YOLO11-seg model to ONNX and then to a TensorRT engine. When I run deepstream-app, it does find and load the engine just fine — but the segmentation part just doesn't work. I'm not seeing any masks or even bounding boxes on the video output. Any idea what might be going wrong here? Also, when I use the deepstream-yolo export script to get the ONNX file, the output only shows one node: 1 OUTPUT kFLOAT output 100x102406 But from what I've seen with official YOLO-seg exports (like from Ultralytics), there should usually be two outputs — one for boxes/classes and another for the masks. That mismatch feels like it might be part of the problem? Has anyone run into this before? Any tips on: How to export the ONNX correctly for YOLO-seg (maybe a flag I'm missing?) What to tweak in the DeepStream config (config_infer_primary.txt, parser settings, etc.) to make it actually show the segmentation results? Thanks in advance!

    3. Glenn JocherUltralytics

      Yes, a single-output ONNX is very likely the blocker here: for YOLO11-seg, DeepStream needs the segmentation export with both detection and mask-proto outputs, so a detection-style ONNX/parser will often load the engine but show neither boxes nor masks; please re-export from the Ultralytics side using the workflow in the TensorRT export docs, make sure you are using the segmentation-specific DeepStream parser/config rather than the detection one, and if it still fails please paste the full deepstream-app log plus yolo checks output here so we can verify the tensor names, parser, and engine match.

  4. aneesaromGitHub

    Below is the result from deepstream

    **PERF: FPS 0 (Avg) **PERF: 53.80 (58.72) **PERF: 60.00 (59.38) **PERF: 60.00 (59.59) **PERF: 60.00 (59.69)

    But i can get around 85 fps using ultralytics inference. why is that so. what is the need of using deepstream then. or i am doing anything wrong?

    1. Glenn JocherUltralytics

      Those PERF numbers from deepstream-app are end-to-end pipeline FPS and are often capped by your input stream rate and/or display sync (so a steady ~60 usually means you’re running “real-time/render-limited,” not model-limited), while your Ultralytics run is likely closer to “pure inference throughput”; DeepStream’s value is when you need a full GStreamer pipeline (decode/scale/batching/multi-stream/OSD/encode/RTSP), so for a fair comparison try a headless config (disable OSD/tiler and use fakesink with sync=0) as described in the Ultralytics YOLO26 DeepStream on Jetson guide and make sure you’re matching TensorRT precision/imgsz like in the TensorRT export docs:

      [osd]
      enable=0
      
      [tiled-display]
      enable=0
      
      [sink0]
      type=1
      sync=0

      If you paste your deepstream_app_config.txt [source0] + [sink0] + [primary-gie] sections (and JetPack/DeepStream versions) here, we can point out what’s throttling it.

      1
    2. aneesaromGitHub

      @glenn-jocher Thank you so much for your reply. Now i understood and can see 120 Fps with this setting. But i have a doubt when do we need deepstream over normal ultralytics inferencing. Can you explain it

    3. Glenn JocherUltralytics

      DeepStream is worth using when you need a production GStreamer pipeline around the model—hardware-accelerated decode/encode, zero-copy GPU memory, batching across multiple cameras/streams, RTSP ingest/egress, OSD/tiling, tracking, and easy composition with other DeepStream plugins—whereas “plain” Ultralytics inference is often the simplest/fastest path for single-stream or custom Python loops that just need model outputs; the DeepStream on Jetson guide and the TensorRT export docs are the best references, and feel free to drop your specific target pipeline (sources/sinks/stream count/latency needs) here so we can sanity-check the recommended setup.

  5. SaarulogGitHub

    Hello,

    Thank you for all your help to my issues.

    I have a usb camera with the below format and fails to run. How do I get deepstream to accept or convert the format below to the needed format for display.

    Deepstream 7.1/Jetpack 6.2.1

    deepstream app text file:

    [soruce0] camera- camera-fps-n=9 camera-fps-d=1

    v4l2-ctl -d /dev/video0 --list-formats-ext

    ioctl: VIDIOC_ENUM_FMT Type: Video Capture

    [0]: 'UYVY' (UYVY 4:2:2)
    	Size: Discrete 80x60
    		Interval: Discrete 0.111s (9.000 fps)
    [1]: 'Y16 ' (16-bit Greyscale)
    	Size: Discrete 80x60
    		Interval: Discrete 0.111s (9.000 fps)
    	Size: Discrete 80x63
    		Interval: Discrete 0.111s (9.000 fps)
    [2]: 'GREY' (8-bit Greyscale)
    	Size: Discrete 80x60
    		Interval: Discrete 0.111s (9.000 fps)
    [3]: 'RGBP' (16-bit RGB 5-6-5)
    	Size: Discrete 80x60
    		Interval: Discrete 0.111s (9.000 fps)
    [4]: 'BGR3' (24-bit BGR 8-8-8)
    	Size: Discrete 80x60
    		Interval: Discrete 0.111s (9.000 fps)

    GST_DEBUG=3 deepstream-app -c deepstream_app_config_yolo26_1usbcam.txt

    Setting min object dimensions as 16x16 instead of 1x1 to support VIC compute mode. WARNING: [TRT]: Using an engine plan file across different models of devices is not recommended and is likely to affect performance or even cause errors. 0:00:00.401328266 6238 0xaaaad1ab46c0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::deserializeEngineAndBackend() <nvdsinfer_context_impl.cpp:2092> [UID = 1]: deserialized trt engine from :/home/shamsee/DeepStream-Yolo/model_b1_gpu0_fp32.engine Implicit layer support has been deprecated INFO: [Implicit Engine Info]: layers num: 0

    0:00:00.401518311 6238 0xaaaad1ab46c0 INFO nvinfer gstnvinfer.cpp:684:gst_nvinfer_logger:<primary_gie> NvDsInferContext[UID 1]: Info from NvDsInferContextImpl::generateBackendContext() <nvdsinfer_context_impl.cpp:2195> [UID = 1]: Use deserialized engine model: /home/shamsee/DeepStream-Yolo/model_b1_gpu0_fp32.engine 0:00:00.412604525 6238 0xaaaad1ab46c0 INFO nvinfer gstnvinfer_impl.cpp:343:notifyLoadModelStatus:<primary_gie> [UID 1]: Load new model:/home/shamsee/DeepStream-Yolo/config_infer_primary_yolo26_1usbcam_flir.txt sucessfully 0:00:00.414435142 6238 0xaaaad1cb8920 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<src_elem> error: Internal data stream error. 0:00:00.414475340 6238 0xaaaad1cb8920 WARN basesrc gstbasesrc.c:3127:gst_base_src_loop:<src_elem> error: streaming stopped, reason not-negotiated (-4) 0:00:00.414521843 6238 0xaaaad1ab46c0 WARN v4l2src gstv4l2src.c:794:gst_v4l2src_query:<src_elem> Can't give latency since framerate isn't fixated ! nvstreammux: Successfully handled EOS for source_id=0

    Runtime commands: h: Print this help q: Quit

    p: Pause
    r: Resume

    NOTE: To expand a source in the 2D tiled display and view object details, left-click on the source. To go back to the tiled display, right-click anywhere on the window.

    ** INFO: <bus_callback:291>: Pipeline ready

    ERROR from src_elem: Internal data stream error. Debug info: ../libs/gst/base/gstbasesrc.c(3127): gst_base_src_loop (): /GstPipeline:pipeline/GstBin:multi_src_bin/GstBin:src_sub_bin0/GstV4l2Src:src_elem: streaming stopped, reason not-negotiated (-4) ** INFO: <bus_callback:256>: incorrect camera parameters provided, please provide supported resolution and frame rate

    ** INFO: <bus_callback:277>: Pipeline running

    ** INFO: <bus_callback:334>: Received EOS. Exiting ...

    Quitting 0:00:01.483704521 6238 0xaaaad1ab46c0 ERROR GST_BUS gstbus.c:1075:gst_bus_remove_watch: no bus watch was present App run failed

    1. Glenn JocherUltralytics

      That not-negotiated (-4) is coming from v4l2src not being able to match the caps DeepStream requested (your snippet also has a typo: it must be [source0], and you need type, camera-width, and camera-height set explicitly); please try a minimal V4L2 source config like this (and set [streammux] live-source=1 for a USB cam), per the DeepStream deepstream-app source-group keys in the NVIDIA reference app docs and our YOLO26 DeepStream Jetson guide:

      [source0]
      enable=1
      type=1
      camera-v4l2-dev-node=0
      camera-width=80
      camera-height=60
      camera-fps-n=9
      camera-fps-d=1
      video-format=NV12

      If it still fails, first confirm GStreamer can negotiate your camera at 80x60@9 in UYVY (then we can mirror that into DeepStream), and paste your full [source0] + [streammux] blocks here in this discussion along with the complete text log (not a screenshot).

  6. SaarulogGitHub(수정됨)

    Hello I finally got everything else working but stuck in terms of wanting to extract deepstream metadata(inference results-frame, trackerID, detection class, bounding box and etc) and to allow my crewai agents to access for further processing/instructions.  I Don't know where to start or what to create(config files or edit files), properties needed or mapping it within the deepstream_app_config.txt/config_infer_primary_yolo26 besides the custom crewai tool(python) to retrieve the needed metadata. I don't want to use cloud storage but locally to jetson orin nano. Any suggestion, direction PLEASE would be GREATLY appreciated. Thanks again for your help and time. SA

    1. Glenn JocherUltralytics

      DeepStream already attaches detections/tracks as NvDsBatchMeta (frame + NvDsObjectMeta with class_id, bbox, and object_id once nvtracker is enabled), but deepstream-app isn’t really meant to be “extended” from Python—if you want to feed results into CrewAI locally on the Orin, the usual path is to build a small custom DeepStream app using the NVIDIA DeepStream Python sample apps and add a pad-probe on the nvinfer/nvtracker src pad to serialize metadata (e.g., JSON) and hand it directly to your agents.

      # inside a pad-probe callback
      import pyds
      
      batch_meta = pyds.gst_buffer_get_nvds_batch_meta(hash(gst_buffer))
      l_frame = batch_meta.frame_meta_list
      while l_frame:
          frame_meta = pyds.NvDsFrameMeta.cast(l_frame.data)
          l_obj = frame_meta.obj_meta_list
          while l_obj:
              obj = pyds.NvDsObjectMeta.cast(l_obj.data)
              tid = int(obj.object_id)          # tracker ID (requires nvtracker)
              cid = int(obj.class_id)           # class
              r = obj.rect_params               # bbox (left, top, width, height)
              conf = float(obj.confidence)
              # -> push to your local queue / file / socket for CrewAI
              l_obj = l_obj.next
          l_frame = l_frame.next

      If you reply with your JetPack/DeepStream versions and whether you’re currently running the stock deepstream-app config or a custom GStreamer pipeline, I can point you to the closest matching sample to start from.

    2. SaarulogGitHub(수정됨)

      Thanks Glen. I am using Jetpack 6.2.1 and DeepStream 7.1. Deepstream-Yolo(deepstream_app_config.txt). How would the "deepstream_app_config.txt/config_infer_primary_yolo26" be mapped or linked to the deepstream python example you provided above?

    3. Glenn JocherUltralytics

      deepstream_app_config.txt is parsed only by deepstream-app; the Python samples don’t “map” it automatically, so in Python you recreate the pipeline in code and simply reuse the same nvinfer config by pointing nvinfer at your existing config_infer_primary_yolo26.txt (which can keep all your DeepStream-Yolo settings like custom parser lib paths) as shown in the DeepStream on Jetson guide and the upstream DeepStream-Yolo project.

      # after you create the elements in your Python pipeline
      pgie = Gst.ElementFactory.make("nvinfer", "primary-gie")
      pgie.set_property("config-file-path", "config_infer_primary_yolo26.txt")
      
      tracker = Gst.ElementFactory.make("nvtracker", "tracker")
      # set tracker properties from your tracker config the same way (or load them via configparser)
  7. AfaqKarimGitHub(수정됨)

    Title: Guidance Needed: Where to Modify Code to Add Custom Violation Logic and Modbus Output in DeepStream-YOLO Pipeline

    Hello DeepStream-YOLO Team,

    First of all, thank you for the excellent DeepStream-YOLO integration repository. I was able to successfully deploy a YOLO26 model using DeepStream on a Jetson Orin Nano (JetPack 6.1), and inference is working correctly using deepstream-app with config_infer_primary_yolo26.txt.


    My Use Case

    I am building an industrial safety system. After YOLO detection, if there is violation i have to send 0 or 1 through modbus to the plc: .

    So I need to integrate custom logic after detection results.


    My Question

    In this DeepStream-YOLO setup, in which file or location should I add my custom logic?

    Specifically, I want to know:

    • Should I modify:

      • nvdsparsebbox_Yolo.cpp inside nvdsinfer_custom_impl_Yolo?
      • Or write a custom DeepStream app (like deepstream-test1 / deepstream-test3)?
      • Or add a probe function after nvinfer in the pipeline?

    Because I understand that:

    • Parsing .so is only for decoding bounding boxes,
    • But my requirement is to process detections and send a Modbus signal continuously.

    So I want guidance on the recommended DeepStream architecture for this.


    My Current Setup
    • Jetson Orin Nano – JetPack 6.1
    • DeepStream-YOLO repo working
    • YOLO26 model inference OK
    • Using deepstream-app -c deepstream_app_config.txt

    Goal

    After detection → evaluate violation → send Modbus 0/1 signal in real-time.

    I would really appreciate guidance on:

    • Best file/place to implement this logic,
    • Any example for accessing detection metadata in DeepStream-YOLO.

    Thank you again for your great work 🙏

    1. Glenn JocherUltralytics

      You generally shouldn’t put violation/Modbus logic inside nvdsparsebbox_Yolo.cpp (keep the custom parser .so focused on decoding tensors → boxes); the recommended DeepStream architecture is to write a small custom DeepStream app (C/C++ or Python) and attach a pad-probe after nvinfer (or after nvtracker if you want stable IDs) to read NvDsObjectMeta and then publish your Modbus 0/1 in a non-blocking way (e.g., queue + worker thread), while still following the config/export flow in our Jetson DeepStream + TensorRT guide and the marcoslucianops/DeepStream-Yolo repository.

      // Probe callback (attach to a pad after nvinfer/nvtracker, e.g. OSD sink pad)
      static GstPadProbeReturn probe_cb(GstPad* pad, GstPadProbeInfo* info, gpointer user_data) {
        GstBuffer* buf = (GstBuffer*)info->data;
        NvDsBatchMeta* batch = gst_buffer_get_nvds_batch_meta(buf);
        for (NvDsMetaList* lf = batch->frame_meta_list; lf; lf = lf->next) {
          NvDsFrameMeta* f = (NvDsFrameMeta*)lf->data;
          for (NvDsMetaList* lo = f->obj_meta_list; lo; lo = lo->next) {
            NvDsObjectMeta* o = (NvDsObjectMeta*)lo->data;
            // o->class_id, o->confidence, o->rect_params; compute “violation” then enqueue Modbus 0/1
          }
        }
        return GST_PAD_PROBE_OK;
      }

      If you share whether you need “violation” per-frame or latched with hysteresis (and whether you’re using nvtracker), reply here and we can suggest the cleanest probe point and metadata fields to use.

    2. AfaqKarimGitHub

      Hi @glenn-jocher — thanks, that makes sense.

      My requirements:

      Input: RTSP (H.264) on Jetson Orin Nano (JP 6.1 / DS 7.1)

      Throughput: ~25 FPS

      Tracking: Not using nvtracker (I only need a global safety signal, not per-person IDs)

      Decision: Per-frame violation, but I’m open to latching / hysteresis if that’s the recommended way to avoid flicker.

      Output: Modbus TCP to PLC; I need to continuously send 0/1 (currently planning to write a coil bit), e.g. modbus_write_bit(coil_addr, value) at ~25Hz (or “send on change” if better).

      Violation rule (current):

      I define a polygon zone (danger/no-go area).

      Violation = 1 if a detected person bbox is fully inside the polygon (all 4 corners inside).

      Violation = 0 otherwise.

      Questions to confirm best architecture:

      Probe location: since I’m not using tracker, is the best place a pad-probe on nvinfer src pad (or OSD sink pad)?

      Metadata fields: I’m reading from NvDsObjectMeta → class_id, confidence, rect_params (left/top/width/height). Is that the correct/standard way?

      Best practice for Modbus: should I publish every frame (25Hz), or only on state change with a small debounce/hysteresis window (e.g., require N consecutive frames to assert violation)?

      If you can point to the cleanest DeepStream sample to start from (e.g., deepstream-test3 or deepstream-app custom plugin approach) and the recommended probe pad in that pipeline, I’ll follow that pattern.

      Thanks again 🙏

  8. SaarulogGitHub

    Hello, Deepstream Clarity question please.

    I notice the Nvidia Deepstream_python_app sample application use python file and one or more configuration text files. While Ultralytics Deepstream_Yolo uses two configuration text files.

    1. Could you please explain why Deepstream_Yolo is different?

    2. This command for Yolo26 "python3 export_yolo26.py -w yolo26s.pt" does not seem to generate a working .onnx model file but works with previous Yolo models(Ex. Yolo11). What are my options to get this to work?

    Thank you for your help and time.

    1. Glenn JocherUltralytics(수정됨)

      DeepStream-Yolo isn’t fundamentally “different” from deepstream_python_apps—it just splits configuration the way deepstream-app expects: deepstream_app_config.txt describes the full pipeline/sources/sinks, while config_infer_primary_yolo26.txt is the nvinfer (GIE) config that points to the ONNX/engine and the custom YOLO parser library; the Python sample builds more of the pipeline in code so you’ll see fewer/different config files even though the same DeepStream components are in play (see the DeepStream on Jetson + Ultralytics YOLO26 guide).

      For the YOLO26 ONNX export, it almost always comes down to a JetPack/DeepStream compatibility mismatch with --dynamic/--opset (DeepStream 6.0.1 and earlier need opset=12, while newer DeepStream uses the exports shown in the guide), so please paste the full terminal output from the export command (text, not a screenshot) and your yolo checks output so we can see your exact JetPack/DeepStream/Python/Ultralytics versions (also double-check you followed the Jetson setup in the Jetson quickstart).

    2. SaarulogGitHub

      Hello. Thank you for the quick response. below is the terminal output.

      Starting: yolo26s.pt Opening YOLO26 model YOLO26s summary (fused): 122 layers, 9,496,140 parameters, 0 gradients, 20.7 GFLOPs Creating labels.txt file Exporting the model to ONNX W0205 20:50:46.390000 684277 torch/onnx/_internal/exporter/_compat.py:125] Setting ONNX exporter to use operator set version 18 because the requested opset_version 17 is a lower version than we have implementations for. Automatic version conversion will be performed, which may not be successful at converting to the requested version. If version conversion is unsuccessful, the opset version of the exported model will be kept at 18. Please consider setting opset_version >=18 to leverage latest ONNX features W0205 20:50:48.526000 684277 torch/onnx/_internal/exporter/_schemas.py:455] Missing annotation for parameter 'input' from (input, boxes, output_size: 'Sequence[int]', spatial_scale: 'float' = 1.0, sampling_ratio: 'int' = -1, aligned: 'bool' = False). Treating as an Input. W0205 20:50:48.527000 684277 torch/onnx/_internal/exporter/_schemas.py:455] Missing annotation for parameter 'boxes' from (input, boxes, output_size: 'Sequence[int]', spatial_scale: 'float' = 1.0, sampling_ratio: 'int' = -1, aligned: 'bool' = False). Treating as an Input. W0205 20:50:48.528000 684277 torch/onnx/_internal/exporter/_schemas.py:455] Missing annotation for parameter 'input' from (input, boxes, output_size: 'Sequence[int]', spatial_scale: 'float' = 1.0). Treating as an Input. W0205 20:50:48.528000 684277 torch/onnx/_internal/exporter/_schemas.py:455] Missing annotation for parameter 'boxes' from (input, boxes, output_size: 'Sequence[int]', spatial_scale: 'float' = 1.0). Treating as an Input. The model version conversion is not supported by the onnxscript version converter and fallback is enabled. The model will be converted using the onnx C API (target version: 17). Failed to convert the model to the target version 17 using the ONNX C API. The model was not modified Traceback (most recent call last): File "/home/shamsee/Shamsee/lib/python3.10/site-packages/onnxscript/version_converter/init.py", line 127, in call converted_proto = _c_api_utils.call_onnx_api( File "/home/shamsee/Shamsee/lib/python3.10/site-packages/onnxscript/version_converter/_c_api_utils.py", line 65, in call_onnx_api result = func(proto) File "/home/shamsee/Shamsee/lib/python3.10/site-packages/onnxscript/version_converter/init.py", line 122, in _partial_convert_version return onnx.version_converter.convert_version( File "/home/shamsee/Shamsee/lib/python3.10/site-packages/onnx/version_converter.py", line 39, in convert_version converted_model_str = C.convert_version(model_str, target_version) RuntimeError: /github/workspace/onnx/version_converter/BaseConverter.h:65: adapter_lookup: Assertion false failed: No Adapter To Version $17 for Resize Done: yolo26s.onnx

    3. Glenn JocherUltralytics(수정됨)

      That log shows PyTorch is actually exporting at opset 18 and then failing to down-convert to opset 17 (No Adapter To Version 17 for Resize), so the fix is to export with an opset that matches what the exporter is using (>=18) instead of forcing 17:

      python3 export_yolo26.py -w yolo26s.pt --opset 18

      If you’re on an older DeepStream/TensorRT stack that truly requires lower opset (e.g. DeepStream 6.0.1), you’ll need the DeepStream 6.0.1 and earlier setting from the guide (opset=12) and typically an older PyTorch ONNX exporter that can produce opset 12 cleanly; please paste your yolo checks output and the exact DeepStream nvinfer ONNX parsing error so we can align this to your JetPack/DeepStream version (see the DeepStream on Jetson + Ultralytics YOLO26 guide and the Jetson quickstart).

    4. SaarulogGitHub(수정됨)

      smh, User Error. :-) I forgot about the steps at https://docs.ultralytics.com/guides/nvidia-jetson/ . It works after following steps!!!

      One last issue for Segmentation ONNX conversion. Hopefully this is another user error. python3 export_yolo26.py -w yolo26s-seg.pt

      I got these error:

      Starting: yolo26s-seg.pt Opening YOLO26 model YOLO26s-seg summary (fused): 139 layers, 10,396,300 parameters, 0 gradients, 34.2 GFLOPs Creating labels.txt file Exporting the model to ONNX Traceback (most recent call last): File "/home/shamsee/ultralytics/export_yolo26.py", line 157, in main(args) File "/home/shamsee/ultralytics/export_yolo26.py", line 116, in main torch.onnx.export( File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/onnx/utils.py", line 549, in export _export( File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/onnx/utils.py", line 1641, in _export graph, params_dict, torch_out = _model_to_graph( File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/onnx/utils.py", line 1184, in _model_to_graph graph, params, torch_out, module = _create_jit_graph(model, args) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/onnx/utils.py", line 1060, in _create_jit_graph graph, torch_out = _trace_and_get_graph_from_model(model, args) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/onnx/utils.py", line 964, in _trace_and_get_graph_from_model trace_graph, torch_out, inputs_states = torch.jit._get_trace_graph( File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/jit/_trace.py", line 1502, in _get_trace_graph outs = ONNXTracedModule( File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1714, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1725, in _call_impl return forward_call(*args, **kwargs) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/jit/_trace.py", line 141, in forward graph, out = torch._C._create_graph_by_tracing( File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/jit/_trace.py", line 132, in wrapper outs.append(self.inner(*trace_inputs)) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1714, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1725, in _call_impl return forward_call(*args, **kwargs) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1704, in _slow_forward result = self.forward(*input, **kwargs) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/container.py", line 249, in forward input = module(input) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1714, in _wrapped_call_impl return self._call_impl(*args, **kwargs) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1725, in _call_impl return forward_call(*args, **kwargs) File "/home/shamsee/Sentinel_yolo26/Sentinel_proj/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1704, in _slow_forward result = self.forward(*input, **kwargs) File "/home/shamsee/ultralytics/export_yolo26.py", line 34, in forward x = x.transpose(1, 2) AttributeError: 'tuple' object has no attribute 'transpose'

      Thanks for your help and time.

    5. Glenn JocherUltralytics

      That traceback is expected with yolo26*-seg: the export_yolo26.py you’re using (from DeepStream-Yolo) is built around detection-only outputs, while segmentation models return multiple outputs (so you end up with a tuple and hit the transpose failure); for DeepStream segmentation please use the dedicated DeepStream-Yolo-Seg project (its supported-model list currently covers YOLO11/YOLOv8 seg), and if you specifically need YOLO26-Seg in DeepStream please open a report in DeepStream-Yolo-Seg Issues with your JetPack/DeepStream versions plus yolo checks so it’s trackable.

  9. lovechang1986GitHub

    I'm working on integrating SAHI with YOLOv11 and deploying it on a Jetson device using DeepStream. The original image size is 14401080, and I plan to split it into 640640 sub-images with overlaps between different sub-images. Are there any good methods for this?

    Additionally, I still hope to use DeepSort for inference and tracking after obtaining the final image.

    1. Glenn JocherUltralytics

      SAHI-style slicing isn’t something DeepStream handles automatically, so you’ll either need to slice frames before they enter the DeepStream pipeline (then offset + merge all tile detections back into full-frame coordinates before tracking), or implement ROI/tiling as a DeepStream preprocess step (e.g., via nvdspreprocess or a small custom plugin) so the primary GIE sees a batched set of crops; on Jetson it’s often simpler/faster to avoid slicing and instead run a single-pass TensorRT engine at a larger imgsz if latency allows (and YOLO26 is the recommended starting point for new deployments). If you plan to track inside DeepStream, put the tracker after you’ve merged detections to full-frame coordinates; DeepStream’s built-in nvtracker works out of the box, while DeepSORT specifically typically requires custom integration rather than a drop-in switch. If you paste your JetPack/DeepStream versions and your current deepstream_app_config.txt into this discussion, we can suggest the cleanest path based on the exact pipeline; the baseline export + DeepStream wiring is in the Jetson DeepStream guide and Jetson quickstart.