16 #include "fastdeploy/fastdeploy_model.h" 17 #include "fastdeploy/vision/classification/ppcls/preprocessor.h" 18 #include "fastdeploy/vision/classification/ppcls/postprocessor.h" 25 namespace classification {
38 PaddleClasModel(
const std::string& model_file,
const std::string& params_file,
39 const std::string& config_file,
47 virtual std::unique_ptr<PaddleClasModel> Clone()
const;
50 virtual std::string
ModelName()
const {
return "PaddleClas/Model"; }
58 virtual bool Predict(cv::Mat* im,
ClassifyResult* result,
int topk = 1);
75 virtual bool BatchPredict(
const std::vector<cv::Mat>& imgs,
76 std::vector<ClassifyResult>* results);
92 virtual bool BatchPredict(
const std::vector<FDMat>& mats,
93 std::vector<ClassifyResult>* results);
102 return postprocessor_;
Option object used when create a new Runtime object.
Definition: runtime_option.h:40
Base model object for all the vision models.
Definition: fastdeploy_model.h:21
Preprocessor object for PaddleClas serials model.
Definition: preprocessor.h:26
ModelFormat
Definition: enum_variables.h:67
Postprocessor object for PaddleClas serials model.
Definition: postprocessor.h:25
virtual PaddleClasPreprocessor & GetPreprocessor()
Get preprocessor reference of PaddleClasModel.
Definition: model.h:96
PaddleClas serials model object used when to load a PaddleClas model exported by PaddleClas repositor...
Definition: model.h:28
Classify result structure for all the image classify models.
Definition: result.h:46
virtual PaddleClasPostprocessor & GetPostprocessor()
Get postprocessor reference of PaddleClasModel.
Definition: model.h:101
FDMat is a structure for replace cv::Mat.
Definition: mat.h:34
Model with paddlepaddle format.
Definition: enum_variables.h:69
All C++ FastDeploy APIs are defined inside this namespace.
Definition: option.h:16
virtual std::string ModelName() const
Get model's name.
Definition: model.h:50