From c8aa6d0372d835111f722fd567f4628cb34494bc Mon Sep 17 00:00:00 2001 From: MissPenguin Date: Tue, 10 Aug 2021 08:04:53 +0000 Subject: [PATCH] fix --- deploy/cpp_infer/CMakeLists.txt | 2 -- deploy/cpp_infer/CMakeLists_det.txt | 2 -- deploy/cpp_infer/CMakeLists_rec.txt | 2 -- deploy/cpp_infer/CMakeLists_system.txt | 2 -- deploy/cpp_infer/include/ocr_det.h | 23 +++++++++-------------- 5 files changed, 9 insertions(+), 22 deletions(-) diff --git a/deploy/cpp_infer/CMakeLists.txt b/deploy/cpp_infer/CMakeLists.txt index bfffe1d6..f741d5e8 100644 --- a/deploy/cpp_infer/CMakeLists.txt +++ b/deploy/cpp_infer/CMakeLists.txt @@ -38,10 +38,8 @@ endif() if (WIN32) - include_directories("${PADDLE_LIB}/paddle/fluid/inference") include_directories("${PADDLE_LIB}/paddle/include") link_directories("${PADDLE_LIB}/paddle/lib") - link_directories("${PADDLE_LIB}/paddle/fluid/inference") find_package(OpenCV REQUIRED PATHS ${OPENCV_DIR}/build/ NO_DEFAULT_PATH) else () diff --git a/deploy/cpp_infer/CMakeLists_det.txt b/deploy/cpp_infer/CMakeLists_det.txt index cf37e88a..4658321b 100644 --- a/deploy/cpp_infer/CMakeLists_det.txt +++ b/deploy/cpp_infer/CMakeLists_det.txt @@ -38,10 +38,8 @@ endif() if (WIN32) - include_directories("${PADDLE_LIB}/paddle/fluid/inference") include_directories("${PADDLE_LIB}/paddle/include") link_directories("${PADDLE_LIB}/paddle/lib") - link_directories("${PADDLE_LIB}/paddle/fluid/inference") find_package(OpenCV REQUIRED PATHS ${OPENCV_DIR}/build/ NO_DEFAULT_PATH) else () diff --git a/deploy/cpp_infer/CMakeLists_rec.txt b/deploy/cpp_infer/CMakeLists_rec.txt index 3174098e..8363f773 100644 --- a/deploy/cpp_infer/CMakeLists_rec.txt +++ b/deploy/cpp_infer/CMakeLists_rec.txt @@ -38,10 +38,8 @@ endif() if (WIN32) - include_directories("${PADDLE_LIB}/paddle/fluid/inference") include_directories("${PADDLE_LIB}/paddle/include") link_directories("${PADDLE_LIB}/paddle/lib") - link_directories("${PADDLE_LIB}/paddle/fluid/inference") find_package(OpenCV REQUIRED PATHS ${OPENCV_DIR}/build/ NO_DEFAULT_PATH) else () diff --git a/deploy/cpp_infer/CMakeLists_system.txt b/deploy/cpp_infer/CMakeLists_system.txt index bfffe1d6..f741d5e8 100644 --- a/deploy/cpp_infer/CMakeLists_system.txt +++ b/deploy/cpp_infer/CMakeLists_system.txt @@ -38,10 +38,8 @@ endif() if (WIN32) - include_directories("${PADDLE_LIB}/paddle/fluid/inference") include_directories("${PADDLE_LIB}/paddle/include") link_directories("${PADDLE_LIB}/paddle/lib") - link_directories("${PADDLE_LIB}/paddle/fluid/inference") find_package(OpenCV REQUIRED PATHS ${OPENCV_DIR}/build/ NO_DEFAULT_PATH) else () diff --git a/deploy/cpp_infer/include/ocr_det.h b/deploy/cpp_infer/include/ocr_det.h index c86edeb6..18318c9c 100644 --- a/deploy/cpp_infer/include/ocr_det.h +++ b/deploy/cpp_infer/include/ocr_det.h @@ -38,20 +38,15 @@ namespace PaddleOCR { class DBDetector { public: - explicit DBDetector(const std::string &model_dir, - const bool &use_gpu=false, - const int &gpu_id=0, - const int &gpu_mem=4000, - const int &cpu_math_library_num_threads=1, - const bool &use_mkldnn=false, - const int &max_side_len=960, - const double &det_db_thresh=0.3, - const double &det_db_box_thresh=0.5, - const double &det_db_unclip_ratio=2.0, - const bool &use_polygon_score=false, - const bool &visualize=false, - const bool &use_tensorrt=false, - const bool &use_fp16=false) { + explicit DBDetector(const std::string &model_dir, const bool &use_gpu, + const int &gpu_id, const int &gpu_mem, + const int &cpu_math_library_num_threads, + const bool &use_mkldnn, const int &max_side_len, + const double &det_db_thresh, + const double &det_db_box_thresh, + const double &det_db_unclip_ratio, + const bool &use_polygon_score, const bool &visualize, + const bool &use_tensorrt, const bool &use_fp16) { this->use_gpu_ = use_gpu; this->gpu_id_ = gpu_id; this->gpu_mem_ = gpu_mem; -- GitLab