From 0ec57f65cbfe7ccda2d063b63586b6c921c10c28 Mon Sep 17 00:00:00 2001 From: leiqing <54695910+leiqing1@users.noreply.github.com> Date: Thu, 8 Sep 2022 23:27:02 +0800 Subject: [PATCH] Update README.md --- README.md | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 7be8905cb..30d763a36 100644 --- a/README.md +++ b/README.md @@ -100,22 +100,21 @@ wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/0000000 ``` * Test inference resultsTest inference results - - ```python - # For deployment of GPU/TensorRT, please refer to examples/vision/detection/paddledetection/python - import cv2 - import fastdeploy.vision as vision - -model = vision.detection.PPYOLOE("ppyoloe_crn_l_300e_coco/model.pdmodel", +```python + # For deployment of GPU/TensorRT, please refer to examples/vision/detection/paddledetection/python + import cv2 + import fastdeploy.vision as vision + + model = vision.detection.PPYOLOE("ppyoloe_crn_l_300e_coco/model.pdmodel", "ppyoloe_crn_l_300e_coco/model.pdiparams", "ppyoloe_crn_l_300e_coco/infer_cfg.yml") -im = cv2.imread("000000014439.jpg") -result = model.predict(im.copy()) -print(result) + im = cv2.imread("000000014439.jpg") + result = model.predict(im.copy()) + print(result) -vis_im = vision.vis_detection(im, result, score_threshold=0.5) -cv2.imwrite("vis_image.jpg", vis_im) + vis_im = vision.vis_detection(im, result, score_threshold=0.5) + cv2.imwrite("vis_image.jpg", vis_im) ``` ### A Quick Start for C++ SDK