|
| std::string | getName () |
| | Gets the name of the neural network. More...
|
| |
| double | getInferenceTime () |
| | Gets the inference time of the network. More...
|
| |
| void | loadNetwork (std::string framework, std::string modelWeightsFile, std::string classesFile="", std::string modelConfigurationFile="", std::string inputLayerName="", std::string outputLayerName="") |
| | Loads the neural network from memory buffer. More...
|
| |
| void | configureNetwork (std::string name, int inputWidth, int inputHeight, double scale, double mean0, double mean1, double mean2, std::string configBackend, std::string configTarget, double confidenceThreshold) |
| | Configures the network with various parameters. More...
|
| |
| std::vector< std::string > | getOutputsNames (const cv::dnn::Net &net) |
| | Gets the names of the output layers of the network. More...
|
| |
|
|
void | readClassNames (const std::string &filePath) |
| |
|
|
std::string | mFramework |
| |
|
std::string | mInputLayerName |
| |
|
std::string | mOutputLayerName |
| |
|
std::string | mName |
| |
|
cv::dnn::Net | mNet |
| |
|
std::vector< std::string > | classes |
| |
|
double | scaleFactor = 1.0 |
| |
|
cv::Scalar | mean { 0.0, 0.0, 0.0 } |
| |
|
cv::Size | size { 128, 128 } |
| |
| cv::dnn::Backend | selectedBackend |
| |
| cv::dnn::Target | selectedTarget |
| |
|
float | confThreshold = 0.5F |
| |
| std::map< std::string, cv::dnn::Backend > | backends |
| |
| std::map< std::string, cv::dnn::Target > | targets |
| |
◆ configureNetwork()
| void core::NeuralBase::configureNetwork |
( |
std::string |
name, |
|
|
int |
inputWidth, |
|
|
int |
inputHeight, |
|
|
double |
scale, |
|
|
double |
mean0, |
|
|
double |
mean1, |
|
|
double |
mean2, |
|
|
std::string |
configBackend, |
|
|
std::string |
configTarget, |
|
|
double |
confidenceThreshold |
|
) |
| |
Configures the network with various parameters.
- Parameters
-
| name | The name of the network. |
| inputWidth | The width of the network input. |
| inputHeight | The height of the network input. |
| scale | The scaling factor for the input. |
| mean0 | The mean value for the first channel. |
| mean1 | The mean value for the second channel. |
| mean2 | The mean value for the third channel. |
| configBackend | The backend to be used for computation. |
| configTarget | The target device for computation. |
| confidenceThreshold | The threshold for filtering weak detections. |
◆ getInferenceTime()
| double core::NeuralBase::getInferenceTime |
( |
| ) |
|
Gets the inference time of the network.
- Returns
- The inference time in milliseconds.
◆ getName()
| std::string core::NeuralBase::getName |
( |
| ) |
|
Gets the name of the neural network.
- Returns
- A string representing the name of the network.
◆ getOutputsNames()
| std::vector< std::string > core::NeuralBase::getOutputsNames |
( |
const cv::dnn::Net & |
net | ) |
|
Gets the names of the output layers of the network.
- Parameters
-
- Returns
- A vector of strings representing the names of the output layers.
◆ loadNetwork()
| void core::NeuralBase::loadNetwork |
( |
std::string |
framework, |
|
|
std::string |
modelWeightsFile, |
|
|
std::string |
classesFile = "", |
|
|
std::string |
modelConfigurationFile = "", |
|
|
std::string |
inputLayerName = "", |
|
|
std::string |
outputLayerName = "" |
|
) |
| |
Loads the neural network from memory buffer.
- Parameters
-
| framework | The framework used for the network. |
| modelWeightsFile | The memory buffer containing the model weights. |
| classesFile | The memory buffer containing the class names. |
| modelConfigurationFile | The memory buffer containing the model configuration. You can leave it empty if there is no configuration file. |
| inputLayerName | The name of the input layer. You can leave it empty if there is no multiple input. |
| outputLayerName | The name of the output layer. You can leave it empty. You can leave itempty if there are no specific outputs to read. |
◆ backends
| std::map<std::string, cv::dnn::Backend> core::NeuralBase::backends |
|
protected |
Initial value:= {
{"DNN_BACKEND_DEFAULT", cv::dnn::DNN_BACKEND_DEFAULT},
{"DNN_BACKEND_HALIDE", cv::dnn::DNN_BACKEND_HALIDE},
{"DNN_BACKEND_INFERENCE_ENGINE", cv::dnn::DNN_BACKEND_INFERENCE_ENGINE},
{"DNN_BACKEND_OPENCV", cv::dnn::DNN_BACKEND_OPENCV},
{"DNN_BACKEND_CUDA", cv::dnn::DNN_BACKEND_CUDA}
}
◆ selectedBackend
| cv::dnn::Backend core::NeuralBase::selectedBackend |
|
protected |
Initial value:=
cv::dnn::DNN_BACKEND_OPENCV
◆ selectedTarget
| cv::dnn::Target core::NeuralBase::selectedTarget |
|
protected |
Initial value:=
cv::dnn::DNN_TARGET_CPU
◆ targets
| std::map<std::string, cv::dnn::Target> core::NeuralBase::targets |
|
protected |
Initial value:= {
{"DNN_TARGET_CPU", cv::dnn::DNN_TARGET_CPU},
{"DNN_TARGET_CUDA", cv::dnn::DNN_TARGET_CUDA},
{"DNN_TARGET_OPENCL", cv::dnn::DNN_TARGET_OPENCL},
{"DNN_TARGET_OPENCL_FP16", cv::dnn::DNN_TARGET_OPENCL_FP16},
{"DNN_TARGET_MYRIAD", cv::dnn::DNN_TARGET_MYRIAD} }
The documentation for this class was generated from the following files:
- C:/Projects/Engine/AntalEngine/Engine/NeuralBase.h
- C:/Projects/Engine/AntalEngine/Engine/NeuralBase.cpp