From 8fc45dc6026c6be770d77c792d2ed3bc64cc94f8 Mon Sep 17 00:00:00 2001 From: LDOUBLEV Date: Wed, 26 May 2021 07:02:47 +0000 Subject: [PATCH] delete debug --- deploy/cpp_infer/src/main.cpp | 1 - deploy/cpp_infer/tools/build.sh | 7 +++---- deploy/cpp_infer/tools/config.txt | 2 +- deploy/cpp_infer/tools/run.sh | 2 +- 4 files changed, 5 insertions(+), 7 deletions(-) diff --git a/deploy/cpp_infer/src/main.cpp b/deploy/cpp_infer/src/main.cpp index f2f6d807..f25e674b 100644 --- a/deploy/cpp_infer/src/main.cpp +++ b/deploy/cpp_infer/src/main.cpp @@ -51,7 +51,6 @@ int main(int argc, char **argv) { std::string img_path(argv[2]); std::vector all_img_names; - // cv::Mat srcimg = cv::imread(img_path, cv::IMREAD_COLOR); Utility::GetAllFiles((char *)img_path.c_str(), all_img_names); DBDetector det(config.det_model_dir, config.use_gpu, config.gpu_id, diff --git a/deploy/cpp_infer/tools/build.sh b/deploy/cpp_infer/tools/build.sh index 0c99f0e9..e7689196 100755 --- a/deploy/cpp_infer/tools/build.sh +++ b/deploy/cpp_infer/tools/build.sh @@ -1,9 +1,8 @@ OPENCV_DIR=/paddle/Paddle/opencv-3.4.7/opencv3 -LIB_DIR=/paddle/OCR/debug/paddle_inference -#LIB_DIR=/paddle/Paddle/inference/2.0.2/paddle_inference +LIB_DIR=your inference dir CUDA_LIB_DIR=/usr/local/cuda/lib64 CUDNN_LIB_DIR=/usr/lib/x86_64-linux-gnu -TENSORRT_DIR=/paddle/Paddle/package/TensorRT/TensorRT-6.0.1.5/ +TENSORRT_DIR=your trt dir BUILD_DIR=build rm -rf ${BUILD_DIR} @@ -14,7 +13,7 @@ cmake .. \ -DWITH_MKL=ON \ -DWITH_GPU=OFF \ -DWITH_STATIC_LIB=OFF \ - -DWITH_TENSORRT=ON \ + -DWITH_TENSORRT=OFF \ -DOPENCV_DIR=${OPENCV_DIR} \ -DCUDNN_LIB=${CUDNN_LIB_DIR} \ -DCUDA_LIB=${CUDA_LIB_DIR} \ diff --git a/deploy/cpp_infer/tools/config.txt b/deploy/cpp_infer/tools/config.txt index 9715fab3..d4d66d65 100644 --- a/deploy/cpp_infer/tools/config.txt +++ b/deploy/cpp_infer/tools/config.txt @@ -1,5 +1,5 @@ # model load config -use_gpu 1 +use_gpu 0 gpu_id 0 gpu_mem 4000 cpu_math_library_num_threads 10 diff --git a/deploy/cpp_infer/tools/run.sh b/deploy/cpp_infer/tools/run.sh index 73118b71..fa61da75 100755 --- a/deploy/cpp_infer/tools/run.sh +++ b/deploy/cpp_infer/tools/run.sh @@ -1,2 +1,2 @@ -./build/ocr_system ./tools/config.txt ../../doc/imgs/ +./build/ocr_system ./tools/config.txt ../../doc/imgs/12.jpg -- GitLab