Skip to content

Commit aa726e0

Browse files
Update demos/common/cpp/models/src/detection_model_yolov3_onnx.cpp
Co-authored-by: Zlobin Vladimir <[email protected]>
1 parent 3ab5b12 commit aa726e0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

demos/common/cpp/models/src/detection_model_yolov3_onnx.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,13 +119,15 @@ std::shared_ptr<InternalModelData> ModelYoloV3ONNX::preprocess(const InputData&
119119
return ImageModel::preprocess(inputData, request);
120120
}
121121

122+
namespace {
122123
float getScore(const ov::Tensor& scoresTensor, size_t classInd, size_t boxInd) {
123124
const float* scoresPtr = scoresTensor.data<float>();
124125
const auto shape = scoresTensor.get_shape();
125126
int N = shape[2];
126127

127128
return scoresPtr[classInd * N + boxInd];
128129
}
130+
}
129131

130132
std::unique_ptr<ResultBase> ModelYoloV3ONNX::postprocess(InferenceResult& infResult) {
131133
// Get info about input image

0 commit comments

Comments
 (0)