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
05a9bacd
Commit
05a9bacd
authored
Oct 19, 2021
by
MissPenguin
Browse files
rename tests to PTDN
parent
e6c33c8b
Changes
29
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
72 additions
and
0 deletions
+72
-0
PTDN/readme.md
PTDN/readme.md
+0
-0
PTDN/readme.md.bk
PTDN/readme.md.bk
+72
-0
PTDN/results/cpp_ppocr_det_mobile_results_fp16.txt
PTDN/results/cpp_ppocr_det_mobile_results_fp16.txt
+0
-0
PTDN/results/cpp_ppocr_det_mobile_results_fp32.txt
PTDN/results/cpp_ppocr_det_mobile_results_fp32.txt
+0
-0
PTDN/results/python_ppocr_det_mobile_results_fp16.txt
PTDN/results/python_ppocr_det_mobile_results_fp16.txt
+0
-0
PTDN/results/python_ppocr_det_mobile_results_fp32.txt
PTDN/results/python_ppocr_det_mobile_results_fp32.txt
+0
-0
PTDN/test_cpp.sh
PTDN/test_cpp.sh
+0
-0
PTDN/test_python.sh
PTDN/test_python.sh
+0
-0
PTDN/test_serving.sh
PTDN/test_serving.sh
+0
-0
No files found.
tests
/readme.md
→
PTDN
/readme.md
View file @
05a9bacd
File moved
PTDN/readme.md.bk
0 → 100644
View file @
05a9bacd
# 从训练到推理部署工具链测试方法介绍
test.sh和params.txt文件配合使用,完成OCR轻量检测和识别模型从训练到预测的流程测试。
# 安装依赖
- 安装PaddlePaddle >= 2.0
- 安装PaddleOCR依赖
```
pip3 install -r ../requirements.txt
```
- 安装autolog
```
git clone https://github.com/LDOUBLEV/AutoLog
cd AutoLog
pip3 install -r requirements.txt
python3 setup.py bdist_wheel
pip3 install ./dist/auto_log-1.0.0-py3-none-any.whl
cd ../
```
# 目录介绍
```bash
tests/
├── ocr_det_params.txt # 测试OCR检测模型的参数配置文件
├── ocr_rec_params.txt # 测试OCR识别模型的参数配置文件
├── ocr_ppocr_mobile_params.txt # 测试OCR检测+识别模型串联的参数配置文件
└── prepare.sh # 完成test.sh运行所需要的数据和模型下载
└── test.sh # 测试主程序
```
# 使用方法
test.sh包含四种运行模式,每种模式的运行数据不同,分别用于测试速度和精度,分别是:
- 模式1:lite_train_infer,使用少量数据训练,用于快速验证训练到预测的走通流程,不验证精度和速度;
```shell
bash tests/prepare.sh ./tests/ocr_det_params.txt 'lite_train_infer'
bash tests/test.sh ./tests/ocr_det_params.txt 'lite_train_infer'
```
- 模式2:whole_infer,使用少量数据训练,一定量数据预测,用于验证训练后的模型执行预测,预测速度是否合理;
```shell
bash tests/prepare.sh ./tests/ocr_det_params.txt 'whole_infer'
bash tests/test.sh ./tests/ocr_det_params.txt 'whole_infer'
```
- 模式3:infer 不训练,全量数据预测,走通开源模型评估、动转静,检查inference model预测时间和精度;
```shell
bash tests/prepare.sh ./tests/ocr_det_params.txt 'infer'
# 用法1:
bash tests/test.sh ./tests/ocr_det_params.txt 'infer'
# 用法2: 指定GPU卡预测,第三个传入参数为GPU卡号
bash tests/test.sh ./tests/ocr_det_params.txt 'infer' '1'
```
- 模式4:whole_train_infer , CE: 全量数据训练,全量数据预测,验证模型训练精度,预测精度,预测速度;
```shell
bash tests/prepare.sh ./tests/ocr_det_params.txt 'whole_train_infer'
bash tests/test.sh ./tests/ocr_det_params.txt 'whole_train_infer'
```
- 模式5:cpp_infer , CE: 验证inference model的c++预测是否走通;
```shell
bash tests/prepare.sh ./tests/ocr_det_params.txt 'cpp_infer'
bash tests/test.sh ./tests/ocr_det_params.txt 'cpp_infer'
```
# 日志输出
最终在```tests/output```目录下生成.log后缀的日志文件
tests
/results/cpp_ppocr_det_mobile_results_fp16.txt
→
PTDN
/results/cpp_ppocr_det_mobile_results_fp16.txt
View file @
05a9bacd
File moved
tests
/results/cpp_ppocr_det_mobile_results_fp32.txt
→
PTDN
/results/cpp_ppocr_det_mobile_results_fp32.txt
View file @
05a9bacd
File moved
tests
/results/python_ppocr_det_mobile_results_fp16.txt
→
PTDN
/results/python_ppocr_det_mobile_results_fp16.txt
View file @
05a9bacd
File moved
tests
/results/python_ppocr_det_mobile_results_fp32.txt
→
PTDN
/results/python_ppocr_det_mobile_results_fp32.txt
View file @
05a9bacd
File moved
tests
/test_cpp.sh
→
PTDN
/test_cpp.sh
View file @
05a9bacd
File moved
tests
/test_python.sh
→
PTDN
/test_python.sh
View file @
05a9bacd
File moved
tests
/test_serving.sh
→
PTDN
/test_serving.sh
View file @
05a9bacd
File moved
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