3DUX-Net icon indicating copy to clipboard operation
3DUX-Net copied to clipboard

About warning

Open zzzyzh opened this issue 1 year ago • 5 comments

Hi,

I find that each step of validation throws a waring like this: /root/miniconda3/envs/uxnet3d/lib/python3.8/site-packages/monai/transforms/utils.py:500: UserWarning: N foreground 0, N background 1713433,unable to generate class balanced samples.

What should I do?

zzzyzh avatar Mar 16 '23 00:03 zzzyzh

Hi, do you mind to print our which sample it is and look into the corresponding sample? Seems like your data contains all pixels/voxels as background.

leeh43 avatar Mar 16 '23 03:03 leeh43

I think that my label is a little bit small that model only get bg after randomcrop. Do you think this is possible?

zzzyzh avatar Mar 16 '23 03:03 zzzyzh

Are you using the monai random crop function or the one that the current GitHub is using (Label crop)?

leeh43 avatar Mar 16 '23 03:03 leeh43

Yes, I didn't change the code on your github, just the path and name

zzzyzh avatar Mar 16 '23 03:03 zzzyzh

Sorry for the late reply. If the label is so small, I believe it still can be cropped. But the above warning is telling us that there is no foreground within the label region. I believe you need to double check with the input label for training.

leeh43 avatar Jul 07 '23 08:07 leeh43