plugin  0.1.0
detection_model_yolov3_onnx.h
1 /*
2 // Copyright (C) 2022-2024 Intel Corporation
3 //
4 // Licensed under the Apache License, Version 2.0 (the "License");
5 // you may not use this file except in compliance with the License.
6 // You may obtain a copy of the License at
7 //
8 // http://www.apache.org/licenses/LICENSE-2.0
9 //
10 // Unless required by applicable law or agreed to in writing, software
11 // distributed under the License is distributed on an "AS IS" BASIS,
12 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 // See the License for the specific language governing permissions and
14 // limitations under the License.
15 */
16 
17 #pragma once
18 
19 #include <string>
20 #include <vector>
21 
22 #include <openvino/openvino.hpp>
23 
24 #include "models/detection_model.h"
25 
27 public:
35  ModelYoloV3ONNX(const std::string& modelFileName,
36  float confidenceThreshold,
37  const std::vector<std::string>& labels = std::vector<std::string>(),
38  const std::string& layout = "");
39 
40  std::unique_ptr<ResultBase> postprocess(InferenceResult& infResult) override;
41  std::shared_ptr<InternalModelData> preprocess(const InputData& inputData, ov::InferRequest& request) override;
42 
43 protected:
44  void prepareInputsOutputs(std::shared_ptr<ov::Model>& model) override;
45 
46  std::string boxesOutputName;
47  std::string scoresOutputName;
48  std::string indicesOutputName;
49  static const int numberOfClasses = 80;
50 };
Definition: detection_model.h:25
Definition: detection_model_yolov3_onnx.h:26
ModelYoloV3ONNX(const std::string &modelFileName, float confidenceThreshold, const std::vector< std::string > &labels=std::vector< std::string >(), const std::string &layout="")
Definition: detection_model_yolov3_onnx.cpp:37
Definition: results.h:53
Definition: input_data.h:20