Project-MONAI / MONAI

AI Toolkit for Healthcare Imaging
https://monai.io/
Apache License 2.0
5.93k stars 1.09k forks source link

Dice without background #3977

Closed ouyuxuanbridge closed 2 years ago

ouyuxuanbridge commented 2 years ago

When I am using this model, following (https://github.com/Project-MONAI/tutorials/blob/master/3d_segmentation/unetr_btcv_segmentation_3d.ipynb)

I don't want to include background, so I make this change: dice_metric = DiceMetric(include_background=True, reduction="mean", get_not_nans=False)

But then dice become 0?

Could you help me please? Thanks!

Nic-Ma commented 2 years ago

Hi @Ouyuxuan623 ,

Thanks for your interest here. If you don't want to include background, why you set include_background=True?

Thanks.