未验证 提交 b67b1df3 编写于 作者: littletomatodonkey's avatar littletomatodonkey 提交者: GitHub

add finetune doc and fix vit typo (#996)

上级 38fa8564
......@@ -64,9 +64,7 @@ cd PaddleDetection
pip install -r requirements.txt
```
For more installation tutorials, please refer to [Installation tutorial]()
更多安装教程,请参考: [安装文档](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.1/docs/tutorials/INSTALL.md)
For more installation tutorials, please refer to [Installation tutorial](https://github.com/PaddlePaddle/PaddleDetection/blob/release/2.1/docs/tutorials/INSTALL.md)
### 3.2 Prepare for the dataset
......@@ -126,6 +124,16 @@ python -m paddle.distributed.launch --gpus 0,1,2,3 tools/train.py -c configs/ppy
--eval:eval during training
* (**Recommend**) Model finetune
If you want to finetune the model on your own dataset, you can run the following command to train the model.
```bash
export CUDA_VISIBLE_DEVICES=0
# assign pretrain_weights, load the general mainbody-detection pretrained model
python tools/train.py -c configs/ppyolo/ppyolov2_r50vd_dcn_365e_coco.yml -o pretrain_weights=https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/models/pretrain/ppyolov2_r50vd_dcn_mainbody_v1.0_pretrained.pdparams
```
* Resume training: you can use `-r` to load checkpoints and resume training.
```bash
......
......@@ -117,7 +117,18 @@ export CUDA_VISIBLE_DEVICES=0,1,2,3
python -m paddle.distributed.launch --gpus 0,1,2,3 tools/train.py -c configs/ppyolo/ppyolov2_r50vd_dcn_365e_coco.yml --eval
```
--eval:表示边训练边验证
--eval:表示边训练边验证。
* (**推荐**)模型微调
如果希望加载PaddleClas中已经训练好的主体检测模型,在自己的数据集上进行模型微调,可以使用下面的命令进行训练。
```bash
export CUDA_VISIBLE_DEVICES=0
# 指定pretrain_weights参数,加载通用的主体检测预训练模型
python tools/train.py -c configs/ppyolo/ppyolov2_r50vd_dcn_365e_coco.yml -o pretrain_weights=https://paddle-imagenet-models-name.bj.bcebos.com/dygraph/rec/models/pretrain/ppyolov2_r50vd_dcn_mainbody_v1.0_pretrained.pdparams
```
* 模型恢复训练
......
......@@ -16,7 +16,7 @@ Global:
# model architecture
Arch:
name: ViT_base_patch16_224
name: ViT_base_patch16_384
class_num: 1000
# loss function config for traing/eval process
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册