Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleClas
提交
692420fa
P
PaddleClas
项目概览
PaddlePaddle
/
PaddleClas
1 年多 前同步成功
通知
116
Star
4999
Fork
1114
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
19
列表
看板
标记
里程碑
合并请求
6
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleClas
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
19
Issue
19
列表
看板
标记
里程碑
合并请求
6
合并请求
6
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
692420fa
编写于
3月 11, 2021
作者:
littletomatodonkey
提交者:
Tingquan Gao
3月 11, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fix doc
上级
533aa8a7
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
31 addition
and
18 deletion
+31
-18
docs/en/tutorials/quick_start_en.md
docs/en/tutorials/quick_start_en.md
+17
-10
docs/zh_CN/tutorials/quick_start.md
docs/zh_CN/tutorials/quick_start.md
+14
-8
未找到文件。
docs/en/tutorials/quick_start_en.md
浏览文件 @
692420fa
...
...
@@ -5,7 +5,7 @@ Based on the flowers102 dataset, it takes only 30 mins to experience PaddleClas,
## Preparation
*
enter insatallation dir
*
Enter insatallation dir.
```
cd path_to_PaddleClas
...
...
@@ -16,7 +16,7 @@ cd path_to_PaddleClas
```
shell
cd
dataset/flowers102
# If you want to download from the brower, you can copy the link, visit it
# in the browser, download and then commpress.
# in the browser, download and then
de
commpress.
wget https://paddle-imagenet-models-name.bj.bcebos.com/data/flowers102.zip
unzip flowers102.zip
```
...
...
@@ -49,13 +49,25 @@ cd ../
## Training
*
All experiments are running on the NVIDIA® Tesla® V100 single card.
*
First of all, use the following command to set visible device.
If you use mac or linux, you can use the following command:
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
```
*
If you use windows, you can use the following command.
```
shell
set
CUDA_VISIBLE_DEVICES
=
0
```
### Train from scratch
*
Train ResNet50_vd
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/ResNet50_vd.yaml
```
...
...
@@ -66,10 +78,9 @@ The validation `Top1 Acc` curve is shown below.
### Finetune - ResNet50_vd pretrained model (Acc 79.12\%)
*
finetune ResNet50_vd_
model pretrained on the 1000-class Imagenet dataset
*
Finetune ResNet50_vd
model pretrained on the 1000-class Imagenet dataset
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/ResNet50_vd_finetune.yaml
```
...
...
@@ -120,11 +131,10 @@ pretrained_model: "./pretrained/ResNet50_vd_ssld_pretrained"
Tringing script
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/ResNet50_vd_ssld_finetune.yaml
```
Compare with finetune on the 79.12% pretrained model, it improve by 0.9
% to 95
%.
Compare with finetune on the 79.12% pretrained model, it improve by 0.9
8
\%
to 95
\
%
.
### More architecture - MobileNetV3
...
...
@@ -132,7 +142,6 @@ Compare with finetune on the 79.12% pretrained model, it improve by 0.9% to 95%.
Training script
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/MobileNetV3_large_x1_0_finetune.yaml
```
...
...
@@ -146,7 +155,6 @@ Data augmentation works when training data is small.
Training script
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/ResNet50_vd_ssld_random_erasing_finetune.yaml
```
...
...
@@ -180,7 +188,6 @@ TRAIN:
Final training script
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/R50_vd_distill_MV3_large_x1_0.yaml
```
...
...
docs/zh_CN/tutorials/quick_start.md
浏览文件 @
692420fa
...
...
@@ -47,6 +47,19 @@ cd ../
### 2.2 环境说明
*
下面所有的训练过程均在
`单卡V100`
机器上运行。
*
首先需要设置可用的显卡设备id
如果使用mac或者linux,可以使用下面的命令进行设置。
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
```
*
如果使用windows,可以使用下面的命令进行设置。
```
shell
set
CUDA_VISIBLE_DEVICES
=
0
```
## 三、模型训练
...
...
@@ -56,7 +69,6 @@ cd ../
*
基于ResNet50_vd模型,训练脚本如下所示。
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py
-c
./configs/quick_start/ResNet50_vd.yaml
```
...
...
@@ -70,7 +82,6 @@ python3 tools/train.py -c ./configs/quick_start/ResNet50_vd.yaml
*
基于ImageNet1k分类预训练模型进行微调,训练脚本如下所示。
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/ResNet50_vd_finetune.yaml
```
...
...
@@ -80,7 +91,6 @@ python3 tools/train.py -c ./configs/quick_start/ResNet50_vd_finetune.yaml
使用训练完的预训练模型对图片
`docs/images/quick_start/flowers102/image_06739.jpg`
进行预测,预测命令为
```
shell
python3 tools/infer/infer.py
\
-i
docs/images/quick_start/flowers102/image_06739.jpg
\
...
...
@@ -119,11 +129,10 @@ pretrained_model: "./pretrained/ResNet50_vd_ssld_pretrained"
训练脚本如下。
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/ResNet50_vd_ssld_finetune.yaml
```
最终flowers102验证集上精度指标为0.95,相对于79.12
\%
预训练模型的微调结构,新数据集指标可以再次提升0.9
\%
。
最终flowers102验证集上精度指标为0.95,相对于79.12
\%
预训练模型的微调结构,新数据集指标可以再次提升0.9
8
\%
。
### 3.4 尝试更多的模型结构-MobileNetV3
...
...
@@ -131,7 +140,6 @@ python3 tools/train.py -c ./configs/quick_start/ResNet50_vd_ssld_finetune.yam
训练脚本如下所示。
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/MobileNetV3_large_x1_0_finetune.yaml
```
...
...
@@ -144,7 +152,6 @@ python3 tools/train.py -c ./configs/quick_start/MobileNetV3_large_x1_0_finetu
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/ResNet50_vd_ssld_random_erasing_finetune.yaml
```
...
...
@@ -180,7 +187,6 @@ TRAIN:
最终的训练脚本如下所示。
```
shell
export
CUDA_VISIBLE_DEVICES
=
0
python3 tools/train.py -c ./configs/quick_start/R50_vd_distill_MV3_large_x1_0.yaml
```
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录