16 #include "fastdeploy/fastdeploy_model.h" 17 #include "fastdeploy/vision/common/processors/transform.h" 18 #include "fastdeploy/vision/common/result.h" 19 #include "fastdeploy/vision/ocr/ppocr/utils/ocr_postprocess_op.h" 20 #include "fastdeploy/vision/ocr/ppocr/det_postprocessor.h" 21 #include "fastdeploy/vision/ocr/ppocr/det_preprocessor.h" 22 #include "fastdeploy/utils/unique_ptr.h" 43 DBDetector(
const std::string& model_file,
const std::string& params_file =
"",
51 virtual std::unique_ptr<DBDetector> Clone()
const;
54 std::string
ModelName()
const {
return "ppocr/ocr_det"; }
62 virtual bool Predict(
const cv::Mat& img,
63 std::vector<std::array<int, 8>>* boxes_result);
71 virtual bool Predict(
const cv::Mat& img, vision::OCRResult* ocr_result);
79 virtual bool BatchPredict(
const std::vector<cv::Mat>& images,
80 std::vector<std::vector<std::array<int, 8>>>* det_results);
88 virtual bool BatchPredict(
const std::vector<cv::Mat>& images,
89 std::vector<vision::OCRResult>* ocr_results);
98 return postprocessor_;
std::string ModelName() const
Get model's name.
Definition: dbdetector.h:54
Option object used when create a new Runtime object.
Definition: runtime_option.h:40
DBDetector object is used to load the detection model provided by PaddleOCR.
Definition: dbdetector.h:33
Base model object for all the vision models.
Definition: fastdeploy_model.h:21
ModelFormat
Definition: enum_variables.h:67
virtual DBDetectorPostprocessor & GetPostprocessor()
Get postprocessor reference of DBDetectorPostprocessor.
Definition: dbdetector.h:97
Preprocessor object for DBDetector serials model.
Definition: det_preprocessor.h:28
Postprocessor object for DBDetector serials model.
Definition: det_postprocessor.h:26
virtual DBDetectorPreprocessor & GetPreprocessor()
Get preprocessor reference of DBDetectorPreprocessor.
Definition: dbdetector.h:92
Model with paddlepaddle format.
Definition: enum_variables.h:69
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16