Function dai::getModelFromZoo

Function Documentation

fs::path dai::getModelFromZoo(const NNModelDescription &modelDescription, bool useCached = true, const fs::path &cacheDirectory = "", const std::string &apiKey = "", const std::string &progressFormat = "none")

Get model from model zoo.

Parameters:
  • modelDescription – Model description

  • useCached – Use cached model if present, default is true

  • 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 value 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:

std::filesystem::path: Path to the model in cache