#include "opencv2/core.hpp" #include "opencv2/imgcodecs.hpp" #include "opencv2/imgproc.hpp" #include #include #include #include #include #include #include #include #include #include #include #include namespace PaddleOCR { class Table { public: explicit Table(std::string model_path, const std::string table_char_dict_path); void Run(std::vector img_list, std::vector> &structure_html_tags, std::vector &structure_scores, std::vector>> &structure_boxes); private: ov::InferRequest infer_request; std::string model_path; std::shared_ptr model; ov::CompiledModel compiled_model; cv::Mat src_img; cv::Mat resize_img; const std::string table_char_dict_path; int table_batch_num_ = 1; int table_max_len_ = 488; std::vector mean_ = {0.485f, 0.456f, 0.406f}; std::vector scale_ = {1 / 0.229f, 1 / 0.224f, 1 / 0.225f}; bool is_scale_ = true; // pre-process TableResizeImg resize_op_; Normalize normalize_op_; PermuteBatch permute_op_; TablePadImg pad_op_; // post-process TablePostProcessor post_processor_; }; }