geoyee 225eb6eb0e | 2 years ago | |
---|---|---|
.. | ||
README.md | 2 years ago | |
__init__.py | 3 years ago | |
losses.py | 3 years ago |
目前的损失函数多参考PaddleSeg,相关代码可以去往ppcd.losses下查看,如需使用自建的损失函数,请参考PaddleSeg自建组件的说明。包括自建模型也可参考。
损失函数 | 说明 |
---|---|
BCELoss | 图像二分类交叉熵 |
DiceLoss | 处理正负样本不均衡 |
MixedLoss | 可混合使用上面两个损失 |
TripletLoss | 用于三元组损失计算 |
BCLoss | 用于STANet中的距离度量 |
ConstLoss | 返回常数损失,用于网络返回部分不需要计算损失的处理 |
LabelL1Loss | 分类标签的损失(用于CDMI-Net等使用场景分类完成变化检测的任务) |
参考Paddle的自定义损失函数,与PaddleSeg中分割的损失通用。ppcd中定义如下:
import paddle.nn as nn
class NewLoss(nn.Layer):
def __init__(self, param1):
pass
def forward(self, x):
pass
在ppcd中,损失的计算有三种方式:
所以在使用中一定要注意网络输出的顺序以及loss、标签的顺序。
PdRSCD(PaddlePaddle Remote Sensing Change Detection)是一个基于飞桨PaddlePaddle的遥感变化检测的项目,pypi包名为ppcd。目前0.2版本,最新支持图像列表输入的训练和预测,如多期影像、多源影像甚至多期多源影像。可以快速完成分割、变化检测等任务。
Python other
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.
For more agreement content, please refer to the《Openl Qizhi Community AI Collaboration Platform Usage Agreement》