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
c64d5519
Commit
c64d5519
authored
Jul 29, 2021
by
WenmuZhou
Browse files
add doc of train
parent
2e98890d
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
doc/doc_ch/detection.md
doc/doc_ch/detection.md
+9
-2
doc/doc_en/detection_en.md
doc/doc_en/detection_en.md
+5
-1
No files found.
doc/doc_ch/detection.md
View file @
c64d5519
...
...
@@ -45,8 +45,8 @@ json.dumps编码前的图像标注信息是包含多个字典的list,字典中
## 快速启动训练
首先下载模型backbone的pretrain model,PaddleOCR的检测模型目前支持两种backbone,分别是MobileNetV3、ResNet_vd系列,
您可以根据需求使用
[
PaddleClas
](
https://github.com/PaddlePaddle/PaddleClas/tree/develop/ppcls/modeling/architectures
)
中的模型更换backbone,
对应的backbone预训练模型可以从
[
PaddleClas repo 主页
中找到下载链接
](
https://github.com/PaddlePaddle/PaddleClas#mobile-series
)
。
您可以根据需求使用
[
PaddleClas
](
https://github.com/PaddlePaddle/PaddleClas/tree/develop/ppcls/modeling/architectures
)
中的模型更换backbone,
对应的backbone预训练模型可以从
[
PaddleClas repo 主页
](
https://github.com/PaddlePaddle/PaddleClas#mobile-series
)
中找到下载链接
。
```
shell
cd
PaddleOCR/
# 根据backbone的不同选择下载对应的预训练模型
...
...
@@ -81,6 +81,13 @@ python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/
python3 tools/train.py
-c
configs/det/det_mv3_db.yml
-o
Optimizer.base_lr
=
0.0001
```
若训练PSE算法,需先编译后处理
```
bash
cd
ppocr/postprocess/pse_postprocess/pse
python3 setup.py build_ext
--inplace
```
#### 断点训练
如果训练程序中断,如果希望加载训练中断的模型从而恢复训练,可以通过指定Global.checkpoints指定要加载的模型路径:
...
...
doc/doc_en/detection_en.md
View file @
c64d5519
...
...
@@ -67,8 +67,12 @@ python3 tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001
# multi-GPU training
# Set the GPU ID used by the '--gpus' parameter.
python3 -m paddle.distributed.launch --gpus '0,1,2,3' tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001
```
If you train the PSE algorithm, you need to compile the post-processing first.
```
bash
cd ppocr/postprocess/pse_postprocess/pse
python3 setup.py build_ext --inplace
```
#### load trained model and continue training
...
...
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