19 #include "fastdeploy/fastdeploy_model.h" 20 #include "fastdeploy/vision/common/processors/transform.h" 21 #include "fastdeploy/vision/common/result.h" 23 #include "fastdeploy/vision/ocr/ppocr/classifier.h" 24 #include "fastdeploy/vision/ocr/ppocr/dbdetector.h" 25 #include "fastdeploy/vision/ocr/ppocr/recognizer.h" 26 #include "fastdeploy/vision/ocr/ppocr/utils/ocr_postprocess_op.h" 27 #include "fastdeploy/utils/unique_ptr.h" 60 std::unique_ptr<PPOCRv2> Clone()
const;
68 virtual bool Predict(cv::Mat* img, fastdeploy::vision::OCRResult* result);
69 virtual bool Predict(
const cv::Mat& img,
70 fastdeploy::vision::OCRResult* result);
77 virtual bool BatchPredict(
const std::vector<cv::Mat>& images,
78 std::vector<fastdeploy::vision::OCRResult>* batch_result);
80 bool Initialized()
const override;
81 bool SetClsBatchSize(
int cls_batch_size);
82 int GetClsBatchSize();
83 bool SetRecBatchSize(
int rec_batch_size);
84 int GetRecBatchSize();
92 int cls_batch_size_ = 1;
93 int rec_batch_size_ = 6;
96 namespace application {
DBDetector object is used to load the detection model provided by PaddleOCR.
Definition: dbdetector.h:33
Classifier object is used to load the classification model provided by PaddleOCR. ...
Definition: classifier.h:32
Base model object for all the vision models.
Definition: fastdeploy_model.h:21
Recognizer object is used to load the recognition model provided by PaddleOCR.
Definition: recognizer.h:32
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16
PPOCRv2 is used to load PP-OCRv2 series models provided by PaddleOCR.
Definition: ppocr_v2.h:36