mirror of
https://github.com/PaddlePaddle/FastDeploy.git
synced 2025-10-25 17:40:35 +08:00
@@ -12,11 +12,10 @@ This directory provides `infer.py` for a quick example of Picodet deployment on
|
||||
git clone https://github.com/PaddlePaddle/FastDeploy.git
|
||||
cd FastDeploy/examples/vision/detection/paddledetection/rknpu2/python
|
||||
|
||||
# Download images.
|
||||
# Download images and model
|
||||
wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg
|
||||
|
||||
# copy model
|
||||
cp -r ./picodet_s_416_coco_lcnet /path/to/FastDeploy/examples/vision/detection/rknpu2detection/paddledetection/python
|
||||
wget https://bj.bcebos.com/paddlehub/fastdeploy/rknpu2/picodet_s_416_coco_lcnet.zip
|
||||
unzip picodet_s_416_coco_lcnet.zip
|
||||
|
||||
# Inference.
|
||||
python3 infer.py --model_file ./picodet_s_416_coco_lcnet/picodet_s_416_coco_lcnet_rk3568.rknn \
|
||||
|
||||
@@ -15,8 +15,10 @@ cd FastDeploy/examples/vision/detection/paddledetection/rknpu2/python
|
||||
# 下载图片
|
||||
wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg
|
||||
|
||||
# copy model
|
||||
cp -r ./picodet_s_416_coco_lcnet /path/to/FastDeploy/examples/vision/detection/rknpu2detection/paddledetection/python
|
||||
# 下载PPYOLOE模型文件和测试图片
|
||||
wget https://bj.bcebos.com/paddlehub/fastdeploy/rknpu2/picodet_s_416_coco_lcnet.zip
|
||||
unzip picodet_s_416_coco_lcnet.zip
|
||||
wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/000000014439.jpg
|
||||
|
||||
# 推理
|
||||
python3 infer.py --model_file ./picodet_s_416_coco_lcnet/picodet_s_416_coco_lcnet_rk3568.rknn \
|
||||
|
||||
@@ -55,7 +55,7 @@ if __name__ == "__main__":
|
||||
model_format=fd.ModelFormat.RKNN)
|
||||
model.preprocessor.disable_normalize()
|
||||
model.preprocessor.disable_permute()
|
||||
model.postprocessor.apply_decode_and_nms()
|
||||
model.postprocessor.apply_nms()
|
||||
|
||||
# 预测图片分割结果
|
||||
im = cv2.imread(args.image)
|
||||
|
||||
Reference in New Issue
Block a user