Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wangsen
paddle_dbnet
Commits
3f7f8c37
"tests/vscode:/vscode.git/clone" did not exist on "7c5fef81e0aecff65c041a9dfb23aff22bf64f4b"
Commit
3f7f8c37
authored
Aug 19, 2021
by
MissPenguin
Browse files
refine
parent
08166b83
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
55 deletions
+29
-55
tests/prepare.sh
tests/prepare.sh
+4
-28
tests/test.sh
tests/test.sh
+25
-27
No files found.
tests/prepare.sh
View file @
3f7f8c37
...
@@ -75,7 +75,7 @@ elif [ ${MODE} = "infer" ] || [ ${MODE} = "cpp_infer" ];then
...
@@ -75,7 +75,7 @@ elif [ ${MODE} = "infer" ] || [ ${MODE} = "cpp_infer" ];then
fi
fi
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
################### build opencv ###################
echo
"
################### build opencv ###################
"
cd
deploy/cpp_infer
cd
deploy/cpp_infer
rm
-rf
3.4.7.tar.gz opencv-3.4.7/
rm
-rf
3.4.7.tar.gz opencv-3.4.7/
wget https://github.com/opencv/opencv/archive/3.4.7.tar.gz
wget https://github.com/opencv/opencv/archive/3.4.7.tar.gz
...
@@ -109,34 +109,10 @@ if [ ${MODE} = "cpp_infer" ];then
...
@@ -109,34 +109,10 @@ if [ ${MODE} = "cpp_infer" ];then
make
-j
make
-j
make
install
make
install
cd
../
cd
../
################### build opencv finished ###################
echo
"
################### build opencv finished ###################
"
# ################### build paddle inference ###################
echo
"################### build PaddleOCR demo ####################"
# rm -rf Paddle
# git clone https://github.com/PaddlePaddle/Paddle.git
# cd Paddle
# rm -rf build
# mkdir build
# cd build
# cmake .. \
# -DWITH_CONTRIB=OFF \
# -DWITH_MKL=ON \
# -DWITH_MKLDNN=ON \
# -DWITH_TESTING=OFF \
# -DCMAKE_BUILD_TYPE=Release \
# -DWITH_INFERENCE_API_TEST=OFF \
# -DON_INFER=ON \
# -DWITH_PYTHON=ON
# make -j
# make inference_lib_dist
# cd ../
# ################### build paddle inference finished ###################
################### build PaddleOCR demo ###################
OPENCV_DIR
=
$(
pwd
)
/opencv-3.4.7/opencv3/
OPENCV_DIR
=
$(
pwd
)
/opencv-3.4.7/opencv3/
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
=
/usr/local/cuda/lib64/
...
@@ -158,5 +134,5 @@ if [ ${MODE} = "cpp_infer" ];then
...
@@ -158,5 +134,5 @@ if [ ${MODE} = "cpp_infer" ];then
-DTENSORRT_DIR
=
${
TENSORRT_DIR
}
\
-DTENSORRT_DIR
=
${
TENSORRT_DIR
}
\
make
-j
make
-j
################### build PaddleOCR demo finished ###################
echo
"
################### build PaddleOCR demo finished ###################
"
fi
fi
\ No newline at end of file
tests/test.sh
View file @
3f7f8c37
...
@@ -145,34 +145,32 @@ benchmark_value=$(func_parser_value "${lines[49]}")
...
@@ -145,34 +145,32 @@ benchmark_value=$(func_parser_value "${lines[49]}")
infer_key1
=
$(
func_parser_key
"
${
lines
[50]
}
"
)
infer_key1
=
$(
func_parser_key
"
${
lines
[50]
}
"
)
infer_value1
=
$(
func_parser_value
"
${
lines
[50]
}
"
)
infer_value1
=
$(
func_parser_value
"
${
lines
[50]
}
"
)
# parser cpp inference model
if
[
${
MODE
}
=
"cpp_infer"
]
;
then
cpp_infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[52]
}
"
)
# parser cpp inference model
cpp_infer_is_quant
=
$(
func_parser_value
"
${
lines
[53]
}
"
)
cpp_infer_model_dir_list
=
$(
func_parser_value
"
${
lines
[52]
}
"
)
# parser cpp inference
cpp_infer_is_quant
=
$(
func_parser_value
"
${
lines
[53]
}
"
)
inference_cmd
=
$(
func_parser_value
"
${
lines
[54]
}
"
)
# parser cpp inference
cpp_use_gpu_key
=
$(
func_parser_key
"
${
lines
[55]
}
"
)
inference_cmd
=
$(
func_parser_value
"
${
lines
[54]
}
"
)
cpp_use_gpu_list
=
$(
func_parser_value
"
${
lines
[55]
}
"
)
cpp_use_gpu_key
=
$(
func_parser_key
"
${
lines
[55]
}
"
)
cpp_use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[56]
}
"
)
cpp_use_gpu_list
=
$(
func_parser_value
"
${
lines
[55]
}
"
)
cpp_use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[56]
}
"
)
cpp_use_mkldnn_key
=
$(
func_parser_key
"
${
lines
[56]
}
"
)
cpp_cpu_threads_key
=
$(
func_parser_key
"
${
lines
[57]
}
"
)
cpp_use_mkldnn_list
=
$(
func_parser_value
"
${
lines
[56]
}
"
)
cpp_cpu_threads_list
=
$(
func_parser_value
"
${
lines
[57]
}
"
)
cpp_cpu_threads_key
=
$(
func_parser_key
"
${
lines
[57]
}
"
)
cpp_batch_size_key
=
$(
func_parser_key
"
${
lines
[58]
}
"
)
cpp_cpu_threads_list
=
$(
func_parser_value
"
${
lines
[57]
}
"
)
cpp_batch_size_list
=
$(
func_parser_value
"
${
lines
[58]
}
"
)
cpp_batch_size_key
=
$(
func_parser_key
"
${
lines
[58]
}
"
)
cpp_use_trt_key
=
$(
func_parser_key
"
${
lines
[59]
}
"
)
cpp_batch_size_list
=
$(
func_parser_value
"
${
lines
[58]
}
"
)
cpp_use_trt_list
=
$(
func_parser_value
"
${
lines
[59]
}
"
)
cpp_use_trt_key
=
$(
func_parser_key
"
${
lines
[59]
}
"
)
cpp_precision_key
=
$(
func_parser_key
"
${
lines
[60]
}
"
)
cpp_use_trt_list
=
$(
func_parser_value
"
${
lines
[59]
}
"
)
cpp_precision_list
=
$(
func_parser_value
"
${
lines
[60]
}
"
)
cpp_precision_key
=
$(
func_parser_key
"
${
lines
[60]
}
"
)
cpp_infer_model_key
=
$(
func_parser_key
"
${
lines
[61]
}
"
)
cpp_precision_list
=
$(
func_parser_value
"
${
lines
[60]
}
"
)
cpp_image_dir_key
=
$(
func_parser_key
"
${
lines
[62]
}
"
)
cpp_infer_model_key
=
$(
func_parser_key
"
${
lines
[61]
}
"
)
cpp_infer_img_dir
=
$(
func_parser_value
"
${
lines
[62]
}
"
)
cpp_image_dir_key
=
$(
func_parser_key
"
${
lines
[62]
}
"
)
cpp_save_log_key
=
$(
func_parser_key
"
${
lines
[63]
}
"
)
cpp_infer_img_dir
=
$(
func_parser_value
"
${
lines
[62]
}
"
)
cpp_benchmark_key
=
$(
func_parser_key
"
${
lines
[64]
}
"
)
cpp_save_log_key
=
$(
func_parser_key
"
${
lines
[63]
}
"
)
cpp_benchmark_value
=
$(
func_parser_value
"
${
lines
[64]
}
"
)
cpp_benchmark_key
=
$(
func_parser_key
"
${
lines
[64]
}
"
)
cpp_benchmark_value
=
$(
func_parser_value
"
${
lines
[64]
}
"
)
fi
echo
$inference_cmd
echo
$cpp_cpu_threads_key
$cpp_cpu_threads_list
echo
$cpp_precision_key
$cpp_precision_list
echo
$cpp_benchmark_key
$cpp_benchmark_value
LOG_PATH
=
"./tests/output"
LOG_PATH
=
"./tests/output"
mkdir
-p
${
LOG_PATH
}
mkdir
-p
${
LOG_PATH
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment