Skip to content

Commit

Permalink
Revert "修复C++ Inference Example中的demo存在的错误" (#292)
Browse files Browse the repository at this point in the history
Revert "修复C++ Inference Example中的demo存在的错误 (#290)"

This reverts commit ef1d1d1.
  • Loading branch information
jiangjiajun committed Sep 28, 2022
1 parent ef1d1d1 commit 8115a4a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 29 deletions.
26 changes: 12 additions & 14 deletions README_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,20 +131,18 @@ wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/0000000
// GPU/TensorRT部署参考 examples/vision/detection/paddledetection/cpp
#include "fastdeploy/vision.h"

int main(int argc, char *argv[]) {

namespace vision = fastdeploy::vision;
auto 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");
auto im = cv::imread("000000014439.jpg");
cv::cvtColor(im,im,cv::COLOR_BGR2RGB);
vision::DetectionResult res;
model.Predict(&im, &res);

auto vis_im = vision::Visualize::VisDetection(im, res, 0.5);
cv::imwrite("vis_image.jpg", vis_im);
return 0;
int main(int argc, char* argv[]) {
namespace vision = fastdeploy::vision;
auto 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");
auto im = cv::imread("000000014439.jpg");

vision::DetectionResult res;
model.Predict(&im, &res)

auto vis_im = vision::Visualize::VisDetection(im, res, 0.5);
cv::imwrite("vis_image.jpg", vis_im);
}
```
Expand Down
28 changes: 13 additions & 15 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,21 +140,19 @@ wget https://gitee.com/paddlepaddle/PaddleDetection/raw/release/2.4/demo/0000000
// For GPU/TensorRT deployment, please refer to examples/vision/detection/paddledetection/cpp
#include "fastdeploy/vision.h"

int main(int argc, char *argv[]) {

namespace vision = fastdeploy::vision;
auto 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");
auto im = cv::imread("000000014439.jpg");
cv::cvtColor(im,im,cv::COLOR_BGR2RGB);
vision::DetectionResult res;
model.Predict(&im, &res);

auto vis_im = vision::Visualize::VisDetection(im, res, 0.5);
cv::imwrite("vis_image.jpg", vis_im);
return 0;
}
int main(int argc, char* argv[]) {
namespace vision = fastdeploy::vision;
auto 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");
auto im = cv::imread("000000014439.jpg");

vision::DetectionResult res;
model.Predict(&im, &res)

auto vis_im = vision::Visualize::VisDetection(im, res, 0.5);
cv::imwrite("vis_image.jpg", vis_im);
}
```
### For more deployment models, please refer to [Vision Model Deployment Examples](examples/vision) .
Expand Down

0 comments on commit 8115a4a

Please sign in to comment.