From 6a26cf28038321ee1665d99eceffa9fc90b4ae0e Mon Sep 17 00:00:00 2001 From: wangxinxin08 <69842442+wangxinxin08@users.noreply.github.com> Date: Tue, 22 Nov 2022 18:33:09 +0800 Subject: [PATCH] add picodet inference (#5647) --- modelcenter/PP-PicoDet/introduction_cn.ipynb | 22 ++++++++++++++++++++ modelcenter/PP-PicoDet/introduction_en.ipynb | 22 ++++++++++++++++++++ 2 files changed, 44 insertions(+) diff --git a/modelcenter/PP-PicoDet/introduction_cn.ipynb b/modelcenter/PP-PicoDet/introduction_cn.ipynb index b0c9dff0..e315d733 100644 --- a/modelcenter/PP-PicoDet/introduction_cn.ipynb +++ b/modelcenter/PP-PicoDet/introduction_cn.ipynb @@ -95,6 +95,28 @@ "metadata": {}, "source": [ "### 3.2 部署\n", + "\n", + "执行以下命令快速使用PaddleInference进行部署" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# 导出模型\n", + "!python tools/export_model.py -c configs/picodet/picodet_s_320_coco_lcnet.yml -o weights=https://paddledet.bj.bcebos.com/models/picodet_s_320_coco_lcnet.pdparams\n", + "\n", + "# 推理\n", + "!wget -P demo_input -N https://paddledet.bj.bcebos.com/modelcenter/images/General/000000014439.jpg\n", + "!python deploy/python/infer.py --model_dir=output_inference/picodet_s_320_coco_lcnet --image_file=demo_input/000000014439.jpg --device=GPU --output_dir=demo_output" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "PP-Picodet支持多种方式部署,具体可以参考[PP-Picodet部署](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/configs/picodet/README.md#%E9%83%A8%E7%BD%B2)。" ] }, diff --git a/modelcenter/PP-PicoDet/introduction_en.ipynb b/modelcenter/PP-PicoDet/introduction_en.ipynb index 3fa7bf09..c6ea5212 100644 --- a/modelcenter/PP-PicoDet/introduction_en.ipynb +++ b/modelcenter/PP-PicoDet/introduction_en.ipynb @@ -86,6 +86,28 @@ "metadata": {}, "source": [ "### 3.2 Deployment\n", + "\n", + "Run the following command to quickly deploy the model using PaddleInference" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "# export the model\n", + "!python tools/export_model.py -c configs/picodet/picodet_s_320_coco_lcnet.yml -o weights=https://paddledet.bj.bcebos.com/models/picodet_s_320_coco_lcnet.pdparams\n", + "\n", + "# inference\n", + "!wget -P demo_input -N https://paddledet.bj.bcebos.com/modelcenter/images/General/000000014439.jpg\n", + "!python deploy/python/infer.py --model_dir=output_inference/picodet_s_320_coco_lcnet --image_file=demo_input/000000014439.jpg --device=GPU --output_dir=demo_output" + ] + }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ "PP-Picodet supports multiple deployment methods, please refer to [PP-Picodet deployment](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.5/configs/picodet/README_en.md#deployment) for details." ] }, -- GitLab