Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Evaluation data calculation #19

Open
AArutoria opened this issue May 28, 2024 · 1 comment
Open

Evaluation data calculation #19

AArutoria opened this issue May 28, 2024 · 1 comment

Comments

@AArutoria
Copy link

Dear author, it is a great honor to read your paper, and thank you very much for making your code public. I have some questions about the code problem, and I hope you can help me to answer them.
I looked at the code for test, but found that it only had the function of saving images. May I ask how the value of the evaluation index in the paper is calculated? Is this done through external software?

@cwmok
Copy link
Owner

cwmok commented Jun 3, 2024

Hi @AArutoria ,

Thanks for your interest in our work. We didn't release the evaluation script. But the computation of Dice score is provided as follows:

def dice(im1, atlas):
    unique_class = np.unique(atlas)
    dice = 0
    num_count = 0
    for i in unique_class:
        if (i == 0) or ((im1 == i).sum() == 0) or ((atlas == i).sum() == 0):
            continue

        sub_dice = np.sum(atlas[im1 == i] == i) * 2.0 / (np.sum(im1 == i) + np.sum(atlas == i))
        dice += sub_dice
        num_count += 1
    return dice / num_count

The evaluation was done with Python script using numpy and pytorch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants