
* 添加paddleclas模型 * 更新README_CN * 更新README_CN * 更新README * update get_model.sh * update get_models.sh * update paddleseg models * update paddle_seg models * update paddle_seg models * modified test resources * update benchmark_gpu_trt.sh * add paddle detection * add paddledetection to benchmark * modified benchmark cmakelists * update benchmark scripts * modified benchmark function calling * modified paddledetection documents * upadte getmodels.sh * add PaddleDetectonModel * reset examples/paddledetection * resolve conflict * update pybind * resolve conflict * fix bug * delete debug mode * update checkarch log * update trt inputs example * Update README.md * add ppocr_v4 * update ppocr_v4 * update ocr_v4 * update ocr_v4 * update ocr_v4 * update ocr_v4 --------- Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com>
C API tutorial
This directory is the implementation of FastDeploy C SDK, which provides solutions for scenarios where users need C API.
How to compile and install
When compiling the fastdeploy library, turn on the compile option --WITH_CAPI=ON to start compiling for this directory. The compiled C library and fastdeploy library are in the same dynamic library file, such as libfastdeploy.a under Linux. For example, to compile the CPU version of fastdeploy and compile the C API into the library, you can use the following command
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
mkdir build && cd build
cmake .. -DENABLE_ORT_BACKEND=ON \
-DENABLE_PADDLE_BACKEND=ON \
-DENABLE_OPENVINO_BACKEND=ON \
-DCMAKE_INSTALL_PREFIX=${PWD}/compiled_fastdeploy_sdk \
-DENABLE_VISION=ON \
-DWITH_CAPI=ON \
-DOPENCV_DIRECTORY=/usr/lib/x86_64-linux-gnu/cmake/opencv4 \
-DENABLE_TEXT=ON
make -j12
make install
For more details about compiling the fastdeploy library, please refer to the documentation
How to use
The header files of the provided C API can be used. If it is manually compiled and installed, such as the above command, after make install
, the header files will be in the directory ${PWD}/compiled_fastdeploy_sdk/include/fastdeploy_capi/. If it is a downloaded precompiled library, after decompression, include/fastdeploy_capi/ is the header file of the C API. For usage examples, please refer to the use cases under examples