Project-MONAI / MONAI

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

About upgrading MONAI to 1.3.2 Unable to import name 'AddChanneld' from 'monai.transforms' #8144

Closed RY-97 closed 1 month ago

RY-97 commented 1 month ago

image

Nic-Ma commented 1 month ago

AddChanneld should be deprecated for a long time, please try EnsureChannelFirstd instead. CC @KumoLiu .

Thanks.

RY-97 commented 1 month ago

AddChanneld should be deprecated for a long time, please try EnsureChannelFirstd instead. CC @KumoLiu .

Thanks.

When I was using MONAI, I found that some modules were unusable and incompatible after I upgraded to version 1.3.2. As follows: I initially used version 1.2.0, but there was an error in calculating the NSD indicator in 1.2.0. When I upgraded to 1.3.2, the following error occurred.

RY-97 commented 1 month ago

I would like to ask one more question. How to set the parameter class_thresholds here? Is bigger better or is it?

SurfaceDiceMetric(class_thresholds=[1], include_background=False, reduction="mean", get_not_nans=False)

KumoLiu commented 1 month ago

Hi @RY-97, please refer to the reference here. https://github.com/Project-MONAI/MONAI/blob/3fd73f199af518172ac48909caaeb30d14df63c8/monai/metrics/surface_dice.py#L28

A bigger threshold (closer to 1) is not always "better". it depends on your specific use case. A higher threshold may be better if you are okay with missing some true positive regions (e.g., in critical applications where false positives are more costly). (move to discussion for now, thanks.)