diff --git a/modelcenter/PP-PicoDet/introduction_cn.ipynb b/modelcenter/PP-PicoDet/introduction_cn.ipynb index b0c9dff028a8a2d1b0f0a545736eb52c2843e1d5..e315d7337e852990a17e4bbc67c34005fdc7b194 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 3fa7bf09777f3de78b4924cb65fe798ccdc22698..c6ea5212a6f5decdfc663422f619e688bc81d91e 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." ] },