SakurajimaMaiii/ProtoKD

Evaluation Code Fix Request

Closed this issue · 2 comments

Dear Maintainer,

I have noticed an issue in the decode_label function that needs correction.

The current implementation is as follows:

def decode_label(label):
    """
    Convert multi-label to region label
    label, 1(ET),2(NET),3(ED)
    """
    label = label.copy()
    wt = (label != 0) * 1
    tc = (label == 1) * 1 + (label == 2) * 1
    ec = (label == 1) * 1
    return wt, tc, ec

However, it should be:

def decode_label(label):
    """
    Convert multi-label to region label
    label, 1(ET),2(NET),3(ED)
    """
    label = label.copy()
    wt = (label > 0) * 1
    tc = (label == 1) * 1 + (label == 2) * 1
    ec = (label == 3) * 1
    return wt, tc, ec

I believe this change will correct the labeling logic as per the intended functionality.

Thanks for your interests for our work. I think original implement is correct.

BraTS provodes labels edema (label 2), non-enhancing tumor (label 1) and enhancing tumor (label 4) in original dataset, see here.

We use

def convert_label(gt):
to convert labels to enhancing tumor (label 1), non-enhancing tumor (label 2) and edema (label 3).

For evaluation, we evaluate performance on the whole tumor (consisting of all 3 classes), tumor core (enhancing tumor + non-enhancing tumor) and enhancing tumor.
So I think original implement is correct.

I close issue. If you meet more questions, feel free to tell me.