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
c85036dd
Commit
c85036dd
authored
May 14, 2020
by
tink2123
Browse files
change pretrain and label path
parent
7be2882f
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
24 additions
and
12 deletions
+24
-12
doc/config.md
doc/config.md
+11
-11
doc/recognition.md
doc/recognition.md
+13
-1
No files found.
doc/config.md
View file @
c85036dd
...
@@ -12,7 +12,7 @@
...
@@ -12,7 +12,7 @@
| 字段 | 用途 | 默认值 | 备注 |
| 字段 | 用途 | 默认值 | 备注 |
| :----------------------: | :---------------------: | :--------------: | :--------------------: |
| :----------------------: | :---------------------: | :--------------: | :--------------------: |
| algorithm | 设置算法 | CRNN | 选择模型,支持模型请参考
[
简介
](
)
|
| algorithm | 设置算法 | CRNN | 选择模型,支持模型请参考
[
简介
](
../../README.md
)
|
| use_gpu | 设置代码运行场所 | true |
\
|
| use_gpu | 设置代码运行场所 | true |
\
|
| epoch_num | 最大训练epoch数 | 3000 |
\
|
| epoch_num | 最大训练epoch数 | 3000 |
\
|
| log_smooth_window | 滑动窗口大小 | 20 |
\
|
| log_smooth_window | 滑动窗口大小 | 20 |
\
|
...
...
doc/recognition.md
View file @
c85036dd
...
@@ -98,6 +98,18 @@ word_dict.txt 每行有一个单字,将字符与数字索引映射在一起,
...
@@ -98,6 +98,18 @@ word_dict.txt 每行有一个单字,将字符与数字索引映射在一起,
PaddleOCR提供了训练脚本、评估脚本和预测脚本,本节将以 CRNN 识别模型为例:
PaddleOCR提供了训练脚本、评估脚本和预测脚本,本节将以 CRNN 识别模型为例:
首先下载pretrain model,您可以下载训练好的模型在 icdar2015 数据上进行finetune
``
cd PaddleOCR/
# 下载MobileNetV3的预训练模型
wget -P ./pretrain_models/ https://paddleocr.bj.bcebos.com/rec_mv3_none_bilstm_ctc.tar
# 解压模型参数
cd pretrain_models
tar -xf rec_mv3_none_bilstm_ctc.tar && rm -rf rec_mv3_none_bilstm_ctc.tar
```
开始训练:
```
```
# 设置PYTHONPATH路径
# 设置PYTHONPATH路径
export PYTHONPATH=$PYTHONPATH:.
export PYTHONPATH=$PYTHONPATH:.
...
@@ -106,7 +118,7 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
...
@@ -106,7 +118,7 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python3 tools/train.py -c configs/rec/rec_icdar15_train.yml
python3 tools/train.py -c configs/rec/rec_icdar15_train.yml
```
```
PaddleOCR支持训练和评估交替进行, 可以在
`configs/rec/rec_icdar15_train.yml`
中修改
`eval_batch_step`
设置评估频率,默认每
20
00个iter评估一次。评估过程中默认将最佳acc模型,保存为
`output/rec_CRNN/best_accuracy`
。
PaddleOCR支持训练和评估交替进行, 可以在 `
configs/rec/rec_icdar15_train.yml
` 中修改 `
eval_batch_step
` 设置评估频率,默认每
5
00个iter评估一次。评估过程中默认将最佳acc模型,保存为 `
output/rec_CRNN/best_accuracy
` 。
如果验证集很大,测试将会比较耗时,建议减少评估次数,或训练完再进行评估。
如果验证集很大,测试将会比较耗时,建议减少评估次数,或训练完再进行评估。
...
...
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