How can I optimize the ZED SDK AI models manually?

The ZED SDK provides AI models for depth estimation (NEURAL depth mode), Object Detection and Tracking, and Human Skeleton Detection and Tracking.

The AI models are not included in the installer of the ZED SDK because of their size, but they can be downloaded from our servers during the installation and optimized for the model of the GPU available on the host PC.

If you decide not to download and optimize the AI models during the installation of the ZED SDK, the process is performed automatically by the ZED SDK the first time that the required AI model is used.

There are situations where the AI models must be cleaned and optimized manually:

  • the GPU of the host device has been changed.
  • the download process failed for unwanted reasons (e.g. power leakage, internet connection drop, etc).
  • the optimization process stopped for unwanted reasons.
  • wrong behaviors of the ZED SDK processing (e.g. wrong depth map in NEURAL depth mode, wrong object detections, wrong skeleton detection, etc).

Clean AI models

Open a shell console

  • Linux command (the current folder is not relevant):
     $ ZED_Diagnostic -aic 
  • Windows commands:
      > cd "C:/Program Files (x86)/ZED SDK/tools/"
    > ./"ZED Diagnostic.exe" -aic

Download and optimize the NEURAL depth model

Open a shell console

  • Linux command (the current folder is not relevant):
     $ ZED_Diagnostic -nrlo 
  • Windows commands:
      > cd "C:/Program Files (x86)/ZED SDK/tools/"
    > ./"ZED Diagnostic.exe" -nrlo

Download and optimize the NEURAL PLUS depth model

Open a shell console

  • Linux command (the current folder is not relevant):
     $ ZED_Diagnostic -nrlo_plus
  • Windows commands:
      > cd "C:/Program Files (x86)/ZED SDK/tools/"
    > ./"ZED Diagnostic.exe" -nrlo_plus

Download and optimize one AI model

Open a shell console

  • Linux command (the current folder is not relevant):
     $ ZED_Diagnostic -ais X 
  • Windows commands:
      > cd "C:/Program Files (x86)/ZED SDK/tools/"
    > ./"ZED Diagnostic.exe" -ais X

Replace "X" with an integer number according to the following list:

  • 0 - MULTI_CLASS_DETECTION: Related to sl::OBJECT_DETECTION_MODEL::MULTI_CLASS_BOX_FAST
  • 1 - MULTI_CLASS_MEDIUM_DETECTION: Related to sl::OBJECT_DETECTION_MODEL::MULTI_CLASS_BOX_MEDIUM
  • 2 - MULTI_CLASS_ACCURATE_DETECTION: Related to sl::OBJECT_DETECTION_MODEL::MULTI_CLASS_BOX_ACCURATE
  • 3 - HUMAN_BODY_FAST_DETECTION: Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_FAST
  • 4 - HUMAN_BODY_MEDIUM_DETECTION: Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_MEDIUM
  • 5 - HUMAN_BODY_ACCURATE_DETECTION: Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_ACCURATE
  • 6 - HUMAN_BODY_38_FAST_DETECTION: Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_FAST
  • 7 - HUMAN_BODY_38_MEDIUM_DETECTION: Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_FAST
  • 8 - HUMAN_BODY_38_ACCURATE_DETECTION: Related to sl::BODY_TRACKING_MODEL::HUMAN_BODY_FAST
  • 9 - PERSON_HEAD_DETECTION: Related to sl::OBJECT_DETECTION_MODEL::PERSON_HEAD_BOX_FAST
  • 10 - PERSON_HEAD_ACCURATE_DETECTION: Related to sl::OBJECT_DETECTION_MODEL::PERSON_HEAD_BOX_ACCURATE
  • 11 - REID_ASSOCIATION: Related to sl::BatchParameters.enable
  • 12 - NEURAL_DEPTH: Related to sl::DEPTH_MODE::NEURAL
  • 13 - NEURAL_PLUS_DEPTH: Related to sl::DEPTH_MODE::NEURAL_PLUS

Download and optimize all the AI models

This process can take a while because all the AI models will be downloaded and optimized in a single step.

Open a shell console

  • Linux command (the current folder is not relevant):
     $ ZED_Diagnostic -aio
  • Windows commands:
      > cd "C:/Program Files (x86)/ZED SDK/tools/"
    > ./"ZED Diagnostic.exe" -aio

For more information about all the ZED Diagnostic available commands, you can use the "-h" flag.