-
Notifications
You must be signed in to change notification settings - Fork 11
Open
Description
您的代码
def calculate_metric_percase(pred, gt):
pred[pred > 0] = 1
gt[gt > 0] = 1
if pred.sum() > 0 and gt.sum() > 0:
dice = metric.binary.dc(pred, gt)
hd95 = metric.binary.hd95(pred, gt)
return dice, hd95
elif pred.sum() > 0 and gt.sum() == 0:
return 1, 0
else:
return 0, 0在第二个分支中,当pred.sum() > 0 and gt.sum() == 0,dice应该是0吧,而不是1;并且经过统计,公共数据集中这种无栓塞的图片数量超过50%,如果都将这种情况认为是1的话,会大大拉高模型的评价指标啊,您认为嘞?
Metadata
Metadata
Assignees
Labels
No labels