#pragma once #include #include #include #include #include namespace uns { using VecInt = std::vector; using VecFloat = std::vector; using IONames = std::vector; using IONamesStorage = std::vector; using EOCR_Result = std::pair; using EOCR_ResultSet = std::map; using EOCRD_Rects = std::vector>; class OCRToolBox { public: static bool CheckFile(const std::wstring& file); static void InitOrtSessionOptions(Ort::SessionOptions& se_opt); static bool AutoSelectEP(const OrtApi* ort, Ort::SessionOptions& se_opt, bool& fallback_to_cpu); static void GetInputOutputNames(Ort::Session* ort_session, IONames& input_names, IONamesStorage& input_ns, IONames& output_names, IONamesStorage& output_ns); }; }