ort_base
-
namespace Ort
-
class OrtBase
- #include <ort_base.hpp>
An ONNXRuntime (Ort) Base class object. This is the base class for P1OrtBase, P2OrtBase and P3OrtBase. It serves an auxillary class object to directly interface with the ONNXRuntime CPP API to instantiate an Ort session to run as an inference engine.
Subclassed by Ort::P2OrtBase, Ort::P3OrtBase
Public Types
-
using DataOutputType = std::pair<float*, std::vector<std::int64_t>>
A convienence datatype to store output inference result.
Public Functions
-
OrtBase(const std::string &modelPath, const boost::optional<size_t> &gpuIdx = boost::none, const boost::optional<std::vector<std::vector<std::int64_t>>> &inputShapes = boost::none)
A Constructor function.
-
~OrtBase()
A Destructor function.
-
std::vector<DataOutputType> operator()(const std::vector<float*> &inputImgData)
A Mutator operator function that conducts inference with preprocessed input image data.
-
int getNumOutputs(void)
A Getter function that gets the number of outputs which is used to determine the level of precision in EPDContainer class object.
Private Members
-
std::unique_ptr<OrtBaseImpl> base_impl_
A pointer to the OrtBaseImpl.
-
using DataOutputType = std::pair<float*, std::vector<std::int64_t>>
-
class OrtBase