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
3fdcfb2e
Unverified
Commit
3fdcfb2e
authored
Nov 18, 2021
by
MissPenguin
Committed by
GitHub
Nov 18, 2021
Browse files
Merge pull request #4686 from MissPenguin/dygraph
rename model name and add slim models
parents
1bbf6e6a
2f5420f0
Changes
25
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
25 additions
and
23 deletions
+25
-23
test_tipc/configs/ch_ppocr_server_v2.0_rec/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
..._linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
+0
-0
test_tipc/configs/ch_ppocr_server_v2.0_rec/rec_icdar15_r34_train.yml
...onfigs/ch_ppocr_server_v2.0_rec/rec_icdar15_r34_train.yml
+0
-0
test_tipc/configs/ppocr_det_mobile/model_linux_gpu_normal_normal_lite_cpp_arm_cpu.txt
...mobile/model_linux_gpu_normal_normal_lite_cpp_arm_cpu.txt
+1
-1
test_tipc/docs/test_inference_cpp.md
test_tipc/docs/test_inference_cpp.md
+3
-3
test_tipc/readme.md
test_tipc/readme.md
+21
-19
No files found.
test_tipc/configs/ppocr_
rec_
server/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
→
test_tipc/configs/
ch_
ppocr_server
_v2.0_rec
/model_linux_gpu_normal_normal_serving_python_linux_gpu_cpu.txt
View file @
3fdcfb2e
File moved
test_tipc/configs/ppocr_
rec_
server/rec_icdar15_r34_train.yml
→
test_tipc/configs/
ch_
ppocr_server
_v2.0_rec
/rec_icdar15_r34_train.yml
View file @
3fdcfb2e
File moved
test_tipc/configs/ppocr_det_mobile/model_linux_gpu_normal_normal_lite_cpp_arm_cpu.txt
View file @
3fdcfb2e
test_tipc/docs/test_inference_cpp.md
View file @
3fdcfb2e
...
@@ -20,12 +20,12 @@ C++预测功能测试的主程序为`test_inference_cpp.sh`,可以测试基于
...
@@ -20,12 +20,12 @@ C++预测功能测试的主程序为`test_inference_cpp.sh`,可以测试基于
先运行
`prepare.sh`
准备数据和模型,然后运行
`test_inference_cpp.sh`
进行测试,最终在
```test_tipc/output```
目录下生成
`cpp_infer_*.log`
后缀的日志文件。
先运行
`prepare.sh`
准备数据和模型,然后运行
`test_inference_cpp.sh`
进行测试,最终在
```test_tipc/output```
目录下生成
`cpp_infer_*.log`
后缀的日志文件。
```
shell
```
shell
bash test_tipc/prepare.sh ./test_tipc/configs/ppocr_
det_
mobile/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
"cpp_infer"
bash test_tipc/prepare.sh ./test_tipc/configs/
ch_
ppocr_mobile
_v2.0_det
/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
"cpp_infer"
# 用法1:
# 用法1:
bash test_tipc/test_inference_cpp.sh test_tipc/configs/ppocr_
det_
mobile/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
bash test_tipc/test_inference_cpp.sh test_tipc/configs/
ch_
ppocr_mobile
_v2.0_det
/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
# 用法2: 指定GPU卡预测,第三个传入参数为GPU卡号
# 用法2: 指定GPU卡预测,第三个传入参数为GPU卡号
bash test_tipc/test_inference_cpp.sh test_tipc/configs/ppocr_
det_
mobile/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
'1'
bash test_tipc/test_inference_cpp.sh test_tipc/configs/
ch_
ppocr_mobile
_v2.0_det
/model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
'1'
```
```
运行预测指令后,在
`test_tipc/output`
文件夹下自动会保存运行日志,包括以下文件:
运行预测指令后,在
`test_tipc/output`
文件夹下自动会保存运行日志,包括以下文件:
...
...
test_tipc/readme.md
View file @
3fdcfb2e
...
@@ -23,14 +23,17 @@
...
@@ -23,14 +23,17 @@
| 算法论文 | 模型名称 | 模型类型 | 基础
<br>
训练预测 | 更多
<br>
训练方式 | 模型压缩 | 其他预测部署 |
| 算法论文 | 模型名称 | 模型类型 | 基础
<br>
训练预测 | 更多
<br>
训练方式 | 模型压缩 | 其他预测部署 |
| :--- | :--- | :----: | :--------: | :---- | :---- | :---- |
| :--- | :--- | :----: | :--------: | :---- | :---- | :---- |
| DB |ch_ppocr_mobile_v2.0_det | 检测 | 支持 | 多机多卡
<br>
混合精度 | FPGM裁剪
<br>
离线量化| Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| DB |ch_ppocr_mobile_v2.0_det | 检测 | 支持 | 多机多卡
<br>
混合精度 | - | Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| DB |ch_ppocr_server_v2.0_det | 检测 | 支持 | 多机多卡
<br>
混合精度 | FPGM裁剪
<br>
离线量化| Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| DB |ch_ppocr_mobile_v2.0_det_FPGM | 检测 | 支持 | 多机多卡
<br>
混合精度 | FPGM裁剪 | Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| DB |ch_ppocr_mobile_v2.0_det_PACT | 检测 | 支持 | 多机多卡
<br>
混合精度 | PACT量化 | Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| DB |ch_ppocr_mobile_v2.0_det_KL | 检测 | 支持 | 多机多卡
<br>
混合精度 | 离线量化| Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| DB |ch_ppocr_server_v2.0_det | 检测 | 支持 | 多机多卡
<br>
混合精度 | - | Paddle Inference: C++
<br>
Paddle Serving: Python, C++ |
| DB |ch_PP-OCRv2_det | 检测 |
| DB |ch_PP-OCRv2_det | 检测 |
| CRNN |ch_ppocr_mobile_v2.0_rec | 识别 | 支持 | 多机多卡
<br>
混合精度 |
PACT量化
<br>
离线量化
| Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| CRNN |ch_ppocr_mobile_v2.0_rec | 识别 | 支持 | 多机多卡
<br>
混合精度 |
-
| Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| CRNN |ch_ppocr_server_v2.0_rec | 识别 | 支持 | 多机多卡
<br>
混合精度 |
PACT量化
<br>
离线量化
| Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++)
|
| CRNN |ch_ppocr_server_v2.0_rec | 识别 | 支持 | 多机多卡
<br>
混合精度 |
-
| Paddle Inference: C++
<br>
Paddle Serving: Python, C++ |
| CRNN |ch_PP-OCRv2_rec | 识别 |
| CRNN |ch_PP-OCRv2_rec | 识别 |
| PP-OCR |ch_ppocr_mobile_v2.0 | 检测+识别 | 支持 | 多机多卡
<br>
混合精度 | - | Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| PP-OCR |ch_ppocr_mobile_v2.0 | 检测+识别 | 支持 | 多机多卡
<br>
混合精度 | - | Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++) |
| PP-OCR |ch_ppocr_server_v2.0 | 检测+识别 | 支持 | 多机多卡
<br>
混合精度 | - | Paddle Inference: C++
<br>
Paddle Serving: Python, C++
<br>
Paddle-Lite:
<br>
(1) ARM CPU(C++)
|
| PP-OCR |ch_ppocr_server_v2.0 | 检测+识别 | 支持 | 多机多卡
<br>
混合精度 | - | Paddle Inference: C++
<br>
Paddle Serving: Python, C++ |
|PP-OCRv2|ch_PP-OCRv2 | 检测+识别 |
|PP-OCRv2|ch_PP-OCRv2 | 检测+识别 |
| DB |det_mv3_db_v2.0 | 检测 |
| DB |det_mv3_db_v2.0 | 检测 |
| DB |det_r50_vd_db_v2.0 | 检测 |
| DB |det_r50_vd_db_v2.0 | 检测 |
...
@@ -54,24 +57,23 @@
...
@@ -54,24 +57,23 @@
## 3.
一键
测试工具
使用
## 3. 测试工具
简介
### 目录介绍
### 目录介绍
```
shell
```
shell
test_tipc/
test_tipc/
├── configs/
# 配置文件目录
├── configs/
# 配置文件目录
├── ppocr_det_mobile
# ppocr_det_mobile模型的测试配置文件目录
├── ch_ppocr_mobile_v2.0_det
# ch_ppocr_mobile_v2.0_det模型的测试配置文件目录
├── det_mv3_db.yml
# 测试mobile版ppocr检测模型训练的yml文件
├── train_infer_python.txt
# 测试Linux上python训练预测(基础训练预测)的配置文件
├── train_infer_python.txt.txt
# 测试Linux上python训练预测(基础训练预测)的配置文件
├── model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
# 测试Linux上c++预测的配置文件
├── model_linux_gpu_normal_normal_infer_cpp_linux_gpu_cpu.txt
# 测试Linux上c++预测的配置文件
├── model_linux_gpu_normal_normal_infer_python_jetson.txt
# 测试Jetson上python预测的配置文件
├── model_linux_gpu_normal_normal_infer_python_jetson.txt
# 测试Jetson上python预测的配置文件
├── train_linux_gpu_fleet_amp_infer_python_linux_gpu_cpu.txt
# 测试Linux上多机多卡、混合精度训练和python预测的配置文件
├── train_linux_gpu_fleet_amp_infer_python_linux_gpu_cpu.txt
# 测试Linux上多机多卡、混合精度训练和python预测的配置文件
├── ...
├── ...
├── ppocr_
det_
server
# ppocr_
det_
server模型的测试配置文件目录
├──
ch_
ppocr_server
_v2.0_det
#
ch_
ppocr_server
_v2.0_det
模型的测试配置文件目录
├── ...
├── ...
├── ppocr_
rec_
mobile
# ppocr_
rec_
mobile模型的测试配置文件目录
├──
ch_
ppocr_mobile
_v2.0_rec
#
ch_
ppocr_mobile
_v2.0_rec
模型的测试配置文件目录
├── ...
├── ...
├── ppocr_
rec_
server
# ppocr_
rec_
server模型的测试配置文件目录
├──
ch_
ppocr_server
_v2.0_det
#
ch_
ppocr_server
_v2.0_det
模型的测试配置文件目录
├── ...
├── ...
├── ...
├── ...
├── results/
# 预先保存的预测结果,用于和实际预测结果进行精读比对
├── results/
# 预先保存的预测结果,用于和实际预测结果进行精读比对
...
@@ -91,18 +93,18 @@ test_tipc/
...
@@ -91,18 +93,18 @@ test_tipc/
```
```
### 配置文件命名规范
### 配置文件命名规范
在
`configs`
目录下,按模型名称划分为子目录,子目录中存放所有该模型测试需要用到的配置文件,配置文件的命名遵循如下规范:
在
`configs`
目录下,
**
按模型名称划分为子目录
**
,子目录中存放所有该模型测试需要用到的配置文件,配置文件的命名遵循如下规范:
1.
基础训练预测配置简单命名为:
`train_infer_python.txt`
,表示
**Linux环境下单机、不使用混合精度训练+python预测**
,其完整命名对应
`train_linux_gpu_
fleet_amp
_infer_python_linux_gpu_cpu.txt`
,由于本配置文件使用频率较高,这里进行了名称简化。
1.
基础训练预测配置简单命名为:
`train_infer_python.txt`
,表示
**Linux环境下单机、不使用混合精度训练+python预测**
,其完整命名对应
`train_linux_gpu_
normal_normal
_infer_python_linux_gpu_cpu.txt`
,由于本配置文件使用频率较高,这里进行了名称简化。
2.
其他带训练配置命名格式为:
`train_训练硬件环境(linux_gpu/linux_dcu/…)_是否多机(fleet/normal)_是否混合精度(amp/normal)_预测模式(infer/lite/serving/js)_语言(cpp/python/java)_预测硬件环境(linux_gpu/mac/jetson/opencl_arm_gpu/...).txt`
。如,linux gpu下多机多卡+混合精度链条测试对应配置
`train_linux_gpu_fleet_amp_infer_python_linux_gpu_cpu.txt`
,linux dcu下基础训练预测对应配置
`train_linux_dcu_normal_normal_infer_python_dcu.txt`
。
2.
其他带训练配置命名格式为:
`train_训练硬件环境(linux_gpu/linux_dcu/…)_是否多机(fleet/normal)_是否混合精度(amp/normal)_预测模式(infer/lite/serving/js)_语言(cpp/python/java)_预测硬件环境(linux_gpu/mac/jetson/opencl_arm_gpu/...).txt`
。如,linux gpu下多机多卡+混合精度链条测试对应配置
`train_linux_gpu_fleet_amp_infer_python_linux_gpu_cpu.txt`
,linux dcu下基础训练预测对应配置
`train_linux_dcu_normal_normal_infer_python_
linux_
dcu.txt`
。
3.
仅预测的配置(如serving、lite等)命名格式:
`model_训练硬件环境(linux_gpu/linux_dcu/…)_是否多机(fleet/normal)_是否混合精度(amp/normal)_(infer/lite/serving/js)_语言(cpp/python/java)_预测硬件环境(linux_gpu/mac/jetson/opencl_arm_gpu/...).txt`
,即,与2相比,仅第一个字段从train换为model,测试时模型直接下载获取,这里的“训练硬件环境”表示所测试的模型是在哪种环境下训练得到的。
3.
仅预测的配置(如serving、lite等)命名格式:
`model_训练硬件环境(linux_gpu/linux_dcu/…)_是否多机(fleet/normal)_是否混合精度(amp/normal)_(infer/lite/serving/js)_语言(cpp/python/java)_预测硬件环境(linux_gpu/mac/jetson/opencl_arm_gpu/...).txt`
,即,与2相比,仅第一个字段从train换为model,测试时模型直接下载获取,这里的“训练硬件环境”表示所测试的模型是在哪种环境下训练得到的。
根据上述命名规范,可以直接从
配置文件名看出对应的
测试场景和功能。
根据上述命名规范,可以直接从
子目录名称和配置文件名找到需要
测试
的
场景和功能
对应的配置文件
。
### 测试流程
### 测试流程
概述
使用本工具,可以测试不同功能的支持情况,以及预测结果是否对齐,测试流程如下:
使用本工具,可以测试不同功能的支持情况,以及预测结果是否对齐,测试流程
概括
如下:
<div
align=
"center"
>
<div
align=
"center"
>
<img
src=
"docs/test.png"
width=
"800"
>
<img
src=
"docs/test.png"
width=
"800"
>
</div>
</div>
...
@@ -119,7 +121,7 @@ test_tipc/
...
@@ -119,7 +121,7 @@ test_tipc/
-
`test_paddle2onnx.sh`
:测试Paddle2ONNX的模型转化功能,并验证正确性。
-
`test_paddle2onnx.sh`
:测试Paddle2ONNX的模型转化功能,并验证正确性。
<a
name=
"more"
></a>
<a
name=
"more"
></a>
###
#
更多教程
### 更多教程
各功能测试中涉及混合精度、裁剪、量化等训练相关,及mkldnn、Tensorrt等多种预测相关参数配置,请点击下方相应链接了解更多细节和使用教程:
各功能测试中涉及混合精度、裁剪、量化等训练相关,及mkldnn、Tensorrt等多种预测相关参数配置,请点击下方相应链接了解更多细节和使用教程:
[
test_train_inference_python 使用
](
docs/test_train_inference_python.md
)
[
test_train_inference_python 使用
](
docs/test_train_inference_python.md
)
[
test_inference_cpp 使用
](
docs/test_inference_cpp.md
)
[
test_inference_cpp 使用
](
docs/test_inference_cpp.md
)
...
...
Prev
1
2
Next
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