44 const char* model_file,
const char* params_file,
const char* label_path,
46 const FD_C_ModelFormat model_format);
94 size_t start_index,
size_t end_index,
114 const char* model_file,
const char* params_file,
116 const FD_C_ModelFormat model_format);
163 size_t start_index,
size_t end_index);
182 const char* model_file,
const char* params_file,
184 const FD_C_ModelFormat model_format);
struct FD_C_DBDetectorWrapper FD_C_DBDetectorWrapper
Definition: model.h:168
FD_C_Mat FD_C_TwoDimArrayInt32 * boxes_result
Definition: model.cc:262
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_DBDetectorWrapper * FD_C_CreateDBDetectorWrapper(const char *model_file, const char *params_file, FD_C_RuntimeOptionWrapper *fd_c_runtime_option_wrapper, const FD_C_ModelFormat model_format)
Create a new FD_C_DBDetectorWrapper object.
Definition: model.cc:240
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_RecognizerWrapperPredict(__fd_keep FD_C_RecognizerWrapper *fd_c_recognizer_wrapper, FD_C_Mat img, FD_C_Cstr *text, float *rec_score)
Predict the ocr result for an input image.
struct FD_C_ClassifierWrapper FD_C_ClassifierWrapper
Definition: model.h:100
int8_t FD_C_Bool
Definition: fd_common.h:58
#define FASTDEPLOY_CAPI_EXPORT
Definition: fd_common.h:27
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_RecognizerWrapperBatchPredictWithIndex(__fd_keep FD_C_RecognizerWrapper *fd_c_recognizer_wrapper, FD_C_OneDimMat imgs, FD_C_OneDimArrayCstr *texts, FD_C_OneDimArrayFloat *rec_scores, size_t start_index, size_t end_index, FD_C_OneDimArrayInt32 indices)
FD_C_OneDimMat FD_C_OneDimArrayCstr * texts
Definition: model.cc:82
FD_C_Mat FD_C_Cstr * text
Definition: model.cc:61
FD_C_OneDimMat FD_C_OneDimArrayInt32 * cls_labels
Definition: model.cc:183
FD_C_Mat FD_C_Cstr float * rec_score
Definition: model.cc:62
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_RecognizerWrapper * FD_C_CreateRecognizerWrapper(const char *model_file, const char *params_file, const char *label_path, FD_C_RuntimeOptionWrapper *fd_c_runtime_option_wrapper, const FD_C_ModelFormat model_format)
Create a new FD_C_RecognizerWrapper object.
Definition: model.cc:40
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_PPOCRv3Wrapper * FD_C_CreatePPOCRv3Wrapper(FD_C_DBDetectorWrapper *det_model, FD_C_ClassifierWrapper *cls_model, FD_C_RecognizerWrapper *rec_model)
Set up the detection model path, classification model path and recognition model path respectively...
Definition: model.cc:397
struct FD_C_PPOCRv3Wrapper FD_C_PPOCRv3Wrapper
Definition: model.h:290
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_RecognizerWrapperBatchPredict(__fd_keep FD_C_RecognizerWrapper *fd_c_recognizer_wrapper, FD_C_OneDimMat imgs, FD_C_OneDimArrayCstr *texts, FD_C_OneDimArrayFloat *rec_scores)
Predict the ocr results for a batch of input images.
FD_C_OneDimMat FD_C_OneDimArrayCstr FD_C_OneDimArrayFloat * rec_scores
Definition: model.cc:83
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_ClassifierWrapper * FD_C_CreateClassifierWrapper(const char *model_file, const char *params_file, FD_C_RuntimeOptionWrapper *fd_c_runtime_option_wrapper, const FD_C_ModelFormat model_format)
Create a new FD_C_ClassifierWrapper object.
Definition: model.cc:149
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_ClassifierWrapperPredict(__fd_keep FD_C_ClassifierWrapper *fd_c_classifier_wrapper, FD_C_Mat img, int32_t *cls_label, float *cls_score)
Predict the input image and get OCR classification model cls_result.
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_PPOCRv2WrapperPredict(__fd_keep FD_C_PPOCRv2Wrapper *fd_c_ppocrv2_wrapper, FD_C_Mat img, FD_C_OCRResult *result)
Predict the input image and get OCR result.
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_PPOCRv2WrapperBatchPredict(__fd_keep FD_C_PPOCRv2Wrapper *fd_c_ppocrv2_wrapper, FD_C_OneDimMat imgs, FD_C_OneDimOCRResult *batch_result)
BatchPredict the input image and get OCR result.
FD_C_OneDimMat FD_C_OneDimArrayInt32 FD_C_OneDimArrayFloat * cls_scores
Definition: model.cc:184
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_PPOCRv3WrapperPredict(__fd_keep FD_C_PPOCRv3Wrapper *fd_c_ppocrv3_wrapper, FD_C_Mat img, FD_C_OCRResult *result)
Predict the input image and get OCR result.
Definition: types_internal.h:26
FD_C_Mat int32_t * cls_label
Definition: model.cc:170
FD_C_OneDimMat imgs
Definition: model.cc:82
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_ClassifierWrapperBatchPredict(__fd_keep FD_C_ClassifierWrapper *fd_c_classifier_wrapper, FD_C_OneDimMat imgs, FD_C_OneDimArrayInt32 *cls_labels, FD_C_OneDimArrayFloat *cls_scores)
BatchPredict the input image and get OCR classification model cls_result.
FD_C_Mat img
Definition: model.cc:61
FD_C_OneDimMat FD_C_ThreeDimArrayInt32 * det_results
Definition: model.cc:289
struct FD_C_RecognizerWrapper FD_C_RecognizerWrapper
Definition: model.h:29
struct FD_C_PPOCRv2Wrapper FD_C_PPOCRv2Wrapper
Definition: model.h:231
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_ClassifierWrapperBatchPredictWithIndex(__fd_keep FD_C_ClassifierWrapper *fd_c_classifier_wrapper, FD_C_OneDimMat imgs, FD_C_OneDimArrayInt32 *cls_labels, FD_C_OneDimArrayFloat *cls_scores, size_t start_index, size_t end_index)
#define OCR_DECLARE_INITIALIZED_FUNCTION(model_type, wrapper_var_name)
Definition: base_define.h:20
FD_C_Mat int32_t float * cls_score
Definition: model.cc:171
#define __fd_keep
Definition: fd_common.h:55
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_PPOCRv2Wrapper * FD_C_CreatePPOCRv2Wrapper(FD_C_DBDetectorWrapper *det_model, FD_C_ClassifierWrapper *cls_model, FD_C_RecognizerWrapper *rec_model)
Set up the detection model path, classification model path and recognition model path respectively...
Definition: model.cc:323
#define OCR_DECLARE_DESTROY_WRAPPER_FUNCTION(model_type, wrapper_var_name)
Definition: base_define.h:17
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_DBDetectorWrapperPredict(__fd_keep FD_C_DBDetectorWrapper *fd_c_dbdetector_wrapper, FD_C_Mat img, FD_C_TwoDimArrayInt32 *boxes_result)
Predict the input image and get OCR detection model result.
#define __fd_give
Definition: fd_common.h:37
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_DBDetectorWrapperBatchPredict(__fd_keep FD_C_DBDetectorWrapper *fd_c_dbdetector_wrapper, FD_C_OneDimMat imgs, FD_C_ThreeDimArrayInt32 *det_results)
BatchPredict the input image and get OCR detection model result.
void * FD_C_Mat
Definition: fd_type.h:88
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_PPOCRv3WrapperBatchPredict(__fd_keep FD_C_PPOCRv3Wrapper *fd_c_ppocrv3_wrapper, FD_C_OneDimMat imgs, FD_C_OneDimOCRResult *batch_result)
BatchPredict the input image and get OCR result.