FAST  3.2.0
Framework for Heterogeneous Medical Image Computing and Visualization
OpenVINOEngine.hpp
Go to the documentation of this file.
1 #pragma once
2 
4 #include <OpenVINOExport.hpp>
5 
6 namespace InferenceEngine {
7 class InferRequest;
8 class Core;
9 }
10 
11 namespace fast {
12 
13 class INFERENCEENGINEOPENVINO_EXPORT OpenVINOEngine : public InferenceEngine {
15  public:
16  void run() override;
17 
18  void load() override;
19 
20  ImageOrdering getPreferredImageOrdering() const override;
21 
22  std::string getName() const override;
23 
24  std::vector<ModelFormat> getSupportedModelFormats() const {
26  };
27 
29  return ModelFormat::OPENVINO;
30  };
31 
37  std::vector<InferenceDeviceInfo> getDeviceList();
38 
39  ~OpenVINOEngine();
40  private:
41  std::shared_ptr<::InferenceEngine::Core> m_inferenceCore;
42  // This has to be last, because then inferRequest will be deleted before the plugin, which is necessary to avoid a crash on delete
43  std::shared_ptr<::InferenceEngine::InferRequest> m_inferRequest;
44 
45  void loadPlugin(std::string deviceType);
46 
47  // This mutex is used to ensure only one thread is using this OpenVINO instance at the same time
48  std::mutex m_mutex;
49 
50  ImageOrdering m_imageOrdering;
51 };
52 
53 DEFINE_INFERENCE_ENGINE(OpenVINOEngine, INFERENCEENGINEOPENVINO_EXPORT)
54 
55 }
InferenceEngine
Definition: OpenVINOEngine.hpp:6
fast::OpenVINOEngine::getSupportedModelFormats
std::vector< ModelFormat > getSupportedModelFormats() const
Definition: OpenVINOEngine.hpp:24
fast
Definition: AffineTransformation.hpp:7
FAST_OBJECT
#define FAST_OBJECT(className)
Definition: Object.hpp:9
fast::OpenVINOEngine::getPreferredModelFormat
ModelFormat getPreferredModelFormat() const
Definition: OpenVINOEngine.hpp:28
fast::ModelFormat
ModelFormat
Definition: InferenceEngine.hpp:48
DEFINE_INFERENCE_ENGINE
#define DEFINE_INFERENCE_ENGINE(classType, exportStatement)
Definition: InferenceEngine.hpp:10
fast::ModelFormat::ONNX
@ ONNX
InferenceEngine.hpp
fast::ModelFormat::OPENVINO
@ OPENVINO
fast::ImageOrdering
ImageOrdering
Definition: InferenceEngine.hpp:21
fast::OpenVINOEngine
Definition: OpenVINOEngine.hpp:13