Class NNArchive
Defined in File NNArchive.hpp
Class Documentation
-
class NNArchive
Public Functions
-
NNArchive(const std::filesystem::path &archivePath, NNArchiveOptions options = {})
Construct a new NNArchive object - a container holding a model and its configuration.
- Parameters:
archivePath – Path to the archive file
options – Archive options such as compression, number of shaves, etc. See NNArchiveOptions.
-
std::optional<OpenVINO::Blob> getBlob() const
Return a SuperVINO::Blob from the archive if getModelType() returns BLOB, nothing otherwise.
- Returns:
std::optional<OpenVINO::Blob>: Model blob
-
std::optional<OpenVINO::SuperBlob> getSuperBlob() const
Return a SuperVINO::SuperBlob from the archive if getModelType() returns SUPERBLOB, nothing otherwise.
- Returns:
std::optional<OpenVINO::SuperBlob>: Model superblob
-
std::optional<std::filesystem::path> getModelPath() const
Return a path to the model inside the archive if getModelType() returns OTHER or DLC, nothing otherwise.
- Returns:
std::optional<Path>: Model path
-
const NNArchiveVersionedConfig &getVersionedConfig() const
Get NNArchive config wrapper.
- Returns:
NNArchiveVersionedConfig: Archive config
-
std::optional<std::pair<uint32_t, uint32_t>> getInputSize(uint32_t index = 0) const
Get inputSize of the model.
Note
this function is only valid for models with NCHW and NHWC input formats
- Parameters:
index – Index of input
- Returns:
std::vector<std::pair<int, int>>: inputSize
-
std::optional<uint32_t> getInputWidth(uint32_t index = 0) const
Get inputWidth of the model.
- Parameters:
index – Index of input
- Returns:
int: inputWidth
-
std::optional<uint32_t> getInputHeight(uint32_t index = 0) const
Get inputHeight of the model.
- Parameters:
index – Index of input
- Returns:
int: inputHeight
-
std::vector<dai::Platform> getSupportedPlatforms() const
Get supported platforms.
- Returns:
std::vector<dai::Platform>: Supported platforms
-
NNArchive(const std::filesystem::path &archivePath, NNArchiveOptions options = {})