Skip to content

Commit

Permalink
test=document_fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Intsigstephon committed Apr 28, 2022
1 parent 97725a6 commit 2f74c27
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions doc/doc_ch/algorithm_rec_rare.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@

请参考[文本识别训练教程](./recognition.md)。PaddleOCR对代码进行了模块化,训练不同的识别模型只需要**更换配置文件**即可。以基于Resnet34_vd骨干网络为例:

<a name="3.1"></a>
<a name="3-1"></a>
### 3.1 训练

```
Expand All @@ -52,15 +52,14 @@ python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs
### 3.2 评估

```
# GPU 评估, Global.pretrained_model 为待评估模型
# GPU评估, Global.pretrained_model为待评估模型
python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/rec_r34_vd_tps_bilstm_att.yml -o Global.pretrained_model={path/to/weights}/best_accuracy
```

<a name="3.3"></a>
### 3.3 预测

```
# 预测使用的配置文件必须与训练一致
python3 tools/infer_rec.py -c configs/rec/rec_r34_vd_tps_bilstm_att.yml -o Global.pretrained_model={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/en/word_1.png
```

Expand Down
5 changes: 2 additions & 3 deletions doc/doc_ch/algorithm_rec_rosetta.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

请参考[文本识别训练教程](./recognition.md)。PaddleOCR对代码进行了模块化,训练不同的识别模型只需要**更换配置文件**即可。 以基于Resnet34_vd骨干网络为例:

<a name="3.1"></a>
<a name="3-1"></a>
### 3.1 训练

```
Expand All @@ -53,15 +53,14 @@ python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs
### 3.2 评估

```
# GPU 评估, Global.pretrained_model 为待评估模型
# GPU评估, Global.pretrained_model为待评估模型
python3 -m paddle.distributed.launch --gpus '0' tools/eval.py -c configs/rec/rec_r34_vd_none_none_ctc.yml -o Global.pretrained_model={path/to/weights}/best_accuracy
```

<a name="3-3"></a>
### 3.3 预测

```
# 预测使用的配置文件必须与训练一致
python3 tools/infer_rec.py -c configs/rec/rec_r34_vd_none_none_ctc.yml -o Global.pretrained_model={path/to/weights}/best_accuracy Global.infer_img=doc/imgs_words/en/word_1.png
```

Expand Down

0 comments on commit 2f74c27

Please sign in to comment.