From aeaad8ef837798f7df8749ce6701aef186c239a4 Mon Sep 17 00:00:00 2001 From: jiangjiajun Date: Wed, 3 Aug 2022 08:25:24 +0000 Subject: [PATCH] add model --- csrcs/fastdeploy/fastdeploy_runtime.cc | 2 +- csrcs/fastdeploy/vision/ppdet/ppyoloe.h | 4 ++++ examples/resources/.gitignore | 6 +++++- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/csrcs/fastdeploy/fastdeploy_runtime.cc b/csrcs/fastdeploy/fastdeploy_runtime.cc index 1f782a54ae..9207d5cae6 100644 --- a/csrcs/fastdeploy/fastdeploy_runtime.cc +++ b/csrcs/fastdeploy/fastdeploy_runtime.cc @@ -212,7 +212,6 @@ void RuntimeOption::SetTrtCacheFile(const std::string& cache_file_path) { trt_serialize_file = cache_file_path; } - bool Runtime::Init(const RuntimeOption& _option) { option = _option; if (option.model_format == Frontend::AUTOREC) { @@ -274,6 +273,7 @@ void Runtime::CreatePaddleBackend() { pd_option.mkldnn_cache_size = option.pd_mkldnn_cache_size; pd_option.use_gpu = (option.device == Device::GPU) ? true : false; pd_option.gpu_id = option.device_id; + pd_option.cpu_thread_num = option.cpu_thread_num; FDASSERT(option.model_format == Frontend::PADDLE, "PaddleBackend only support model format of Frontend::PADDLE."); backend_ = new PaddleBackend(); diff --git a/csrcs/fastdeploy/vision/ppdet/ppyoloe.h b/csrcs/fastdeploy/vision/ppdet/ppyoloe.h index 6c79755d14..6a452af563 100644 --- a/csrcs/fastdeploy/vision/ppdet/ppyoloe.h +++ b/csrcs/fastdeploy/vision/ppdet/ppyoloe.h @@ -60,6 +60,10 @@ class FASTDEPLOY_DECL PPYOLOE : public FastDeployModel { int64_t nms_top_k = 10000; bool normalized = true; bool has_nms_ = false; + + // This function will used to check if this model contains multiclass_nms + // and get parameters from the operator + void GetNmsInfo(); }; // Read configuration and build pipeline to process input image diff --git a/examples/resources/.gitignore b/examples/resources/.gitignore index f8c24f7a60..aadf702529 100644 --- a/examples/resources/.gitignore +++ b/examples/resources/.gitignore @@ -6,6 +6,10 @@ models/*.pd* models/*.engine models/*.trt models/*.nb +models/*param* +models/*model* outputs/*.jpg outputs/*.jpeg -outputs/*.png \ No newline at end of file +outputs/*.png +outputs/*.txt +outputs/*.json \ No newline at end of file