English | 简体中文
Two steps before deployment
-
- Software and hardware should meet the requirements. Please refer to FastDeploy Environment Requirements
This directory provides examples that infer.py
fast finishes the deployment of SCRFD on RKNPU. The script is as follows
Refer to SCRFD model conversion to convert SCRFD ONNX model to RKNN model and move it to this directory.
After copying model files, enter the following command to run it: RKNPU2 Python example
# Download the example code for deployment
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/examples/vision/facedet/scrfd/rknpu2/python
# Download images
wget https://raw.githubusercontent.com/DefTruth/lite.ai.toolkit/main/examples/lite/resources/test_lite_face_detector_3.jpg
# Inference
python3 infer.py --model_file ./scrfd_500m_bnkps_shape640x640_rk3588.rknn \
--image test_lite_face_detector_3.jpg
The visualized result after running is as follows
The model needs to be in NHWC format on RKNPU. The normalized image will be embedded in the RKNN model. Therefore, when we deploy with FastDeploy, call DisablePermute(C++) or `disable_permute(Python) to disable normalization and data format conversion during preprocessing.