|
Cpp-Processing
|
This class is used to compile the model for the inference engine plugin;. More...
#include <CelanturSDKInterface.h>
Public Member Functions | |
| ModelCompiler (std::filesystem::path license, ModelCompilerParams params) | |
| ModelCompiler (const ModelCompiler &other) | |
| ModelCompiler & | operator= (const ModelCompiler &other) |
| ModelCompiler (ModelCompiler &&other) noexcept | |
| ModelCompiler & | operator= (ModelCompiler &&other) noexcept |
| ~ModelCompiler () | |
| celantur::InferenceEnginePluginCompileSettings | preload_model (std::filesystem::path model_path) |
| Preload the model from the given path and return the settings that are needed to compile the model;. More... | |
| void | compile_model (celantur::InferenceEnginePluginCompileSettings settings, std::filesystem::path output_path) |
| Compile the preloaded model with the given settings and save it to the given output path;. More... | |
This class is used to compile the model for the inference engine plugin;.
If your inference engine plugin requires model compilation, like TensorRT or OpenVINO, you need to use this class to compile the model before using it in the Processor class;
| CelanturSDK::ModelCompiler::ModelCompiler | ( | std::filesystem::path | license, |
| ModelCompilerParams | params | ||
| ) |
| CelanturSDK::ModelCompiler::ModelCompiler | ( | const ModelCompiler & | other | ) |
|
noexcept |
| CelanturSDK::ModelCompiler::~ModelCompiler | ( | ) |
| void CelanturSDK::ModelCompiler::compile_model | ( | celantur::InferenceEnginePluginCompileSettings | settings, |
| std::filesystem::path | output_path | ||
| ) |
Compile the preloaded model with the given settings and save it to the given output path;.
| settings | The settings that are needed to compile the model; these settings are obtained from the preload_model() function. |
| output_path | The path to save the compiled model; the path should include the file name and extension. |
The output path should be a valid path to save the compiled model; we recommend file extension based on the inference engine plugin used:
| CelanturSDK::ModelCompiler & CelanturSDK::ModelCompiler::operator= | ( | const ModelCompiler & | other | ) |
|
noexcept |
| celantur::InferenceEnginePluginCompileSettings CelanturSDK::ModelCompiler::preload_model | ( | std::filesystem::path | model_path | ) |
Preload the model from the given path and return the settings that are needed to compile the model;.
The preloading is needed to extract the model specific settings that are needed to compile the model for the given inference engine plugin; it is impossible to determine the settings purely from the inference engine For more abour inference engines and their settings, please read the documentation: Inference Engines
| model_path | Path to the model file |