mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-05 16:48:03 +08:00
English | 简体中文
PaddleSeg C++ Deployment Example
infer.cc
in this directory provides a quick example of accelerated deployment of the pp_liteseg model on SOPHGO BM1684x.
Before deployment, the following two steps need to be confirmed:
- Hardware and software environment meets the requirements.
- Compile the FastDeploy repository from scratch according to the development environment.
For the above steps, please refer to How to Build SOPHGO Deployment Environment.
Generate Basic Directory Files
The routine consists of the following parts:
.
├── CMakeLists.txt
├── build # Compile Folder
├── image # Folder for images
├── infer.cc
└── model # Folder for models
Compile
Compile and Copy SDK to folder thirdpartys
Please refer to How to Build SOPHGO Deployment Environment to compile SDK.After compiling, the fastdeploy-0.0.3 directory will be created in the build directory.
Copy model and configuration files to folder Model
Convert Paddle model to SOPHGO bmodel model. For the conversion steps, please refer to Document. Please copy the converted SOPHGO bmodel to folder model.
Prepare Test Images to folder image
wget https://paddleseg.bj.bcebos.com/dygraph/demo/cityscapes_demo.png
cp cityscapes_demo.png ./images
Compile example
cd build
cmake .. -DFASTDEPLOY_INSTALL_DIR=${PWD}/fastdeploy-0.0.3
make
Running Routines
./infer_demo model images/cityscapes_demo.png