English | 简体中文
The recommended configuration parameters of the model are stored in the yaml file of each model folder under PaddleSeg/configs. For example, one of the configurations of ANN is given in /PaddleSeg/configs/ann/ann_resnet50_os8_cityscapes_1024x512_80k.yml. As shown below:
The red part in the figure is the storage location of the pre-training model parameter file of the backbone network. Note: Here, we will download the pre-training model parameters provided by us directly in the form of a https link. If you have the pre-trained model parameters of the backbone network locally, please replace the
pretrained
underbackbone
in the yaml file with the absolute path. Or, you should set the relative path for the storage location of the pre-training model parameters according to the directory where thetrain.py
will be executed.
The green part in the figure is the storage location of the pre-training model parameter file of the segmentation network. If you have the pre-trained model parameters of the segmentation network locally, please replace the
pretrained
in the yaml file with the absolute path or relative path where it is stored.
The way to set the
epoch
will be affected by the size of the dataset. So we support setiters
.
Supplement: The relationship between training configuration parameters
Define the parameters as follows:
Then:
Since the configuration of data augmentation is specified in the yaml file, it's important to introduce the basic knowledge of the configuration file in PaddleSeg.
Cityscapes is one of the most commonly used datasets in the field of semantic segmentation, so some common configurations on Cityscapes have been given.
PaddleSeg uses
_base_
to specify the inheritance relationship between configurations:
_base_: '../_base_/cityscapes.yml'
_base_: '../_base_/cityscapes_1024x1024.yml'
transforms
and loaded sequentially from top to bottom.--batch_size 4
) overwrites the configuration with the same name inside --config (such as batch_size: 8
specified in yaml).If you are using a custom dataset with inconsistent shapes, this may be an error caused by improper data augmentation loading sequence.
In Q3, we already know that PaddleSeg's data augmentation configuration is loaded in order.
For example,
RandomRotation
will change the size of the image. If it is set after other augmentations to correct the size (such as Crop, Resize), the image size will be inconsistent. This causes a DataLoader reader thread error.
Therefore, before starting training, please refer to Q3 to check the data augmentation configuration sequence.
The current SOTA model on CityScapes can reach 87% mIoU.
Please refer: https://github.com/PaddlePaddle/PaddleSeg/tree/develop/contrib/CityscapesSOTA
The
best_model
is obtained by evaluation and comparison during the training process.
Therefore, you need to enable the option
--do_eval
before training.
Due to some reasons, the model may not be trained at one time. A relatively simple method is: copy the contents of the first generated log and the second generated log to a new binary file, then read it.
We will support multiple log merging in the new version in the near future.
In addition, if it is similar to the situation of continuing training after interruption, you can specify the log name when calling visualdl, so that you can continue to write directly in the specified log file.
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。