mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-16 13:41:30 +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:
@@ -30,6 +30,11 @@ typedef struct FD_C_ClassifyResult {
|
||||
FD_C_ResultType type;
|
||||
} FD_C_ClassifyResult;
|
||||
|
||||
typedef struct FD_C_OneDimClassifyResult {
|
||||
size_t size;
|
||||
FD_C_ClassifyResult* data;
|
||||
} FD_C_OneDimClassifyResult;
|
||||
|
||||
typedef struct FD_C_Mask {
|
||||
FD_C_OneDimArrayUint8 data;
|
||||
FD_C_OneDimArrayInt64 shape;
|
||||
@@ -50,6 +55,11 @@ typedef struct FD_C_DetectionResult {
|
||||
FD_C_ResultType type;
|
||||
} FD_C_DetectionResult;
|
||||
|
||||
typedef struct FD_C_OneDimDetectionResult {
|
||||
size_t size;
|
||||
FD_C_DetectionResult* data;
|
||||
} FD_C_OneDimDetectionResult;
|
||||
|
||||
// Classification Results
|
||||
|
||||
/** \brief Create a new FD_C_ClassifyResultWrapper object
|
||||
@@ -95,6 +105,16 @@ FASTDEPLOY_CAPI_EXPORT extern __fd_give FD_C_ClassifyResultWrapper*
|
||||
FD_C_CreateClassifyResultWrapperFromData(
|
||||
__fd_keep FD_C_ClassifyResult* fd_c_classify_result);
|
||||
|
||||
/** \brief Print ClassifyResult formated information
|
||||
*
|
||||
* \param[in] fd_c_classify_result_wrapper pointer to FD_C_ClassifyResultWrapper object
|
||||
* \return Return a string pointer
|
||||
*/
|
||||
|
||||
FASTDEPLOY_CAPI_EXPORT extern __fd_give char*
|
||||
FD_C_ClassifyResultWrapperStr(
|
||||
__fd_keep FD_C_ClassifyResultWrapper* fd_c_classify_result_wrapper);
|
||||
|
||||
// Detection Results
|
||||
|
||||
/** \brief Create a new FD_C_DetectionResultWrapper object
|
||||
@@ -140,6 +160,16 @@ FASTDEPLOY_CAPI_EXPORT extern __fd_give FD_C_DetectionResultWrapper*
|
||||
FD_C_CreateDetectionResultWrapperFromData(
|
||||
__fd_keep FD_C_DetectionResult* fd_c_detection_result);
|
||||
|
||||
/** \brief Print DetectionResult formated information
|
||||
*
|
||||
* \param[in] fd_c_detection_result_wrapper pointer to FD_C_DetectionResultWrapper object
|
||||
* \return Return a string pointer
|
||||
*/
|
||||
|
||||
FASTDEPLOY_CAPI_EXPORT extern __fd_give char*
|
||||
FD_C_DetectionResultWrapperStr(
|
||||
__fd_keep FD_C_DetectionResultWrapper* fd_c_detection_result_wrapper);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user