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
da84f0b1
Commit
da84f0b1
authored
Dec 10, 2020
by
LDOUBLEV
Browse files
update
parent
cad5ea11
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
4 deletions
+14
-4
doc/doc_ch/detection.md
doc/doc_ch/detection.md
+8
-3
doc/doc_en/detection_en.md
doc/doc_en/detection_en.md
+6
-1
No files found.
doc/doc_ch/detection.md
View file @
da84f0b1
...
...
@@ -73,12 +73,15 @@ tar -xf ./pretrain_models/MobileNetV3_large_x0_5_pretrained.tar ./pretrain_model
*如果您安装的是cpu版本,请将配置文件中的 `use_gpu` 字段修改为false*
```
shell
# 训练 mv3_db 模型
,并将训练日志保存为 tain_det.log
#
单机单卡
训练 mv3_db 模型
python3 tools/train.py
-c
configs/det/det_mv3_db.yml
\
-o
Global.pretrain_weights
=
./pretrain_models/MobileNetV3_large_x0_5_pretrained/
\
2>&1 |
tee
train_det.log
-o
Global.pretrain_weights
=
./pretrain_models/MobileNetV3_large_x0_5_pretrained/
# 单机多卡训练,通过 --select_gpus 参数设置使用的GPU ID;
python3
-m
paddle.distributed.launch
--selected_gpus
'0,1,2,3'
tools/train.py
-c
configs/det/det_mv3_db.yml
\
-o
Global.pretrain_weights
=
./pretrain_models/MobileNetV3_large_x0_5_pretrained/
```
上述指令中,通过-c 选择训练使用configs/det/det_db_mv3.yml配置文件。
有关配置文件的详细解释,请参考
[
链接
](
./config.md
)
。
...
...
@@ -92,6 +95,8 @@ python3 tools/train.py -c configs/det/det_mv3_db.yml -o Optimizer.base_lr=0.0001
如果训练程序中断,如果希望加载训练中断的模型从而恢复训练,可以通过指定Global.checkpoints指定要加载的模型路径:
```
shell
python3 tools/train.py
-c
configs/det/det_mv3_db.yml
-o
Global.checkpoints
=
./your/trained/model
```
**注意**
:
`Global.checkpoints`
的优先级高于
`Global.pretrain_weights`
的优先级,即同时指定两个参数时,优先加载
`Global.checkpoints`
指定的模型,如果
`Global.checkpoints`
指定的模型路径有误,会加载
`Global.pretrain_weights`
指定的模型。
...
...
doc/doc_en/detection_en.md
View file @
da84f0b1
...
...
@@ -64,7 +64,7 @@ tar -xf ./pretrain_models/MobileNetV3_large_x0_5_pretrained.tar ./pretrain_model
#### START TRAINING
*If CPU version installed, please set the parameter `use_gpu` to `false` in the configuration.*
```
shell
python3 tools/train.py
-c
configs/det/det_mv3_db.yml
2>&1 |
tee
train_det.log
python3 tools/train.py
-c
configs/det/det_mv3_db.yml
```
In the above instruction, use
`-c`
to select the training to use the
`configs/det/det_db_mv3.yml`
configuration file.
...
...
@@ -72,7 +72,12 @@ For a detailed explanation of the configuration file, please refer to [config](.
You can also use
`-o`
to change the training parameters without modifying the yml file. For example, adjust the training learning rate to 0.0001
```
shell
# single GPU training
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 '--select_gpus' parameter;
python3
-m
paddle.distributed.launch
--selected_gpus
'0,1,2,3'
tools/train.py
-c
configs/det/det_mv3_db.yml
-o
Optimizer.base_lr
=
0.0001
```
#### 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