Can't run object detection

I am trying to run object detection using the c++ sample code. When I try to run it, the application crashes in nvonnxparser.dll.

Looking around, I found some evidence that it may be related to running ZED Depth Viewer.exe in neural mode; this crashes without giving an error. I tried manually optimizing the AI models using ZED Diagnostics.exe, but this crashes as well.

I have tried reinstalling the ZED SDK, trying different versions of it, and reinstalling CUDA, all of which have made no difference.

Here is my output from ZED Diagnostics:

{
    "AI Models": {
        "info": [
            "MULTI CLASS DETECTION is not optimized",
            "MULTI CLASS MEDIUM DETECTION is not optimized",
            "MULTI CLASS ACCURATE DETECTION is not optimized",
            "HUMAN BODY FAST DETECTION is not optimized",
            "HUMAN BODY MEDIUM DETECTION is not optimized",
            "HUMAN BODY ACCURATE DETECTION is not optimized",
            "HUMAN BODY 38 FAST DETECTION is not optimized",
            "HUMAN BODY 38 MEDIUM DETECTION is not optimized",
            "HUMAN BODY 38 ACCURATE DETECTION is not optimized",
            "HUMAN BODY 70 FAST DETECTION is not optimized",
            "HUMAN BODY 70 MEDIUM DETECTION is not optimized",
            "HUMAN BODY 70 ACCURATE DETECTION is not optimized",
            "PERSON HEAD DETECTION is not optimized",
            "PERSON HEAD ACCURATE DETECTION is not optimized",
            "REID ASSOCIATION is not optimized",
            "NEURAL DEPTH is not optimized"
        ]
    },
    "Camera Test": {
        "InternalDevicesCount": 2,
        "ZEDCount": 1,
        "camera": {
            "Device ID": 1,
            "Firmware": 1523,
            "Init Output": "OK",
            "Model": "ZED 2i",
            "Serial Number": 34988684,
            "valid": [
                "<b>Camera: </b>ZED 2i",
                "<b>Firmware: </b>1523"
            ]
        },
        "resolutions": {
            "HD1080@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 1080,
                "height (output)": 1080,
                "initialization": "OK",
                "status": true,
                "width (input)": 1920,
                "width (output)": 1920
            },
            "HD1080@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 1080,
                "height (output)": 1080,
                "initialization": "OK",
                "status": true,
                "width (input)": 1920,
                "width (output)": 1920
            },
            "HD2K@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 1242,
                "height (output)": 1242,
                "initialization": "OK",
                "status": true,
                "width (input)": 2208,
                "width (output)": 2208
            },
            "HD720@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 720,
                "height (output)": 720,
                "initialization": "OK",
                "status": true,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "HD720@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 720,
                "height (output)": 720,
                "initialization": "OK",
                "status": true,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "HD720@60": {
                "dropCount": 0,
                "fps (input)": 60,
                "fps (output)": 60,
                "height (input)": 720,
                "height (output)": 720,
                "imageCount": 501,
                "initialization": "OK",
                "status": true,
                "tearingCount": 0,
                "width (input)": 1280,
                "width (output)": 1280
            },
            "VGA@100": {
                "fps (input)": 100,
                "fps (output)": 97,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@15": {
                "fps (input)": 15,
                "fps (output)": 15,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@30": {
                "fps (input)": 30,
                "fps (output)": 30,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            },
            "VGA@60": {
                "fps (input)": 60,
                "fps (output)": 48,
                "height (input)": 376,
                "height (output)": 376,
                "initialization": "OK",
                "status": true,
                "width (input)": 672,
                "width (output)": 672
            }
        },
        "sensors": {
            "Firmware": 777,
            "Init Output": "OK",
            "Model": "ZED 2i (MCU)",
            "Serial Number": 34988684
        }
    },
    "Devices": {
        "ASMediaFound": false,
        "CorruptedFirmware": false,
        "MCUDetected": true,
        "OC_Cam_Detected": false,
        "OtherUSBDevices": [
            {
                "USBMode": 3,
                "USB_path": "/5/3",
                "bDescriptorType": 1,
                "bDeviceProtocol": 0,
                "bLength": 18,
                "bMaxPacketSize0": 9,
                "bNumConfigurations": 2,
                "bcdDevice": "49.0",
                "bcdUSB": "3.0",
                "bcdUSBClass": 0,
                "bcdUSBSubClass": 0,
                "busNumber": 2,
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 6,
                "idProduct": 33107,
                "idVendor": 3034
            }
        ],
        "USBList": [
            {
                "USB_path": "/1/4",
                "idProduct": "0x0608",
                "idVendor": "0x05e3"
            },
            {
                "USB_path": "/1/4/2/2",
                "idProduct": "0x5411",
                "idVendor": "0x0bda"
            },
            {
                "USB_path": "/2",
                "idProduct": "0x2514",
                "idVendor": "0x0424"
            },
            {
                "USB_path": "/1/4/1",
                "idProduct": "0x5029",
                "idVendor": "0x18d1"
            },
            {
                "USB_path": "/1/4/2/1",
                "idProduct": "0xc339",
                "idVendor": "0x046d"
            },
            {
                "USB_path": "/5/3",
                "idProduct": "0x8153",
                "idVendor": "0x0bda"
            },
            {
                "USB_path": "/1",
                "idProduct": "0x5918",
                "idVendor": "0x062a"
            },
            {
                "USB_path": "/1/4/2/2/3",
                "idProduct": "0xc53a",
                "idVendor": "0x046d"
            },
            {
                "USB_path": "/1/4/2/4",
                "idProduct": "0x0aba",
                "idVendor": "0x046d"
            },
            {
                "USB_path": "/1/4/2/2/5",
                "idProduct": "0x1100",
                "idVendor": "0x0bda"
            },
            {
                "USB_path": "/3",
                "idProduct": "0x1866",
                "idVendor": "0x0b05"
            },
            {
                "USBMode": 3,
                "USB_path": "/6",
                "bDescriptorType": 1,
                "bDeviceProtocol": 1,
                "bLength": 18,
                "bMaxPacketSize0": 9,
                "bNumConfigurations": 1,
                "bcdDevice": "1.0",
                "bcdUSB": "3.0",
                "bcdUSBClass": 239,
                "bcdUSBSubClass": 2,
                "busNumber": 2,
                "device": "ZED2i",
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 4,
                "idProduct": "0xf880",
                "idVendor": "0x2b03"
            },
            {
                "USB_path": "/1/4/2/2/3",
                "idProduct": "0xc53a",
                "idVendor": "0x046d"
            },
            {
                "USB_path": "/1/5",
                "idProduct": "0x8347",
                "idVendor": "0x291a"
            },
            {
                "USB_path": "/4",
                "idProduct": "0x3563",
                "idVendor": "0x13d3"
            },
            {
                "USB_path": "/1/4/2/2/1",
                "idProduct": "0x482f",
                "idVendor": "0x17ef"
            },
            {
                "USBMode": 2,
                "USB_path": "/2/2",
                "bDescriptorType": 1,
                "bDeviceProtocol": 0,
                "bLength": 18,
                "bMaxPacketSize0": 64,
                "bNumConfigurations": 1,
                "bcdDevice": "3.9",
                "bcdUSB": "2.0",
                "bcdUSBClass": 0,
                "bcdUSBSubClass": 0,
                "busNumber": 2,
                "device": "ZED2i MCU",
                "iManufacturer": 1,
                "iProduct": 2,
                "iSerial": 3,
                "idProduct": "0xf881",
                "idVendor": "0x2b03"
            },
            {
                "USB_path": "/1/4/2",
                "idProduct": "0x2817",
                "idVendor": "0x2109"
            },
            {
                "USB_path": "/1/4/2/2/5",
                "idProduct": "0x1100",
                "idVendor": "0x0bda"
            },
            {
                "USB_path": "/1/4/2/2/1",
                "idProduct": "0x482f",
                "idVendor": "0x17ef"
            },
            {
                "USB_path": "/1/4/2/2/3",
                "idProduct": "0xc53a",
                "idVendor": "0x046d"
            },
            {
                "USB_path": "/1",
                "idProduct": "0x2817",
                "idVendor": "0x2109"
            },
            {
                "USB_path": "/5",
                "idProduct": "0x0817",
                "idVendor": "0x2109"
            }
        ],
        "USBMode": 3,
        "ZED Camera Module Detected": 63616,
        "ZED MCU Module Detected": 63617,
        "ZEDDetected": true,
        "captureDevices": [
            {
                "CompatibleIDs": "UMB\\http://schemas.microsoft.com/windows/2006/08/wdp/scan/ScannerServiceType",
                "Description": "WSD Scan Device",
                "DeviceName": "Xerox 4141",
                "Driver": "{6bdd1fc6-810f-11d0-bec7-08002be2092f}\\0002",
                "Location": "http://192.168.10.20/ws/",
                "Manufacturer": "Xerox",
                "Name": "SWD",
                "PhysicalName": ""
            }
        ],
        "controllers": [
            {
                "CompatibleIDs": "PCI\\VEN_1022&DEV_1639&REV_00",
                "Description": "USB xHCI Compliant Host Controller",
                "DeviceName": "AMD USB 3.10 eXtensible Host Controller - 1.10 (Microsoft)",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0000",
                "Location": "PCI bus 6, device 0, function 3",
                "Manufacturer": "Generic USB xHCI Host Controller",
                "Name": "PCI",
                "PhysicalName": "\\Device\\NTPNP_PCI0027"
            },
            {
                "CompatibleIDs": "USB\\USB20_HUB",
                "Description": "Generic USB Hub",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0026",
                "Location": "Port_#0004.Hub_#0005",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": "\\Device\\USBPDO-12"
            },
            {
                "CompatibleIDs": "USB\\USB20_HUB",
                "Description": "Generic USB Hub",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0011",
                "Location": "Port_#0002.Hub_#0007",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": "\\Device\\USBPDO-16"
            },
            {
                "CompatibleIDs": "USB\\USB20_HUB",
                "Description": "Generic USB Hub",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0025",
                "Location": "Port_#0002.Hub_#0001",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": "\\Device\\USBPDO-21"
            },
            {
                "CompatibleIDs": "USB\\USB20_HUB",
                "Description": "Generic USB Hub",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0006",
                "Location": "Port_#0001.Hub_#0001",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": ""
            },
            {
                "CompatibleIDs": "USB\\USB30_HUB",
                "Description": "Generic SuperSpeed USB Hub",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0005",
                "Location": "Port_#0005.Hub_#0001",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": ""
            },
            {
                "CompatibleIDs": "",
                "Description": "USB Root Hub (USB 3.0)",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0003",
                "Location": "",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": "\\Device\\USBPDO-0"
            },
            {
                "CompatibleIDs": "USB\\USB20_HUB",
                "Description": "Generic USB Hub",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0028",
                "Location": "Port_#0002.Hub_#0006",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": "\\Device\\USBPDO-14"
            },
            {
                "CompatibleIDs": "USB\\USB20_HUB",
                "Description": "Generic USB Hub",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0022",
                "Location": "Port_#0001.Hub_#0001",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": "\\Device\\USBPDO-8"
            },
            {
                "CompatibleIDs": "USB\\USB30_HUB",
                "Description": "Generic SuperSpeed USB Hub",
                "DeviceName": "",
                "Driver": "{36fc9e60-c465-11cf-8056-444553540000}\\0021",
                "Location": "Port_#0005.Hub_#0001",
                "Manufacturer": "(Standard USB HUBs)",
                "Name": "USB",
                "PhysicalName": "\\Device\\USBPDO-3"
            }
        ],
        "valid": [
            "<b>USB Bandwidth: </b> OK"
        ]
    },
    "Graphics Card": {
        "deviceCount": 1,
        "deviceDriverVersion": 12020,
        "devices": [
            {
                "arch": "Ampere",
                "computeCapability": "8.6",
                "cores": 3840,
                "name": "NVIDIA GeForce RTX 3060 Laptop GPU",
                "totalMemoryBytes": "6441926656",
                "totalMemoryMB": 6143.5
            }
        ],
        "initResult": 0,
        "valid": [
            "<b>Graphics card: </b> NVIDIA GeForce RTX 3060 Laptop GPU"
        ]
    },
    "Processor": {
        "OS": "Windows 10 FallCreators",
        "avxSupported": true,
        "coreCount": "8",
        "cpu": "AMD Ryzen 9 5900HX with Radeon Graphics        ",
        "datetime": "2023-08-28 17:32:25",
        "hyperThreading": "1",
        "motherboard": "G713QM, ASUSTeK COMPUTER INC.",
        "ramCapacity": "31.4222",
        "ramUsage": "0",
        "ramUsed": "11.1359",
        "threadCount": "16",
        "valid": [
            "<b>Processor: </b> AMD Ryzen 9 5900HX with Radeon Graphics        ",
            "<b>Motherboard: </b> G713QM, ASUSTeK COMPUTER INC."
        ]
    },
    "ZED SDK": {
        "CUDA Toolkit version": "V12.1.66 -->located in C:/Program Files/NVIDIA GPU Computing Toolkit/CUDA/v12.1/bin/nvcc.exe",
        "CUDA loading": false,
        "ZED SDK Version (Diag)": "4.0.4",
        "ZED SDK Version (RT)": "4.0.4",
        "ai": {
            "checkAI": true,
            "cudaVersion": 12010,
            "cudnnCudartVersion": 12020,
            "cudnnVersion": 8904,
            "cudnnVersionExpected": 8801,
            "tensorVersion": 8003
        },
        "binFiles": [
            "cudnn64_8.dll",
            "cudnn_adv_infer64_8.dll",
            "cudnn_adv_train64_8.dll",
            "cudnn_cnn_infer64_8.dll",
            "cudnn_cnn_train64_8.dll",
            "cudnn_ops_infer64_8.dll",
            "cudnn_ops_train64_8.dll",
            "nvinfer.dll",
            "nvinfer_builder_resource.dll",
            "nvinfer_dispatch.dll",
            "nvinfer_lean.dll",
            "nvinfer_plugin.dll",
            "nvinfer_vc_plugin.dll",
            "nvonnxparser.dll",
            "nvparsers.dll",
            "sl_ai64.dll",
            "sl_zed64.dll",
            "zlibwapi.dll"
        ],
        "driverVersion": "536.67",
        "drivervDllVersion": "31.0.15.3667",
        "resourcesFiles": [
            "neural_depth_2.0.model",
            "objects_accurate_3.2.model",
            "objects_performance_3.2.model"
        ],
        "resourcesFilesExpected": [
            "objects_performance_3.2"
        ],
        "runtimeDllVersion": 12010,
        "valid": [
            "<b>ZED SDK version:</b> 4.0.4",
            "<b>CUDA version:</b> V12.1.66"
        ]
    }
}

Hi @gwburger
Welcome to the Stereolabs community.

Please try to upgrade the ZED SDK to the latest version v4.0.6.

I have tried it on 4.0.6, I see the same issues as 4.0.4

Please try to follow this guide to clean the AI models and manually optimize them and let me know if this fixes your problem: