Name: inference-engine-interface
Summary: Interface of inference engines
Version: 0.0.1
-Release: 7
+Release: 8
Group: Multimedia/Framework
License: Apache-2.0
Source0: %{name}-%{version}.tar.gz
//get type and allocate memory to mInputBuffer;
InputAttrType attrType = static_cast<InputAttrType>(mCommonEngine->GetInputLayerAttrType());
if (attrType == InputAttrUInt8) {
- mMatType = CV_8UC3;
- LOGI("InputType is UINT8");
+ LOGI("InputType is %d ch with UINT8", mCh);
+ if (mCh == 1) {
+ mMatType = CV_8UC1;
+ } else if (mCh == 3) {
+ mMatType = CV_8UC3;
+ } else {
+ LOGE("Not supported");
+ return INFERENCE_ENGINE_ERROR_NOT_SUPPORTED_FORMAT;
+ }
}
else if (attrType == InputAttrFloat32) {
- mMatType = CV_32FC3;
- LOGI("InputType FLOAT32");
+ LOGI("InputType is %d ch with FLOAT32", mCh);
+ if (mCh == 1) {
+ mMatType = CV_32FC1;
+ } else if (mCh == 3) {
+ mMatType = CV_32FC3;
+ } else {
+ LOGE("Not supported");
+ return INFERENCE_ENGINE_ERROR_NOT_SUPPORTED_FORMAT;
+ }
}
else {
LOGE("Not supported");
int classIdx = -1;
results.number_of_classes = 0;
- for (int idx = 0; idx < mOutputNumbers; ++idx) {
+ for (int idx = 0; idx < top_results.size(); ++idx) {
if (top_results[idx].first < mThreshold)
continue;
LOGI("idx:%d", idx);