diff --git a/deploy/cpp_infer/CMakeLists.txt b/deploy/cpp_infer/CMakeLists.txt index bfffe1d6e380759bb79020783a49fc3c4f988b7b..f741d5e8db65d426704fcbc6c01540275fd3e2f9 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 cf37e88af4ce9d7b5acc5354add8cfcfed3332c8..4658321b78e0cb39b5f0bc778c98f6e2de5c83ef 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 3174098e6c801ee249672d3b68231c82f8ba0d87..8363f773342df89c0043db131c1c112639936e6a 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 bfffe1d6e380759bb79020783a49fc3c4f988b7b..f741d5e8db65d426704fcbc6c01540275fd3e2f9 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 c86edeb6ab8fafd606381605c4a013a423fe890d..18318c9c4e37136db62c1338db1b58f82859f037 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;