Skip to content

dewenzeng/extended_dice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Extended Dice

Pytorch implementation of extended dice for paper: Segmentation with Multiple Acceptable Annotations: A Case Study of Myocardial Segmentation in Contrast Echocardiography, IPMI 2021. paper

Loss Function

P is the predicted image (after softmax), I is the inner boundary label, O is the outer boundary label.

Train example:

from loss import ExtendedDiceLoss
ed_loss = ExtendedDiceLoss()
for idx, (images, labels) in enumerate(data_loader):
    # images: [B,C,X,Y], labels: [B,N,X,Y], N is the number of annotators
    images = images.float().cuda()
    labels = labels.long().cuda()
    y_predict = model(images)
    y_predict = F.softmax(y_predict,dim=1)
    loss = ed_loss(y_predict, labels)
    loss.backward()

About

extended dice for multiple acceptable annotations

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages