Files
FastDeploy/tutorials/multi_thread/cpp/single_model
charl-u 29e93fa2dc [Doc]Check and modify broken links in documents (#1207)
* Update README_CN.md

之前的readme cn复制错了,导致存在死链

* Update README_CN.md

* Update README_CN.md

* Update README.md

* Update README.md

* Update README.md

* Update README_CN.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update RNN.md

* Update RNN_CN.md

* Update WebDemo.md

* Update WebDemo_CN.md

* Update install_rknn_toolkit2.md

* Update export.md

* Update use_cpp_sdk_on_android.md

* Update README.md

* Update README_Pу́сский_язы́к.md

* Update README_Pу́сский_язы́к.md

* Update README_Pу́сский_язы́к.md

* Update README_Pу́сский_язы́к.md

* Update README_हिन्दी.md

* Update README_日本語.md

* Update README_한국인.md

* Update README_日本語.md

* Update README_CN.md

* Update README_CN.md

* Update README.md

* Update README_CN.md

* Update README.md

* Update README.md

* Update README_CN.md

* Update README_CN.md

* Update README_CN.md

* Update README_CN.md
2023-02-01 15:49:23 +08:00
..

English | 中文

Example of PaddleClas models Python Deployment

This directory provides example file multi_thread.cc to fast deploy PaddleClas models on CPU/GPU and GPU accelerated by TensorRT.

Before deployment, two steps require confirmation.

Taking ResNet50_vd inference on Linux as an example, the compilation test can be completed by executing the following command in this directory. FastDeploy version 0.7.0 or above (x.x.x>=0.7.0) is required to support this model.

mkdir build
cd build
# # Download FastDeploy precompiled library. Users can choose your appropriate version in the`FastDeploy Precompiled Library` mentioned above
wget https://bj.bcebos.com/fastdeploy/release/cpp/fastdeploy-linux-x64-x.x.x.tgz
tar xvf fastdeploy-linux-x64-x.x.x.tgz
cmake .. -DFASTDEPLOY_INSTALL_DIR=${PWD}/fastdeploy-linux-x64-x.x.x
make -j

# Download the ResNet50_vd model file and test images
wget https://bj.bcebos.com/paddlehub/fastdeploy/ResNet50_vd_infer.tgz
tar -xvf ResNet50_vd_infer.tgz
wget https://gitee.com/paddlepaddle/PaddleClas/raw/release/2.4/deploy/images/ImageNet/ILSVRC2012_val_00000010.jpeg


# CPU multi-thread inference
./multi_thread_demo ResNet50_vd_infer ILSVRC2012_val_00000010.jpeg 0 1
# GPU multi-thread inference
./multi_thread_demo ResNet50_vd_infer ILSVRC2012_val_00000010.jpeg 1 1
# TensorRT multi-inference inference on GPU
./multi_thread_demo ResNet50_vd_infer ILSVRC2012_val_00000010.jpeg 2 1

Notice: the last number in above command is thread number

The above command works for Linux or MacOS. For SDK in Windows, refer to:

The result returned after running is as follows

Thread Id: 0
ClassifyResult(
label_ids: 153,
scores: 0.686229,
)