mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-07 09:31:35 +08:00

* Create README_CN.md * Update README.md * Update README_CN.md * Create README_CN.md * Update README.md * Create README_CN.md * Update README.md * Create README_CN.md * Update README.md * Create README_CN.md * Update README.md * Create README_CN.md * Update README.md * Create README_CN.md * Update README.md * Create README_CN.md * Update README.md * Update README.md * Update README_CN.md * Create README_CN.md * Update README.md * Update README.md * Update and rename README_en.md to README_CN.md * Update WebDemo.md * Update and rename WebDemo_en.md to WebDemo_CN.md * Update and rename DEVELOPMENT_cn.md to DEVELOPMENT_CN.md * Update DEVELOPMENT_CN.md * Update DEVELOPMENT.md * Update RNN.md * Update and rename RNN_EN.md to RNN_CN.md * Update README.md * Update and rename README_en.md to README_CN.md * Update README.md * Update and rename README_en.md to README_CN.md * Update README.md * Update README_cn.md * Rename README_cn.md to README_CN.md * Update README.md * Update README_cn.md * Rename README_cn.md to README_CN.md * Update export.md * Update and rename export_EN.md to export_CN.md * Update README.md * Update README.md * Create README_CN.md * Update README.md * Update README.md * Update kunlunxin.md * Update classification_result.md * Update classification_result_EN.md * Rename classification_result_EN.md to classification_result_CN.md * Update detection_result.md * Update and rename detection_result_EN.md to detection_result_CN.md * Update face_alignment_result.md * Update and rename face_alignment_result_EN.md to face_alignment_result_CN.md * Update face_detection_result.md * Update and rename face_detection_result_EN.md to face_detection_result_CN.md * Update face_recognition_result.md * Update and rename face_recognition_result_EN.md to face_recognition_result_CN.md * Update headpose_result.md * Update and rename headpose_result_EN.md to headpose_result_CN.md * Update keypointdetection_result.md * Update and rename keypointdetection_result_EN.md to keypointdetection_result_CN.md * Update matting_result.md * Update and rename matting_result_EN.md to matting_result_CN.md * Update mot_result.md * Update and rename mot_result_EN.md to mot_result_CN.md * Update ocr_result.md * Update and rename ocr_result_EN.md to ocr_result_CN.md * Update segmentation_result.md * Update and rename segmentation_result_EN.md to segmentation_result_CN.md * Update README.md * Update README.md * Update quantize.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md * Update README.md
71 lines
2.1 KiB
Markdown
71 lines
2.1 KiB
Markdown
English | [简体中文](README_CN.md)
|
|
# SCRFD C++ Deployment Example
|
|
|
|
This directory provides examples that `infer.cc` fast finishes the deployment of SCRFD on NPU.
|
|
|
|
Two steps before deployment:
|
|
|
|
1. The environment of software and hardware should meet the requirements.
|
|
2. Download the precompiled deployment repo or deploy the FastDeploy repository from scratch according to your development environment.
|
|
|
|
Refer to [RK2 generation NPU deployment repository compilation](../../../../../../docs/cn/build_and_install/rknpu2.md) for the steps above
|
|
|
|
## Generate the base directory file
|
|
|
|
It consists of the following parts
|
|
```text
|
|
.
|
|
├── CMakeLists.txt
|
|
├── build # Compile folder
|
|
├── image # The folder to save images
|
|
├── infer.cc
|
|
├── model # The folder to save model files
|
|
└── thirdpartys # The folder to save sdk
|
|
```
|
|
|
|
Generate the directory first
|
|
```bash
|
|
mkdir build
|
|
mkdir images
|
|
mkdir model
|
|
mkdir thirdpartys
|
|
```
|
|
|
|
## Compile
|
|
|
|
### Compile and copy the SDK into the thirdpartys folder
|
|
|
|
Refer to [RK2 generation NPU deployment repository compilation](../../../../../../docs/cn/build_and_install/rknpu2.md). It will enerate fastdeploy-0.7.0 directory in the build directory after compilation. Move it to the thirdpartys directory.
|
|
|
|
### Copy the model files to the model folder
|
|
Refer to [SCRFD model conversion](../README.md) to convert SCRFD ONNX model to RKNN model and move it to the model folder.
|
|
|
|
### Prepare test images to the image folder
|
|
```bash
|
|
wget https://raw.githubusercontent.com/DefTruth/lite.ai.toolkit/main/examples/lite/resources/test_lite_face_detector_3.jpg
|
|
cp test_lite_face_detector_3.jpg ./images
|
|
```
|
|
|
|
### Compile example
|
|
|
|
```bash
|
|
cd build
|
|
cmake ..
|
|
make -j8
|
|
make install
|
|
```
|
|
## Running routines
|
|
|
|
```bash
|
|
cd ./build/install
|
|
export LD_LIBRARY_PATH=${PWD}/lib:${LD_LIBRARY_PATH}
|
|
./rknpu_test
|
|
```
|
|
The visualized result after running is as follows
|
|
|
|
<img width="640" src="https://user-images.githubusercontent.com/67993288/184301789-1981d065-208f-4a6b-857c-9a0f9a63e0b1.jpg">
|
|
|
|
- [Model Description](../../README.md)
|
|
- [Python Deployment](../python/README.md)
|
|
- [Vision Model Prediction Results](../../../../../../docs/api/vision_results/README.md)
|