OrtSessionHandler

Copyright (c) organization

Author

btran

Date

2020-04-19

namespace Ort
class OrtSessionHandler
#include <OrtSessionHandler.hpp>

An OrtSessionHandler class object. This class serves as the base parent class which is inherited by class object , ImageRecognitionOrtSessionHandlerBase. This class is implemented, following Pointer to Implementation (pimpl) C++ programming methodology.

Subclassed by Ort::ImageRecognitionOrtSessionHandlerBase

Public Types

using DataOutputType = std::pair<float*, std::vector<int64_t>>

An alias that represents a data structure which pairs a float pointer to a std::vector of 64 bit long integer.

Public Functions

OrtSessionHandler(const std::string &modelPath, const std::optional<size_t> &gpuIdx = std::nullopt, const std::optional<std::vector<std::vector<int64_t>>> &inputShapes = std::nullopt)

A Constructor function.

~OrtSessionHandler()

A Deconstructor function.

std::vector<DataOutputType> operator()(const std::vector<float*> &inputImgData)

A custom operator which serves as the main function call that processes an input image and outputs the resulting tensor.

Private Members

std::unique_ptr<OrtSessionHandlerIml> m_piml

An opaque pointer to OrtSessionHandlerIml which is called within OrtSessionHandler constructor function.