#ifndef __CLIPAPP_H #define __CLIPAPP_H #include "ClipCfg.h" #include "Locks.h" #include "ExHeaders.h" #include #include "onnxruntime_cxx_api.h" NAMESPACE_MAS_BEGIN NAMESPACE_CLIP_BEGIN class ClipApp { public: static ClipApp* Instance(); static void DestroyInstance(); TZ_INT Initialize(const std::string& initParam); TZ_INT Dispose(); TZ_INT DoDetect(cv::Mat& input, ClipDetectResult& detRes); private: ClipApp(); ~ClipApp(); TZ_BOOL m_inited; TZ_INT m_usecnt; Ort::Env* m_env; Ort::Session* m_session; Ort::SessionOptions m_sessionOptions; static tzc::Mutex _mutex; static ClipApp* _instance; TZ_INT PreprocessImage(cv::Mat& input, std::vector& outputTensor); }; NAMESPACE_CLIP_END NAMESPACE_MAS_END #endif