Function dai::downloadModelsFromZoo

Function Documentation

bool dai::downloadModelsFromZoo(const fs::path &path, const fs::path &cacheDirectory = "", const std::string &apiKey = "", const std::string &progressFormat = "none")

Helper function allowing one to download all models specified in yaml files in the given path and store them in the cache directory.

Parameters:
  • path – Path to the directory containing yaml files

  • cacheDirectory – Cache directory where the cached models are stored, default is “”. If cacheDirectory is set to “”, this function checks the DEPTHAI_ZOO_CACHE_PATH environment variable and uses that if set, otherwise the default is used (see getDefaultCachePath).

  • apiKey – API key for the model zoo, default is “”. If apiKey is set to “”, this function checks the DEPTHAI_ZOO_API_KEY environment variable and uses that if set. Otherwise, no API key is used.

  • progressFormat – Format to use for progress output (possible values: pretty, json, none), default is “pretty”

Returns:

bool: True if all models were downloaded successfully, false otherwise