Regarding the issue we faced while running inference with your code..
Oh I will check this, thanks for reporting
Hello
@schirrmacher
actually this issue got solved like i have updated the computeloss function which is given below def compute_loss(self, predictions, ground_truth, ground_truth_edges):
bce_loss = nn.BCELoss(size_average=True)
dice_loss = DiceLoss() # Define a Dice loss class or use one from a library
loss = 0.0
for i in range(len(predictions)):
pred = predictions[i]
loss += bce_loss(pred, ground_truth) + dice_loss(pred, ground_truth)
if i == 0:
primary_loss = loss
# Edge-aware component (assuming you have edge annotations)
if ground_truth_edges is not None:
edge_loss = EdgeAwareLoss()(pred, ground_truth_edges) # Define this class
loss += edge_loss
return primary_loss, loss
But im facing another issue like you can able see some feather in the hair