[Bug Fix] Fix the error of ppdet example (#955)

* * onnx推理时不需要decode
* 配置文件信息错误

* * 修复c++ example 文档的部分错误
This commit is contained in:
Zheng_Bicheng
2022-12-22 19:02:23 +08:00
committed by GitHub
parent 0f4f29375e
commit 1323595b10
2 changed files with 3 additions and 6 deletions

View File

@@ -1,6 +1,6 @@
# PaddleDetection C++部署示例
本目录下提供`infer_xxxxx.cc`快速完成PPDetection模型在Rockchip板子上上通过二代NPU加速部署的示例。
本目录下提供`infer_picodet.cc`快速完成PPDetection模型在Rockchip板子上上通过二代NPU加速部署的示例。
在部署前,需确认以下两个步骤:
@@ -17,9 +17,7 @@
├── CMakeLists.txt
├── build # 编译文件夹
├── image # 存放图片的文件夹
├── infer_cpu_npu.cc
├── infer_cpu_npu.h
├── main.cc
├── infer_picodet.cc
├── model # 存放模型文件的文件夹
└── thirdpartys # 存放sdk的文件夹
```

View File

@@ -19,14 +19,13 @@
void ONNXInfer(const std::string& model_dir, const std::string& image_file) {
std::string model_file = model_dir + "/picodet_s_416_coco_lcnet.onnx";
std::string params_file;
std::string config_file = model_dir + "/deploy.yaml";
std::string config_file = model_dir + "/infer_cfg.yml";
auto option = fastdeploy::RuntimeOption();
option.UseCpu();
auto format = fastdeploy::ModelFormat::ONNX;
auto model = fastdeploy::vision::detection::PicoDet(
model_file, params_file, config_file,option,format);
model.GetPostprocessor().ApplyDecodeAndNMS();
fastdeploy::TimeCounter tc;
tc.Start();