Skip to content

Commit 25d5b69

Browse files
committed
update tutorials
1 parent 4c9e2a6 commit 25d5b69

22 files changed

+212
-29
lines changed

docs/apis/datasets.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ paddlex.datasets.ImageNet(data_dir, file_list, label_list, transforms=None, num_
77
```
88
读取ImageNet格式的分类数据集,并对样本进行相应的处理。ImageNet数据集格式的介绍可查看文档:[数据集格式说明](../data/format/index.html)
99

10-
示例:[代码文件](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/classification/mobilenetv2.py#L25)
10+
示例:[代码文件](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/image_classification/mobilenetv2.py)
1111

1212
> **参数**
1313
@@ -20,15 +20,15 @@ paddlex.datasets.ImageNet(data_dir, file_list, label_list, transforms=None, num_
2020
> > * **parallel_method** (str): 数据集中样本在预处理过程中并行处理的方式,支持'thread'线程和'process'进程两种方式。默认为'process'(Windows和Mac下会强制使用thread,该参数无效)。
2121
> > * **shuffle** (bool): 是否需要对数据集中样本打乱顺序。默认为False。
2222
23-
## paddlex.datasets.PascalVOC
23+
## paddlex.datasets.VOCDetection
2424
> **用于目标检测模型**
2525
```
26-
paddlex.datasets.PascalVOC(data_dir, file_list, label_list, transforms=None, num_workers=‘auto’, buffer_size=100, parallel_method='thread', shuffle=False)
26+
paddlex.datasets.VOCDetection(data_dir, file_list, label_list, transforms=None, num_workers=‘auto’, buffer_size=100, parallel_method='thread', shuffle=False)
2727
```
2828

2929
> 读取PascalVOC格式的检测数据集,并对样本进行相应的处理。PascalVOC数据集格式的介绍可查看文档:[数据集格式说明](../data/format/index.html)
3030
31-
> 示例:[代码文件](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/detection/yolov3_darknet53.py#L29)
31+
> 示例:[代码文件](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/object_detection/yolov3_darknet53.py)
3232
3333
> **参数**
3434
@@ -41,15 +41,15 @@ paddlex.datasets.PascalVOC(data_dir, file_list, label_list, transforms=None, num
4141
> > * **parallel_method** (str): 数据集中样本在预处理过程中并行处理的方式,支持'thread'线程和'process'进程两种方式。默认为'process'(Windows和Mac下会强制使用thread,该参数无效)。
4242
> > * **shuffle** (bool): 是否需要对数据集中样本打乱顺序。默认为False。
4343
44-
## paddlex.datasets.MSCOCO
44+
## paddlex.datasets.CocoDetection
4545
> **用于实例分割/目标检测模型**
4646
```
47-
paddlex.datasets.MSCOCO(data_dir, ann_file, transforms=None, num_workers='auto', buffer_size=100, parallel_method='thread', shuffle=False)
47+
paddlex.datasets.CocoDetection(data_dir, ann_file, transforms=None, num_workers='auto', buffer_size=100, parallel_method='thread', shuffle=False)
4848
```
4949

5050
> 读取MSCOCO格式的检测数据集,并对样本进行相应的处理,该格式的数据集同样可以应用到实例分割模型的训练中。MSCOCO数据集格式的介绍可查看文档:[数据集格式说明](../data/format/index.html)
5151
52-
> 示例:[代码文件](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/detection/mask_rcnn_r50_fpn.py#L27)
52+
> 示例:[代码文件](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/instance_segmentation/mask_rcnn_r50_fpn.py)
5353
5454
> **参数**
5555
@@ -69,7 +69,7 @@ paddlex.datasets.SegDataset(data_dir, file_list, label_list, transforms=None, nu
6969

7070
> 读取语义分割任务数据集,并对样本进行相应的处理。语义分割任务数据集格式的介绍可查看文档:[数据集格式说明](../data/format/index.html)
7171
72-
> 示例:[代码文件](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/segmentation/unet.py#L27)
72+
> 示例:[代码文件](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/semantic_segmentation/unet.py)
7373
7474
> **参数**
7575

docs/quick_start.md

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# 10分钟快速上手使用
22

3-
本文档在一个小数据集上展示了如何通过PaddleX进行训练,您可以阅读PaddleX的**使用教程**来了解更多模型任务的训练使用方式。本示例同步在AIStudio上,可直接[在线体验模型训练](https://aistudio.baidu.com/aistudio/projectdetail/439860)
3+
本文档在一个小数据集上展示了如何通过PaddleX进行训练。本示例同步在AIStudio上,可直接[在线体验模型训练](https://aistudio.baidu.com/aistudio/projectdetail/450220)
4+
5+
本示例代码源于Github [tutorials/train/classification/mobilenetv3_small_ssld.py](https://github.com/PaddlePaddle/PaddleX/blob/develop/tutorials/train/image_classification/mobilenetv3_small_ssld.py),用户可自行下载至本地运行。
46

57
PaddleX中的所有模型训练跟随以下3个步骤,即可快速完成训练代码开发!
68

@@ -35,7 +37,7 @@ tar xzvf vegetables_cls.tar.gz
3537
<a name="定义训练验证图像处理流程transforms"></a>
3638
**3. 定义训练/验证图像处理流程transforms**
3739

38-
由于训练时数据增强操作的加入,因此模型在训练和验证过程中,数据处理流程需要分别进行定义。如下所示,代码在`train_transforms`中加入了[RandomCrop](apis/transforms/cls_transforms.html#RandomCrop)[RandomHorizontalFlip](apis/transforms/cls_transforms.html#RandomHorizontalFlip)两种数据增强方式, 更多方法可以参考[数据增强文档](apis/transforms/augment.md)
40+
由于训练时数据增强操作的加入,因此模型在训练和验证过程中,数据处理流程需要分别进行定义。如下所示,代码在`train_transforms`中加入了[RandomCrop](apis/transforms/cls_transforms.html#randomcrop)[RandomHorizontalFlip](apis/transforms/cls_transforms.html#randomhorizontalflip)两种数据增强方式, 更多方法可以参考[数据增强文档](apis/transforms/augment.md)
3941
```
4042
from paddlex.cls import transforms
4143
train_transforms = transforms.Compose([
@@ -54,7 +56,7 @@ eval_transforms = transforms.Compose([
5456
**4. 定义`dataset`加载图像分类数据集**
5557

5658
定义数据集,`pdx.datasets.ImageNet`表示读取ImageNet格式的分类数据集
57-
- [paddlex.datasets.ImageNet接口说明](apis/datasets/classification.md)
59+
- [paddlex.datasets.ImageNet接口说明](apis/datasets.md)
5860
- [ImageNet数据格式说明](data/format/classification.md)
5961

6062
```
@@ -118,7 +120,7 @@ Predict Result: Predict Result: [{'score': 0.9999393, 'category': 'bocai', 'cate
118120

119121
<a name="更多使用教程"></a>
120122
**更多使用教程**
121-
- 1.[目标检测模型训练](tutorials/train/detection.md)
122-
- 2.[语义分割模型训练](tutorials/train/segmentation.md)
123-
- 3.[实例分割模型训练](tutorials/train/instance_segmentation.md)
124-
- 4.[模型太大,想要更小的模型,试试模型裁剪吧!](tutorials/compress/classification.md)
123+
- 1.[目标检测模型训练](train/object_detection.md)
124+
- 2.[语义分割模型训练](train/semantic_segmentation.md)
125+
- 3.[实例分割模型训练](train/instance_segmentation.md)
126+
- 4.[模型太大,想要更小的模型,试试模型裁剪吧!](https://github.com/PaddlePaddle/PaddleX/tree/develop/tutorials/compress)

tutorials/train/image_classification/alexnet.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
# 环境变量配置,用于控制是否使用GPU
2+
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
3+
import os
4+
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
5+
16
from paddlex.cls import transforms
27
import paddlex as pdx
38

@@ -6,6 +11,7 @@
611
pdx.utils.download_and_decompress(veg_dataset, path='./')
712

813
# 定义训练和验证时的transforms
14+
# API说明https://paddlex.readthedocs.io/zh_CN/develop/apis/transforms/cls_transforms.html
915
train_transforms = transforms.Compose([
1016
transforms.RandomCrop(crop_size=224),
1117
transforms.RandomHorizontalFlip(),
@@ -18,6 +24,7 @@
1824
])
1925

2026
# 定义训练和验证所用的数据集
27+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-imagenet
2128
train_dataset = pdx.datasets.ImageNet(
2229
data_dir='vegetables_cls',
2330
file_list='vegetables_cls/train_list.txt',
@@ -33,11 +40,14 @@
3340
# 初始化模型,并进行训练
3441
# 可使用VisualDL查看训练指标
3542
# VisualDL启动方式: visualdl --logdir output/mobilenetv2/vdl_log --port 8001
36-
# 浏览器打开 https://0.0.0.0:8001即可
43+
# 浏览器打开 https://0.0.0.0:8001或https://localhost:8001即可
3744
# 其中0.0.0.0为本机访问,如为远程服务, 改成相应机器IP
3845
model = pdx.cls.AlexNet(num_classes=len(train_dataset.labels))
3946
# AlexNet需要指定确定的input_shape
4047
model.fixed_input_shape = [224, 224]
48+
49+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/classification.html#train
50+
# 各参数介绍与调整说明:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html
4151
model.train(
4252
num_epochs=10,
4353
train_dataset=train_dataset,

tutorials/train/image_classification/mobilenetv2.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
# 环境变量配置,用于控制是否使用GPU
2+
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
13
import os
4+
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
5+
26
from paddlex.cls import transforms
37
import paddlex as pdx
48

@@ -7,6 +11,7 @@
711
pdx.utils.download_and_decompress(veg_dataset, path='./')
812

913
# 定义训练和验证时的transforms
14+
# API说明https://paddlex.readthedocs.io/zh_CN/develop/apis/transforms/cls_transforms.html
1015
train_transforms = transforms.Compose([
1116
transforms.RandomCrop(crop_size=224),
1217
transforms.RandomHorizontalFlip(),
@@ -19,6 +24,7 @@
1924
])
2025

2126
# 定义训练和验证所用的数据集
27+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-imagenet
2228
train_dataset = pdx.datasets.ImageNet(
2329
data_dir='vegetables_cls',
2430
file_list='vegetables_cls/train_list.txt',
@@ -37,6 +43,9 @@
3743
# 浏览器打开 https://0.0.0.0:8001即可
3844
# 其中0.0.0.0为本机访问,如为远程服务, 改成相应机器IP
3945
model = pdx.cls.MobileNetV2(num_classes=len(train_dataset.labels))
46+
47+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/classification.html#train
48+
# 各参数介绍与调整说明:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html
4049
model.train(
4150
num_epochs=10,
4251
train_dataset=train_dataset,

tutorials/train/image_classification/mobilenetv3_small_ssld.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
# 环境变量配置,用于控制是否使用GPU
2+
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
13
import os
4+
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
5+
26
from paddlex.cls import transforms
37
import paddlex as pdx
48

@@ -7,6 +11,7 @@
711
pdx.utils.download_and_decompress(veg_dataset, path='./')
812

913
# 定义训练和验证时的transforms
14+
# API说明https://paddlex.readthedocs.io/zh_CN/develop/apis/transforms/cls_transforms.html
1015
train_transforms = transforms.Compose([
1116
transforms.RandomCrop(crop_size=224),
1217
transforms.RandomHorizontalFlip(),
@@ -19,6 +24,7 @@
1924
])
2025

2126
# 定义训练和验证所用的数据集
27+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-imagenet
2228
train_dataset = pdx.datasets.ImageNet(
2329
data_dir='vegetables_cls',
2430
file_list='vegetables_cls/train_list.txt',
@@ -37,6 +43,9 @@
3743
# 浏览器打开 https://0.0.0.0:8001即可
3844
# 其中0.0.0.0为本机访问,如为远程服务, 改成相应机器IP
3945
model = pdx.cls.MobileNetV3_small_ssld(num_classes=len(train_dataset.labels))
46+
47+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-imagenet
48+
# 各参数介绍与调整说明:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html
4049
model.train(
4150
num_epochs=10,
4251
train_dataset=train_dataset,

tutorials/train/image_classification/resnet50_vd_ssld.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
# 环境变量配置,用于控制是否使用GPU
2+
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
13
import os
4+
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
5+
26
from paddlex.cls import transforms
37
import paddlex as pdx
48

@@ -7,6 +11,7 @@
711
pdx.utils.download_and_decompress(veg_dataset, path='./')
812

913
# 定义训练和验证时的transforms
14+
# API说明https://paddlex.readthedocs.io/zh_CN/develop/apis/transforms/cls_transforms.html
1015
train_transforms = transforms.Compose([
1116
transforms.RandomCrop(crop_size=224),
1217
transforms.RandomHorizontalFlip(),
@@ -19,6 +24,7 @@
1924
])
2025

2126
# 定义训练和验证所用的数据集
27+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-imagenet
2228
train_dataset = pdx.datasets.ImageNet(
2329
data_dir='vegetables_cls',
2430
file_list='vegetables_cls/train_list.txt',
@@ -37,6 +43,9 @@
3743
# 浏览器打开 https://0.0.0.0:8001即可
3844
# 其中0.0.0.0为本机访问,如为远程服务, 改成相应机器IP
3945
model = pdx.cls.ResNet50_vd_ssld(num_classes=len(train_dataset.labels))
46+
47+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/classification.html#train
48+
# 各参数介绍与调整说明:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html
4049
model.train(
4150
num_epochs=10,
4251
train_dataset=train_dataset,

tutorials/train/image_classification/shufflenetv2.py

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
1+
# 环境变量配置,用于控制是否使用GPU
2+
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
13
import os
4+
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
5+
26
from paddlex.cls import transforms
37
import paddlex as pdx
48

@@ -7,6 +11,7 @@
711
pdx.utils.download_and_decompress(veg_dataset, path='./')
812

913
# 定义训练和验证时的transforms
14+
# API说明https://paddlex.readthedocs.io/zh_CN/develop/apis/transforms/cls_transforms.html
1015
train_transforms = transforms.Compose([
1116
transforms.RandomCrop(crop_size=224),
1217
transforms.RandomHorizontalFlip(),
@@ -19,6 +24,7 @@
1924
])
2025

2126
# 定义训练和验证所用的数据集
27+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-imagenet
2228
train_dataset = pdx.datasets.ImageNet(
2329
data_dir='vegetables_cls',
2430
file_list='vegetables_cls/train_list.txt',
@@ -37,6 +43,9 @@
3743
# 浏览器打开 https://0.0.0.0:8001即可
3844
# 其中0.0.0.0为本机访问,如为远程服务, 改成相应机器IP
3945
model = pdx.cls.ShuffleNetV2(num_classes=len(train_dataset.labels))
46+
47+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/classification.html#train
48+
# 各参数介绍与调整说明:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html
4049
model.train(
4150
num_epochs=10,
4251
train_dataset=train_dataset,

tutorials/train/instance_segmentation/mask_rcnn_hrnet_fpn.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
# 环境变量配置,用于控制是否使用GPU
2+
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
13
import os
2-
# 选择使用0号卡
34
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
45

56
from paddlex.det import transforms
@@ -10,6 +11,7 @@
1011
pdx.utils.download_and_decompress(xiaoduxiong_dataset, path='./')
1112

1213
# 定义训练和验证时的transforms
14+
# API说明 https://paddlex.readthedocs.io/zh_CN/develop/apis/transforms/det_transforms.html
1315
train_transforms = transforms.Compose([
1416
transforms.RandomHorizontalFlip(),
1517
transforms.Normalize(),
@@ -24,6 +26,7 @@
2426
])
2527

2628
# 定义训练和验证所用的数据集
29+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-cocodetection
2730
train_dataset = pdx.datasets.CocoDetection(
2831
data_dir='xiaoduxiong_ins_det/JPEGImages',
2932
ann_file='xiaoduxiong_ins_det/train.json',
@@ -41,7 +44,12 @@
4144
# 其中0.0.0.0为本机访问,如为远程服务, 改成相应机器IP
4245
# num_classes 需要设置为包含背景类的类别数,即: 目标类别数量 + 1
4346
num_classes = len(train_dataset.labels) + 1
47+
48+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/instance_segmentation.html#maskrcnn
4449
model = pdx.det.MaskRCNN(num_classes=num_classes, backbone='HRNet_W18')
50+
51+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/instance_segmentation.html#train
52+
# 各参数介绍与调整说明:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html
4553
model.train(
4654
num_epochs=12,
4755
train_dataset=train_dataset,

tutorials/train/instance_segmentation/mask_rcnn_r18_fpn.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
# 环境变量配置,用于控制是否使用GPU
2+
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
13
import os
2-
# 选择使用0号卡
34
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
45

56
from paddlex.det import transforms
@@ -10,6 +11,7 @@
1011
pdx.utils.download_and_decompress(xiaoduxiong_dataset, path='./')
1112

1213
# 定义训练和验证时的transforms
14+
# API说明 https://paddlex.readthedocs.io/zh_CN/develop/apis/transforms/det_transforms.html
1315
train_transforms = transforms.Compose([
1416
transforms.RandomHorizontalFlip(),
1517
transforms.Normalize(),
@@ -24,6 +26,7 @@
2426
])
2527

2628
# 定义训练和验证所用的数据集
29+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-cocodetection
2730
train_dataset = pdx.datasets.CocoDetection(
2831
data_dir='xiaoduxiong_ins_det/JPEGImages',
2932
ann_file='xiaoduxiong_ins_det/train.json',
@@ -41,7 +44,12 @@
4144
# 其中0.0.0.0为本机访问,如为远程服务, 改成相应机器IP
4245
# num_classes 需要设置为包含背景类的类别数,即: 目标类别数量 + 1
4346
num_classes = len(train_dataset.labels) + 1
47+
48+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/instance_segmentation.html#maskrcnn
4449
model = pdx.det.MaskRCNN(num_classes=num_classes, backbone='ResNet18')
50+
51+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/instance_segmentation.html#train
52+
# 各参数介绍与调整说明:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html
4553
model.train(
4654
num_epochs=12,
4755
train_dataset=train_dataset,

tutorials/train/instance_segmentation/mask_rcnn_r50_fpn.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
1+
# 环境变量配置,用于控制是否使用GPU
2+
# 说明文档:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html#gpu
13
import os
2-
# 选择使用0号卡
34
os.environ['CUDA_VISIBLE_DEVICES'] = '0'
45

56
from paddlex.det import transforms
@@ -10,6 +11,7 @@
1011
pdx.utils.download_and_decompress(xiaoduxiong_dataset, path='./')
1112

1213
# 定义训练和验证时的transforms
14+
# API说明 https://paddlex.readthedocs.io/zh_CN/develop/apis/transforms/det_transforms.html
1315
train_transforms = transforms.Compose([
1416
transforms.RandomHorizontalFlip(),
1517
transforms.Normalize(),
@@ -24,6 +26,7 @@
2426
])
2527

2628
# 定义训练和验证所用的数据集
29+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/datasets.html#paddlex-datasets-cocodetection
2730
train_dataset = pdx.datasets.CocoDetection(
2831
data_dir='xiaoduxiong_ins_det/JPEGImages',
2932
ann_file='xiaoduxiong_ins_det/train.json',
@@ -41,7 +44,12 @@
4144
# 其中0.0.0.0为本机访问,如为远程服务, 改成相应机器IP
4245
# num_classes 需要设置为包含背景类的类别数,即: 目标类别数量 + 1
4346
num_classes = len(train_dataset.labels) + 1
47+
48+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/instance_segmentation.html#maskrcnn
4449
model = pdx.det.MaskRCNN(num_classes=num_classes, backbone='ResNet50')
50+
51+
# API说明:https://paddlex.readthedocs.io/zh_CN/develop/apis/models/instance_segmentation.html#train
52+
# 各参数介绍与调整说明:https://paddlex.readthedocs.io/zh_CN/develop/appendix/parameters.html
4553
model.train(
4654
num_epochs=12,
4755
train_dataset=train_dataset,

0 commit comments

Comments
 (0)