Skip to content

Commit

Permalink
update links (PaddlePaddle#1401)
Browse files Browse the repository at this point in the history
  • Loading branch information
aigcliu authored Sep 28, 2021
1 parent e4c169f commit 8c048ca
Show file tree
Hide file tree
Showing 20 changed files with 40 additions and 48 deletions.
2 changes: 1 addition & 1 deletion configs/ppseg_lite/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
自研超轻量级模型,适用于Web端或移动端实时分割场景。

## Performance
Refer to [人像分割PPSeg](../../contrib/HumanSeg).
Refer to [人像分割PPSeg](../../contrib/PP-HumanSeg).
2 changes: 1 addition & 1 deletion docs/data/marker/marker.md
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ If you want to use a custom dataset, you need to collect images for training, ev
PaddleSeg already supports 2 kinds of labeling tools: `LabelMe`, and `EISeg`. The annotation tutorial is as follows:

- [LabelMe Tutorial](../transform/transform_cn.md)
- [EISeg Tutorial](../../../contrib/EISeg/README.md)
- [EISeg Tutorial](../../../EISeg/README.md)

After annotating with the above tools, please store all annotated images in the annotations folder, and then proceed to the next step.

Expand Down
2 changes: 1 addition & 1 deletion docs/data/marker/marker_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ labelB
PddleSeg已支持2种标注工具:LabelMe、EISeg交互式分割标注工具。标注教程如下:

- [LabelMe标注教程](../transform/transform_cn.md)
- [EISeg交互式分割标注工具教程](../../../contrib/EISeg/README.md)
- [EISeg交互式分割标注工具教程](../../../EISeg/README.md)

经以上工具进行标注后,请将所有的标注图像统一存放在annotations文件夹内,然后进行下一步。

Expand Down
5 changes: 1 addition & 4 deletions docs/data/transform/transform.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,4 @@ The converted dataset can refer to the [folder] (https://github.com/PaddlePaddle

# 2、EISeg

For the use of EISeg, please refer to [Document](../../../contrib/EISeg/README.md)



For the use of EISeg, please refer to [Document](../../../EISeg/README.md)
5 changes: 1 addition & 4 deletions docs/data/transform/transform_cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,4 @@ python tools/labelme2seg.py docs/annotation/labelme_demo/


# 二、EISeg
EISeg的使用请参考[文档](../../../contrib/EISeg/README.md)



EISeg的使用请参考[文档](../../../EISeg/README.md)
4 changes: 2 additions & 2 deletions docs/module/loss/LovaszHingeLoss_cn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
简体中文 | [English](LovaszHingeLoss_en.md)
## [LovaszHingeLoss](../../../paddleseg/models/lovasz_loss.py)
## [LovaszHingeLoss](../../../paddleseg/models/losses/lovasz_loss.py)
Hinge Loss是在不连续、不平滑的简单阶梯损失函数上改进的一种损失函数。对于正样本,Hinge Loss的输出应大于等于1;对于正样本,Hinge Loss的输出应小于等于-1。

```python
Expand All @@ -9,4 +9,4 @@ class paddleseg.models.losses.LovaszHingeLoss(ignore_index = 255)
## Binary Lovasz hinge loss使用指南

### 参数
* **ignore_index** (int64): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
* **ignore_index** (int64): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
4 changes: 2 additions & 2 deletions docs/module/loss/LovaszHingeLoss_en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
English| [简体中文](LovaszHingeLoss_cn.md)
## [LovaszHingeLoss](../../../paddleseg/models/lovasz_loss.py)
## [LovaszHingeLoss](../../../paddleseg/models/losses/lovasz_loss.py)

Hinge Loss is a loss function improved on the simple step loss function that is not continuous and smooth. For positive samples, the output of Hinge Loss should be greater than or equal to 1; for positive samples, the output of Hinge Loss should be less than or equal to -1.

Expand All @@ -11,4 +11,4 @@ class paddleseg.models.losses.LovaszHingeLoss(ignore_index = 255)

### Args
* **ignore_index** (int64): Specify a pixel value to be ignored in the annotated image
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
6 changes: 3 additions & 3 deletions docs/module/loss/LovaszSoftmaxLoss_cn.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
简体中文 | [English](LovaszSoftmaxLoss_en.md)
## [LovaszSoftmaxLoss](../../../paddleseg/models/lovasz_loss.py)
## [LovaszSoftmaxLoss](../../../paddleseg/models/losses/lovasz_loss.py)

lovasz softmax loss适用于多分类问题。该工作发表在CVPR 2018上。
[参考文献](https://openaccess.thecvf.com/content_cvpr_2018/html/Berman_The_LovaSz-Softmax_Loss_CVPR_2018_paper.html)

```python
class paddleseg.models.losses.LovaszSoftmaxLoss(
ignore_index = 255,
ignore_index = 255,
classes = 'present'
)
```
Expand All @@ -15,4 +15,4 @@ class paddleseg.models.losses.LovaszSoftmaxLoss(

### 参数
* **ignore_index** (int64): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
* **classes** (str|list): 'all' 表示所有,'present' 表示标签中存在的类,或者要做 average 的类列表。
* **classes** (str|list): 'all' 表示所有,'present' 表示标签中存在的类,或者要做 average 的类列表。
6 changes: 3 additions & 3 deletions docs/module/loss/LovaszSoftmaxLoss_en.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
English | [简体中文](LovaszSoftmaxLoss_cn.md)
## [LovaszSoftmaxLoss](../../../paddleseg/models/lovasz_loss.py)
## [LovaszSoftmaxLoss](../../../paddleseg/models/losses/lovasz_loss.py)

Lovasz softmax loss is suitable for multi-classification problems. The work was published on CVPR 2018.
[paper](https://openaccess.thecvf.com/content_cvpr_2018/html/Berman_The_LovaSz-Softmax_Loss_CVPR_2018_paper.html)

```python
class paddleseg.models.losses.LovaszSoftmaxLoss(
ignore_index = 255,
ignore_index = 255,
classes = 'present'
)
```
Expand All @@ -16,4 +16,4 @@ class paddleseg.models.losses.LovaszSoftmaxLoss(
### Args
* **ignore_index** (int64): Specify a pixel value to be ignored in the annotated image
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
* **classes** (str|list): 'all' for all, 'present' for classes present in labels, or a list of classes to average.
* **classes** (str|list): 'all' for all, 'present' for classes present in labels, or a list of classes to average.
6 changes: 3 additions & 3 deletions docs/module/loss/MSELoss_cn.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
简体中文 | [English](MSELoss_en.md)
## [MSELoss](../../../paddleseg/models/mean_square_error_loss.py)
## [MSELoss](../../../paddleseg/models/losses/mean_square_error_loss.py)
Mean square error loss 即均方根误差。均方根指模型预测值与样本真实值之间距离的平方的平均值。

```python
class paddleseg.models.losses.MSELoss(
reduction = 'mean',
reduction = 'mean',
ignore_index = 255
)
```
Expand All @@ -18,4 +18,4 @@ class paddleseg.models.losses.MSELoss(
> - 如果 `reduction```'mean'``, 返回经 Mean 处理后的损失;
> - 如果 `reduction```'sum'``, 返回经 Sum 处理后的损失。
> - *默认:``'mean'``*
* **ignore_index** (int, optional): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
* **ignore_index** (int, optional): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
6 changes: 3 additions & 3 deletions docs/module/loss/MSELoss_en.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
English | [简体中文](MSELoss_en.md)
## [MSELoss](../../../paddleseg/models/mean_square_error_loss.py)
## [MSELoss](../../../paddleseg/models/losses/mean_square_error_loss.py)
The root mean square refers to the average of the square of the distance between the model's predicted value and the sample's true value.

```python
class paddleseg.models.losses.MSELoss(
reduction = 'mean',
reduction = 'mean',
ignore_index = 255
)
```
Expand All @@ -21,4 +21,4 @@ class paddleseg.models.losses.MSELoss(
> - *Default:``'mean'``*
* **ignore_index** (int, optional): Specify a pixel value to be ignored in the annotated image
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
4 changes: 2 additions & 2 deletions docs/module/loss/MixedLoss_cn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
简体中文 | [English](MixedLoss_en.md)
## [MixedLoss](../../../paddleseg/models/mixed_loss.py)
## [MixedLoss](../../../paddleseg/models/losses/mixed_loss.py)

实现混合loss训练。PaddleSeg每一种损失函数对应网络的一个logit 输出,如果要某个网络输出应用多种损失函数需要修改网络代码。MixedLoss 将允许网络对多个损失函数结果进行加权计算,只需以模块化的形式装入,就可以实现混合loss训练。

Expand All @@ -15,4 +15,4 @@ class paddleseg.models.losses.MixedLoss(losses, coef)
* **coef** (float|int): 每个损失函数类的权重比。

### 返回值
* MixedLoss 类的可调用对象。
* MixedLoss 类的可调用对象。
4 changes: 2 additions & 2 deletions docs/module/loss/MixedLoss_en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
English | [简体中文](MixedLoss_cn.md)
## [MixedLoss](../../../paddleseg/models/mixed_loss.py)
## [MixedLoss](../../../paddleseg/models/losses/mixed_loss.py)

Realize mixed loss training. Each loss function of PaddleSeg corresponds to a logit output of the network. If you want to apply multiple loss functions to a certain network output, you need to modify the network code. MixedLoss will allow the network to weight the results of multiple loss functions, and only need to be loaded in a modular form to achieve mixed loss training.

Expand All @@ -15,4 +15,4 @@ class paddleseg.models.losses.MixedLoss(losses, coef)
* **coef** (float|int): Weighting coefficient of multiple loss

### Returns
* A callable object of MixedLoss.
* A callable object of MixedLoss.
8 changes: 4 additions & 4 deletions docs/module/loss/OhemCrossEntropyLoss_cn.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
简体中文 | [English](OhemCrossEntropyLoss_en.md)
## [OhemCrossEntropyLoss](../../../paddleseg/models/ohem_cross_entropy_loss.py)
## [OhemCrossEntropyLoss](../../../paddleseg/models/losses/ohem_cross_entropy_loss.py)
OHEM旨在解决处理困难样本的问题。在一些语义分割问题中,经常出现像素点难以标注或无法标注的情况,或是类别不平衡的情况,都将对模型性能产生严重的制约。OHEM算法将根据输入到模型中的样本的损失来区分出困难样本,这些困难样本分类精度差,会产生较大的损失。

```python
class paddleseg.models.losses.OhemCrossEntropyLoss(
thresh = 0.7,
min_kept = 10000,
thresh = 0.7,
min_kept = 10000,
ignore_index = 255
)
```
Expand All @@ -15,4 +15,4 @@ class paddleseg.models.losses.OhemCrossEntropyLoss(
### 参数
* **thresh** (float, optional): ohem的阈值。 *默认:``0.7``*
* **min_kept** (int, optional): 指定最小保持用于计算损失函数的像素数。``min_kept````thresh`` 配合使用:如果 ``thresh`` 设置过高,可能导致本轮迭代中没有对损失函数的输入值,因此设定该值可以保证至少前``min_kept``个元素不会被过滤掉。*默认:``10000``*
* **ignore_index** (int64, optional): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
* **ignore_index** (int64, optional): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
10 changes: 5 additions & 5 deletions docs/module/loss/OhemCrossEntropyLoss_en.md
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
English | [简体中文](OhemCrossEntropyLoss_cn.md)
## [OhemCrossEntropyLoss](../../../paddleseg/models/ohem_cross_entropy_loss.py)
## [OhemCrossEntropyLoss](../../../paddleseg/models/losses/ohem_cross_entropy_loss.py)

OHEM aims to handling difficult samples. In some cases, there are unbalanced classes, and labelling all pixels is difficult or even impossible, which will severely restrict the performance of the model. The OHEM algorithm will distinguish difficult samples based on the loss of the samples input to the model. These difficult samples have poor classification accuracy and will produce greater losses.
OHEM aims to handling difficult samples. In some cases, there are unbalanced classes, and labelling all pixels is difficult or even impossible, which will severely restrict the performance of the model. The OHEM algorithm will distinguish difficult samples based on the loss of the samples input to the model. These difficult samples have poor classification accuracy and will produce greater losses.

```python
class paddleseg.models.losses.OhemCrossEntropyLoss(
thresh = 0.7,
min_kept = 10000,
thresh = 0.7,
min_kept = 10000,
ignore_index = 255
)
```
Expand All @@ -17,4 +17,4 @@ class paddleseg.models.losses.OhemCrossEntropyLoss(
* **thresh** (float, optional): The threshold of ohem. *Default:``0.7``*
* **min_kept** (int, optional): Specify the minimum number of pixels to keep for calculating the loss function.``min_kept`` is used in conjunction with ``thresh``: If ``thresh`` is set too high, it may result in no input value to the loss function in this round of iteration, so setting this value can ensure that at least the top ``min_kept`` elements will not be filtered out. *Default:``10000``*
* **ignore_index** (int64, optional): Specify a pixel value to be ignored in the annotated image
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
4 changes: 2 additions & 2 deletions docs/module/loss/OhemEdgeAttentionLoss_cn.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
简体中文 | [English](OhemEdgeAttentionLoss_en.md)
## [OhemEdgeAttentionLoss](../../../paddleseg/models/ohem_edge_attention_loss.py)
## [OhemEdgeAttentionLoss](../../../paddleseg/models/losses/ohem_edge_attention_loss.py)
OHEM算法将根据输入到模型中的样本的损失来区分出困难样本,这些困难样本分类精度差,会产生较大的损失。在存在困难样本的场景下,如欲提高提取边缘的性能,可以使用该损失函数。
```python
class paddleseg.models.losses.OhemEdgeAttentionLoss(
Expand All @@ -16,4 +16,4 @@ class paddleseg.models.losses.OhemEdgeAttentionLoss(
* **edge_threshold** (float, optional): 值大于 edge_threshold 的像素被视为边缘。 *默认:``0.8``*
* **thresh** (float, optional): ohem的阈值。 *默认:`` 0.7``*
* **min_kept** (int, optional): 指定最小保持用于计算损失函数的像素数。``min_kept````thresh`` 配合使用:如果 ``thresh`` 设置过高,可能导致本轮迭代中没有对损失函数的输入值,因此设定该值可以保证至少前``min_kept``个元素不会被过滤掉。*默认:``5000``*
* **ignore_index** (int64, optional): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
* **ignore_index** (int64, optional): 指定一个在标注图中要忽略的像素值,其对输入梯度不产生贡献。当标注图中存在无法标注(或很难标注)的像素时,可以将其标注为某特定灰度值。在计算损失值时,其与原图像对应位置的像素将不作为损失函数的自变量。 *默认:``255``*
4 changes: 2 additions & 2 deletions docs/module/loss/OhemEdgeAttentionLoss_en.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
English | [简体中文](OhemEdgeAttentionLoss_cn.md)
## [OhemEdgeAttentionLoss](../../../paddleseg/models/ohem_edge_attention_loss.py)
## [OhemEdgeAttentionLoss](../../../paddleseg/models/losses/ohem_edge_attention_loss.py)
The OHEM algorithm will distinguish difficult samples based on the loss of the samples input to the model. These difficult samples have poor classification accuracy and will produce greater losses. In the above cases, if you want to improve the performance of edge extraction, you can use this loss function.
```python
class paddleseg.models.losses.OhemEdgeAttentionLoss(
Expand All @@ -17,4 +17,4 @@ class paddleseg.models.losses.OhemEdgeAttentionLoss(
* **thresh** (float, optional): The threshold of ohem. *Default:`` 0.7``*
* **min_kept** (int, optional): Specify the minimum number of pixels to keep for calculating the loss function.``min_kept`` is used in conjunction with ``thresh``: If ``thresh`` is set too high, it may result in no input value to the loss function in this round of iteration, so setting this value can ensure that at least the top ``min_kept`` elements will not be filtered out. *Default:``5000``*
* **ignore_index** (int64, optional): Specify a pixel value to be ignored in the annotated image
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
and does not contribute to the input gradient.When there are pixels that cannot be marked (or difficult to be marked) in the marked image, they can be marked as a specific gray value. When calculating the loss value, the pixel corresponding to the original image will not be used as the independent variable of the loss function. *Default:``255``*
Loading

0 comments on commit 8c048ca

Please sign in to comment.