// TODO: Need to support other acceleration devices
int loadModel (accl_hw hw);
bool isModelLoaded () {
- return isLoaded;
+ return _isLoaded;
}
int getInputTensorDim (GstTensorsInfo * info);
InferenceEngine::InferRequest _inferRequest;
static std::map<accl_hw, std::string> _nnsAcclHwToOVDevMap;
- std::string pathModelXml;
- std::string pathModelBin;
- bool isLoaded;
- accl_hw hw;
+ std::string _pathModelXml;
+ std::string _pathModelBin;
+ bool _isLoaded;
+ accl_hw _hw;
};
std::map<accl_hw, std::string> TensorFilterOpenvino::_nnsAcclHwToOVDevMap = {
std::string
TensorFilterOpenvino::getPathModelXml ()
{
- return this->pathModelXml;
+ return this->_pathModelXml;
}
/**
std::string
TensorFilterOpenvino::getPathModelBin ()
{
- return this->pathModelBin;
+ return this->_pathModelBin;
}
/**
TensorFilterOpenvino::TensorFilterOpenvino (std::string pathModelXml,
std::string pathModelBin)
{
- this->pathModelXml = pathModelXml;
- this->pathModelBin = pathModelBin;
- (this->_networkReaderCNN).ReadNetwork (this->pathModelXml);
- (this->_networkReaderCNN).ReadWeights (this->pathModelBin);
+ this->_pathModelXml = pathModelXml;
+ this->_pathModelBin = pathModelBin;
+ (this->_networkReaderCNN).ReadNetwork (this->_pathModelXml);
+ (this->_networkReaderCNN).ReadWeights (this->_pathModelBin);
this->_networkCNN = (this->_networkReaderCNN).getNetwork ();
this->_inputsDataMap = (this->_networkCNN).getInputsInfo ();
this->_outputsDataMap = (this->_networkCNN).getOutputsInfo ();
- this->isLoaded = false;
- this->hw = ACCL_NONE;
+ this->_isLoaded = false;
+ this->_hw = ACCL_NONE;
}
/**
std::vector<std::string> strVector;
std::vector<std::string>::iterator strVectorIter;
- if (this->isLoaded) {
+ if (this->_isLoaded) {
// TODO: Can OpenVino support to replace the loaded model with a new one?
g_critical ("The model file is already loaded onto the device.");
return RetEBusy;
/** TODO: Catch the IE exception */
this->_executableNet = this->_ieCore.LoadNetwork (this->_networkCNN,
_nnsAcclHwToOVDevMap[hw]);
- this->hw = hw;
- this->isLoaded = true;
+ this->_hw = hw;
+ this->_isLoaded = true;
this->_inferRequest = this->_executableNet.CreateInferRequest ();
return RetSuccess;