FastDeploy  latest
Fast & Easy to Deploy!
model.h
Go to the documentation of this file.
1 // Copyright (c) 2023 PaddlePaddle Authors. All Rights Reserved.
2 //
3 // Licensed under the Apache License, Version 2.0 (the "License");
4 // you may not use this file except in compliance with the License.
5 // You may obtain a copy of the License at
6 //
7 // http://www.apache.org/licenses/LICENSE-2.0
8 //
9 // Unless required by applicable law or agreed to in writing, software
10 // distributed under the License is distributed on an "AS IS" BASIS,
11 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 // See the License for the specific language governing permissions and
13 // limitations under the License.
14 
15 #pragma once
16 
21 
23 
24 #ifdef __cplusplus
25 extern "C" {
26 #endif
27 
41  const char* model_file, const char* params_file, const char* config_file,
42  FD_C_RuntimeOptionWrapper* fd_c_runtime_option_wrapper,
43  const FD_C_ModelFormat model_format);
44 
51  __fd_take FD_C_PaddleClasModelWrapper* fd_c_paddleclas_model_wrapper);
52 
61  __fd_keep FD_C_PaddleClasModelWrapper* fd_c_paddleclas_model_wrapper,
62  FD_C_Mat img, FD_C_ClassifyResult* fd_c_classify_result_wrapper);
63 
72  __fd_keep FD_C_PaddleClasModelWrapper* fd_c_paddleclas_model_wrapper);
73 
74 
83  __fd_keep FD_C_PaddleClasModelWrapper* fd_c_paddleclas_model_wrapper,
86 
87 
88 #ifdef __cplusplus
89 } // extern "C"
90 #endif
int8_t FD_C_Bool
Definition: fd_common.h:58
#define FASTDEPLOY_CAPI_EXPORT
Definition: fd_common.h:27
FD_C_OneDimMat FD_C_OneDimOCRResult * results
Definition: model.cc:367
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_PaddleClasModelWrapperPredict(__fd_keep FD_C_PaddleClasModelWrapper *fd_c_paddleclas_model_wrapper, FD_C_Mat img, FD_C_ClassifyResult *fd_c_classify_result_wrapper)
Predict the classification result for an input image.
FASTDEPLOY_CAPI_EXPORT void FD_C_DestroyPaddleClasModelWrapper(__fd_take FD_C_PaddleClasModelWrapper *fd_c_paddleclas_model_wrapper)
Destroy a FD_C_PaddleClasModelWrapper object.
FASTDEPLOY_CAPI_EXPORT __fd_give FD_C_PaddleClasModelWrapper * FD_C_CreatePaddleClasModelWrapper(const char *model_file, const char *params_file, const char *config_file, FD_C_RuntimeOptionWrapper *fd_c_runtime_option_wrapper, const FD_C_ModelFormat model_format)
Create a new FD_C_PaddleClasModelWrapper object.
Definition: model.cc:23
Definition: types_internal.h:26
FD_C_OneDimMat imgs
Definition: model.cc:82
struct FD_C_PaddleClasModelWrapper FD_C_PaddleClasModelWrapper
Definition: model.h:22
FD_C_Mat img
Definition: model.cc:61
Definition: result.h:29
Definition: fd_type.h:90
Definition: result.h:35
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_PaddleClasModelWrapperBatchPredict(__fd_keep FD_C_PaddleClasModelWrapper *fd_c_paddleclas_model_wrapper, FD_C_OneDimMat imgs, FD_C_OneDimClassifyResult *results)
Predict the classification results for a batch of input images.
#define __fd_keep
Definition: fd_common.h:55
#define __fd_take
Definition: fd_common.h:46
#define __fd_give
Definition: fd_common.h:37
FASTDEPLOY_CAPI_EXPORT FD_C_Bool FD_C_PaddleClasModelWrapperInitialized(__fd_keep FD_C_PaddleClasModelWrapper *fd_c_paddleclas_model_wrapper)
Check if the model is initialized successfully.
void * FD_C_Mat
Definition: fd_type.h:88