ycwu1997 / MC-Net

Official Code for our MedIA paper "Mutual Consistency Learning for Semi-supervised Medical Image Segmentation" (ESI Highly Cited Paper)
MIT License
137 stars 12 forks source link

train_mcnet_2d.py #3

Closed GuozhengSui closed 2 years ago

GuozhengSui commented 2 years ago

There are two num_classes in the CT slice of my own dataset, but these two categories will not appear in the same slice, that is, each slice only shows one category. I found that MEAN_dice and HD95 were displayed as 0 in most of the time during the training, I wonder if they are related to my dataset itself. Experiments with the ACDC dataset are fine

ycwu1997 commented 2 years ago

This description is too abstract, and I cannot catch your main issue. Since the 2D training codes are only designed on the ACDC dataset, please carefully check the dataloader part (training/val) if you use your in-house dataset. BTW, it is extremely hard to obtain the 95HD of 0. I guess the problematic mini-batch of your data does not contain any foregrounds. Please check them as a reference.

GuozhengSui commented 2 years ago

Thanks for the answer. I'll check back. Do you have a program on how to preprocess CT images? My data are CT images in DICOM format, so I don't know how to preprocess them. I don't use Nnunet method very well.

ycwu1997 commented 2 years ago

You can check the data processing codes on the Pancreas-CT dataset (https://github.com/ycwu1997/MC-Net/blob/main/data/Pancreas/Pre-processing.ipynb) as a reference. Read the data, crop via a HU window (according to the target itself), and then do the normalization. You can customize your pre-processing part according to the nnUNet repo. Thanks.