HengCai-NJU / DeSCO

70 stars 3 forks source link

Inference Issue on Kits dataset #5

Open msds21024 opened 1 year ago

msds21024 commented 1 year ago

Hi, I am trying to reproduce the results on kits dataset. I downloaded the kits dataset, preprocessed it using preprocessing_kits.py file from .nii.gz to .h5 format. While testing i found that the model needs the images in shape w x h x d but the preprocessing script was saving images in shape d x w x h. After fixing the images shapes, I ran the test script but i am getting all zeros in predicted label_map. Kindly guide what could i be doing wrong?? p.s i am not trying to re train the model. I am using pre trained checkpoints on test volumes. And I am confused what should i expect?

msds21024 commented 1 year ago

also one more thing, no of classes in kits dataset is 3 - i checked the ground truth labels and it has three classes 0,1,2 (background, tumor, kidney) but in test_desco file no. of classes is 2, why? kindly explain. also i downloaded the kits dataset from their official git repo

HengCai-NJU commented 1 year ago

image = image.swapaxes(0, 2) # 19219264 label = label.swapaxes(0, 2) image = (image - np.mean(image)) / np.std(image) label = label >0

HengCai-NJU commented 1 year ago

check if the volumes are normalized, and we do binary segmentation task on kits dataset, so we treat class 0 as background and other classes as foreground.