diff --git a/docs/en/application/mainbody_detection_en.md b/docs/en/application/mainbody_detection_en.md index 46373c379894ce526585f335b2379e3cb7e262b2..c4fbed6db98451ca470bc30c36794b44331fb6eb 100644 --- a/docs/en/application/mainbody_detection_en.md +++ b/docs/en/application/mainbody_detection_en.md @@ -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 diff --git a/docs/zh_CN/application/mainbody_detection.md b/docs/zh_CN/application/mainbody_detection.md index 897e48f815ca2d8cb9eb007019417a66fb33f98f..e3cba4b52cbba7e1ce352fc2a18f9fd8e38e8a86 100644 --- a/docs/zh_CN/application/mainbody_detection.md +++ b/docs/zh_CN/application/mainbody_detection.md @@ -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 +``` + * 模型恢复训练 diff --git a/ppcls/configs/ImageNet/VisionTransformer/ViT_base_patch16_384.yaml b/ppcls/configs/ImageNet/VisionTransformer/ViT_base_patch16_384.yaml index 7e5c98ce27afeaea017c9ba316db44582e4a3bcd..0c76f694ab8122d506f6816875aee1cb02b142fa 100644 --- a/ppcls/configs/ImageNet/VisionTransformer/ViT_base_patch16_384.yaml +++ b/ppcls/configs/ImageNet/VisionTransformer/ViT_base_patch16_384.yaml @@ -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