NNModelPluginInfo
class NNModelPluginInfo
{
public:
NNModelPluginInfo(
std::string pluginDir, std::string pluginName,
std::string modelName, std::string testImage);
NNModelPluginInfo(
std::string pluginDir, std::string pluginName,
std::string modelName, std::string testImage, float x, float y, float width, float height);
public:
std::string getPluginDir();
std::string getModelName();
std::shared_ptr<NNModel> createModel();
std::shared_ptr<NNModel> createModel(std::vector<std::string> arguments);
std::string getTestImage();
std::shared_ptr<NNRect> getTestImageRoi();
};
Introduction to the Class
Class representing detailed information about a neural network model plugin.
The `NNModelPluginInfo` class encapsulates the necessary details for a neural network model plugin, including the plugin directory, plugin name, model name, test image, and optionally, a region of interest (ROI) for the test image.
Introduction to the Class's Methods
NNModelPluginInfo(std::string pluginDir, std::string pluginName, std::string modelName, std::string testImage)
brief: Constructs an `NNModelPluginInfo` object with basic plugin and model information..
param
pluginDir: The directory where the plugin is located.
pluginName: The name of the plugin.
modelName: The name of the model.
testImage: The path to the test image used for the model.
NNModelPluginInfo(std::string pluginDir, std::string pluginName,std::string modelName, std::string testImage, float x, float y, float width, float height)
brief: Constructs an `NNModelPluginInfo` object with basic plugin and model information, and an ROI for the test image.
param
pluginDir: The directory where the plugin is located.
pluginName: The name of the plugin.
modelName: The name of the model.
testImage: The path to the test image used for the model.
x: The x-coordinate of the top-left corner of the ROI.
y: The y-coordinate of the top-left corner of the ROI.
width: The width of the ROI.
height: The height of the ROI.
std::string getPluginDir():
brief: Retrieves the directory where the plugin is located.
return string: The plugin directory.
std::string getModelName():
brief: Retrieves the name of the model.
return string: The model name.
std::shared_ptr<NNModel> createModel():
brief: Creates an instance of the neural network model.
return std::shared_ptr<NNModel> : A shared pointer to the created model instance.
std::shared_ptr<NNModel> createModel(std::vector<std::string> arguments):
brief: Creates an instance of the neural network model with additional arguments.
param
arguments: A vector of strings containing additional arguments for model creation.
return std::shared_ptr<NNModel> : A shared pointer to the created model instance.
std::string getTestImage():
brief: Retrieves the path to the test image used for the model.
return string: The path to the test image.
std::shared_ptr<NNRect> getTestImageRoi():
brief: Retrieves the region of interest (ROI) for the test image.
return std::shared_ptr<NNRect>: A shared pointer to the ROI object.