Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
weixin_41840029
PaddleOCR
提交
45d4afec
P
PaddleOCR
项目概览
weixin_41840029
/
PaddleOCR
与 Fork 源项目一致
Fork自
PaddlePaddle / PaddleOCR
通知
1
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleOCR
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
45d4afec
编写于
8月 24, 2021
作者:
M
MissPenguin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
refine
上级
efb1b412
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
63 addition
and
55 deletion
+63
-55
tests/ocr_det_params.txt
tests/ocr_det_params.txt
+1
-0
tests/prepare.sh
tests/prepare.sh
+41
-34
tests/test.sh
tests/test.sh
+21
-21
未找到文件。
tests/ocr_det_params.txt
浏览文件 @
45d4afec
...
@@ -50,6 +50,7 @@ inference:tools/infer/predict_det.py
...
@@ -50,6 +50,7 @@ inference:tools/infer/predict_det.py
--benchmark:True
--benchmark:True
null:null
null:null
===========================cpp_infer_params===========================
===========================cpp_infer_params===========================
use_opencv:True
infer_model:./inference/ch_ppocr_mobile_v2.0_det_infer/
infer_model:./inference/ch_ppocr_mobile_v2.0_det_infer/
infer_quant:False
infer_quant:False
inference:./deploy/cpp_infer/build/ppocr det
inference:./deploy/cpp_infer/build/ppocr det
...
...
tests/prepare.sh
浏览文件 @
45d4afec
...
@@ -75,49 +75,56 @@ elif [ ${MODE} = "infer" ] || [ ${MODE} = "cpp_infer" ];then
...
@@ -75,49 +75,56 @@ elif [ ${MODE} = "infer" ] || [ ${MODE} = "cpp_infer" ];then
fi
fi
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
echo
"################### build opencv ###################"
cd
deploy/cpp_infer
cd
deploy/cpp_infer
rm
-rf
3.4.7.tar.gz opencv-3.4.7/
use_opencv
=
$(
func_parser_value
"
${
lines
[52]
}
"
)
wget https://github.com/opencv/opencv/archive/3.4.7.tar.gz
if
[
${
use_opencv
}
=
"True"
]
;
then
tar
-xf
3.4.7.tar.gz
echo
"################### build opencv ###################"
rm
-rf
3.4.7.tar.gz opencv-3.4.7/
wget https://github.com/opencv/opencv/archive/3.4.7.tar.gz
tar
-xf
3.4.7.tar.gz
cd
opencv-3.4.7/
cd
opencv-3.4.7/
install_path
=
$(
pwd
)
/opencv-3.4.7/opencv3
install_path
=
$(
pwd
)
/opencv-3.4.7/opencv3
rm
-rf
build
rm
-rf
build
mkdir
build
mkdir
build
cd
build
cd
build
cmake ..
\
cmake ..
\
-DCMAKE_INSTALL_PREFIX
=
${
install_path
}
\
-DCMAKE_INSTALL_PREFIX
=
${
install_path
}
\
-DCMAKE_BUILD_TYPE
=
Release
\
-DCMAKE_BUILD_TYPE
=
Release
\
-DBUILD_SHARED_LIBS
=
OFF
\
-DBUILD_SHARED_LIBS
=
OFF
\
-DWITH_IPP
=
OFF
\
-DWITH_IPP
=
OFF
\
-DBUILD_IPP_IW
=
OFF
\
-DBUILD_IPP_IW
=
OFF
\
-DWITH_LAPACK
=
OFF
\
-DWITH_LAPACK
=
OFF
\
-DWITH_EIGEN
=
OFF
\
-DWITH_EIGEN
=
OFF
\
-DCMAKE_INSTALL_LIBDIR
=
lib64
\
-DCMAKE_INSTALL_LIBDIR
=
lib64
\
-DWITH_ZLIB
=
ON
\
-DWITH_ZLIB
=
ON
\
-DBUILD_ZLIB
=
ON
\
-DBUILD_ZLIB
=
ON
\
-DWITH_JPEG
=
ON
\
-DWITH_JPEG
=
ON
\
-DBUILD_JPEG
=
ON
\
-DBUILD_JPEG
=
ON
\
-DWITH_PNG
=
ON
\
-DWITH_PNG
=
ON
\
-DBUILD_PNG
=
ON
\
-DBUILD_PNG
=
ON
\
-DWITH_TIFF
=
ON
\
-DWITH_TIFF
=
ON
\
-DBUILD_TIFF
=
ON
-DBUILD_TIFF
=
ON
make
-j
make
-j
make
install
make
install
cd
../
cd
../
echo
"################### build opencv finished ###################"
echo
"################### build opencv finished ###################"
fi
echo
"################### build PaddleOCR demo ####################"
echo
"################### build PaddleOCR demo ####################"
OPENCV_DIR
=
$(
pwd
)
/opencv-3.4.7/opencv3/
if
[
${
use_opencv
}
=
"True"
]
;
then
OPENCV_DIR
=
$(
pwd
)
/opencv-3.4.7/opencv3/
else
OPENCV_DIR
=
''
fi
LIB_DIR
=
$(
pwd
)
/Paddle/build/paddle_inference_install_dir/
LIB_DIR
=
$(
pwd
)
/Paddle/build/paddle_inference_install_dir/
CUDA_LIB_DIR
=
/usr/local/cuda/lib64/
CUDA_LIB_DIR
=
$(
dirname
`
find /usr
-name
libcudart.so
`
)
CUDNN_LIB_DIR
=
/usr/lib/x86_64-linux-gnu/
CUDNN_LIB_DIR
=
$(
dirname
`
find /usr
-name
libcudnn.so
`
)
BUILD_DIR
=
build
BUILD_DIR
=
build
rm
-rf
${
BUILD_DIR
}
rm
-rf
${
BUILD_DIR
}
mkdir
${
BUILD_DIR
}
mkdir
${
BUILD_DIR
}
...
...
tests/test.sh
浏览文件 @
45d4afec
...
@@ -147,28 +147,28 @@ infer_value1=$(func_parser_value "${lines[50]}")
...
@@ -147,28 +147,28 @@ infer_value1=$(func_parser_value "${lines[50]}")
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
# parser cpp inference model
# parser cpp inference model
cpp_infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[5
2
]
}
"
)
cpp_infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[5
3
]
}
"
)
cpp_infer_is_quant
=
$(
func_parser_value
"
${
lines
[5
3
]
}
"
)
cpp_infer_is_quant
=
$(
func_parser_value
"
${
lines
[5
4
]
}
"
)
# parser cpp inference
# parser cpp inference
inference_cmd
=
$(
func_parser_value
"
${
lines
[5
4
]
}
"
)
inference_cmd
=
$(
func_parser_value
"
${
lines
[5
5
]
}
"
)
cpp_use_gpu_key
=
$(
func_parser_key
"
${
lines
[5
5
]
}
"
)
cpp_use_gpu_key
=
$(
func_parser_key
"
${
lines
[5
6
]
}
"
)
cpp_use_gpu_list
=
$(
func_parser_value
"
${
lines
[5
5
]
}
"
)
cpp_use_gpu_list
=
$(
func_parser_value
"
${
lines
[5
6
]
}
"
)
cpp_use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[5
6
]
}
"
)
cpp_use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[5
7
]
}
"
)
cpp_use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[5
6
]
}
"
)
cpp_use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[5
7
]
}
"
)
cpp_cpu_threads_key
=
$(
func_parser_key
"
${
lines
[5
7
]
}
"
)
cpp_cpu_threads_key
=
$(
func_parser_key
"
${
lines
[5
8
]
}
"
)
cpp_cpu_threads_list
=
$(
func_parser_value
"
${
lines
[5
7
]
}
"
)
cpp_cpu_threads_list
=
$(
func_parser_value
"
${
lines
[5
8
]
}
"
)
cpp_batch_size_key
=
$(
func_parser_key
"
${
lines
[5
8
]
}
"
)
cpp_batch_size_key
=
$(
func_parser_key
"
${
lines
[5
9
]
}
"
)
cpp_batch_size_list
=
$(
func_parser_value
"
${
lines
[5
8
]
}
"
)
cpp_batch_size_list
=
$(
func_parser_value
"
${
lines
[5
9
]
}
"
)
cpp_use_trt_key
=
$(
func_parser_key
"
${
lines
[
59
]
}
"
)
cpp_use_trt_key
=
$(
func_parser_key
"
${
lines
[
60
]
}
"
)
cpp_use_trt_list
=
$(
func_parser_value
"
${
lines
[
59
]
}
"
)
cpp_use_trt_list
=
$(
func_parser_value
"
${
lines
[
60
]
}
"
)
cpp_precision_key
=
$(
func_parser_key
"
${
lines
[6
0
]
}
"
)
cpp_precision_key
=
$(
func_parser_key
"
${
lines
[6
1
]
}
"
)
cpp_precision_list
=
$(
func_parser_value
"
${
lines
[6
0
]
}
"
)
cpp_precision_list
=
$(
func_parser_value
"
${
lines
[6
1
]
}
"
)
cpp_infer_model_key
=
$(
func_parser_key
"
${
lines
[6
1
]
}
"
)
cpp_infer_model_key
=
$(
func_parser_key
"
${
lines
[6
2
]
}
"
)
cpp_image_dir_key
=
$(
func_parser_key
"
${
lines
[6
2
]
}
"
)
cpp_image_dir_key
=
$(
func_parser_key
"
${
lines
[6
3
]
}
"
)
cpp_infer_img_dir
=
$(
func_parser_value
"
${
lines
[6
2
]
}
"
)
cpp_infer_img_dir
=
$(
func_parser_value
"
${
lines
[6
3
]
}
"
)
cpp_save_log_key
=
$(
func_parser_key
"
${
lines
[6
3
]
}
"
)
cpp_save_log_key
=
$(
func_parser_key
"
${
lines
[6
4
]
}
"
)
cpp_benchmark_key
=
$(
func_parser_key
"
${
lines
[6
4
]
}
"
)
cpp_benchmark_key
=
$(
func_parser_key
"
${
lines
[6
5
]
}
"
)
cpp_benchmark_value
=
$(
func_parser_value
"
${
lines
[6
4
]
}
"
)
cpp_benchmark_value
=
$(
func_parser_value
"
${
lines
[6
5
]
}
"
)
fi
fi
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录