[Model] add function for setting anchor rknpu2 (#1728)

* add function for setting anchor rknpu2
add more demo for rknpu2
fixed md error

* Update config.h

---------

Co-authored-by: DefTruth <31974251+DefTruth@users.noreply.github.com>
This commit is contained in:
Zheng-Bicheng
2023-04-04 20:33:06 +08:00
committed by GitHub
parent a2141d0d2c
commit 109d1046ae
15 changed files with 551 additions and 96 deletions

View File

@@ -8,18 +8,29 @@ Two steps before deployment
This directory provides examples that `infer.py` fast finishes the deployment of Picodet on RKNPU. The script is as follows
```bash
# Download the example code for deployment
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy/examples/vision/detection/rkyolo/python
# Download images
# download picture
wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg
# copy model
cp -r ./model /path/to/FastDeploy/examples/vision/detection/rkyolo/python
# infer yolov5
wget https://bj.bcebos.com/paddlehub/fastdeploy/rknpu2/yolov5-s-relu.zip
unzip yolov5-s-relu.zip
python3 infer_rkyolov5.py --model_file yolov5-s-relu/yolov5s_relu_tk2_RK3588_i8.rknn \
--image 000000014439.jpg
# Inference
python3 infer.py --model_file /path/to/model --image /path/to/000000014439.jpg
# infer yolov7
wget https://bj.bcebos.com/paddlehub/fastdeploy/rknpu2/yolov7-tiny.zip
unzip yolov7-tiny.zip
python3 infer_rkyolov7.py --model_file yolov7-tiny/yolov7-tiny_tk2_RK3588_i8.rknn \
--image 000000014439.jpg
# infer yolox
wget https://bj.bcebos.com/paddlehub/fastdeploy/rknpu2/yolox-s.zip
unzip yolox-s.zip
python3 infer_rkyolox.py --model_file yolox-s/yoloxs_tk2_RK3588_i8.rknn \
--image 000000014439.jpg
```
## common problem