mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-16 21:51:31 +08:00
[C API] Supplement C api for models (#1317)
* add batch_predict and initialized api for c * add batch_predict and result str in C api * modify visualization function * add micro to add models batchify * refactor and add models for ppdet others * add base define * fix * refine predict api
This commit is contained in:
@@ -54,12 +54,36 @@ FASTDEPLOY_CAPI_EXPORT extern void FD_C_DestroyPaddleClasModelWrapper(
|
||||
*
|
||||
* \param[in] fd_c_paddleclas_model_wrapper pointer to FD_C_PaddleClasModelWrapper object
|
||||
* \param[in] img pointer to cv::Mat image
|
||||
* \param[in] fd_c_classify_result_wrapper pointer to FD_C_PaddleClasModelWrapper object, which stores the result.
|
||||
* \param[in] fd_c_classify_result pointer to FD_C_ClassifyResult object, which stores the result.
|
||||
*/
|
||||
|
||||
FASTDEPLOY_CAPI_EXPORT extern FD_C_Bool FD_C_PaddleClasModelWrapperPredict(
|
||||
__fd_take FD_C_PaddleClasModelWrapper* fd_c_paddleclas_model_wrapper,
|
||||
FD_C_Mat img, FD_C_ClassifyResultWrapper* fd_c_classify_result_wrapper);
|
||||
__fd_keep FD_C_PaddleClasModelWrapper* fd_c_paddleclas_model_wrapper,
|
||||
FD_C_Mat img, FD_C_ClassifyResult* fd_c_classify_result_wrapper);
|
||||
|
||||
/** \brief Check if the model is initialized successfully
|
||||
*
|
||||
* \param[in] fd_c_paddleclas_model_wrapper pointer to FD_C_PaddleClasModelWrapper object
|
||||
*
|
||||
* \return Return a bool of value true if initialized successfully
|
||||
*/
|
||||
|
||||
FASTDEPLOY_CAPI_EXPORT extern FD_C_Bool FD_C_PaddleClasModelWrapperInitialized(
|
||||
__fd_keep FD_C_PaddleClasModelWrapper* fd_c_paddleclas_model_wrapper);
|
||||
|
||||
|
||||
/** \brief Predict the classification results for a batch of input images
|
||||
*
|
||||
* \param[in] fd_c_paddleclas_model_wrapper pointer to FD_C_PaddleClasModelWrapper object
|
||||
* \param[in] imgs The input image list, each element comes from cv::imread()
|
||||
* \param[in] results The output classification result list
|
||||
* \return true if the prediction successed, otherwise false
|
||||
*/
|
||||
FASTDEPLOY_CAPI_EXPORT extern FD_C_Bool FD_C_PaddleClasModelWrapperBatchPredict(
|
||||
__fd_keep FD_C_PaddleClasModelWrapper* fd_c_paddleclas_model_wrapper,
|
||||
FD_C_OneDimMat imgs,
|
||||
FD_C_OneDimClassifyResult* results);
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
Reference in New Issue
Block a user