Open gjustin40 opened 1 year ago
I'm still working for binary semantic segmentation that has two classes(background:0 / foreground:1 == building)
I have some questions about config of loss.
num_classes=2 loss_cls=dict( type='CrossEntropyLoss', use_sigmoid=False, loss_weight=2.0, reduction='mean', class_weight=[1.0] * num_classes + [0.1]), loss_mask=dict( type='CrossEntropyLoss', use_sigmoid=True, reduction='mean', loss_weight=5.0), loss_dice=dict( type='DiceLoss', use_sigmoid=True, activate=True, reduction='mean', naive_dice=True, eps=1.0, loss_weight=5.0)
use_sigmoid=
loss_cls
True
[1.0]*num_class
[0.1]
Thanks
I also meet the same problem. Have you successfully trained on the binary semantic segmentation? @gjustin40
I'm still working for binary semantic segmentation that has two classes(background:0 / foreground:1 == building)
I have some questions about config of loss.
use_sigmoid=
inloss_cls
toTrue
if binary segmentation?loss_cls
, why 'class_weight' has one more class?[1.0]*num_class
and extra[0.1]
Thanks