bigmb / Unet-Segmentation-Pytorch-Nest-of-Unets

Implementation of different kinds of Unet Models for Image Segmentation - Unet , RCNN-Unet, Attention Unet, RCNN-Attention Unet, Nested Unet
MIT License
1.87k stars 345 forks source link

About the dataset #19

Closed Halleyawoo closed 4 years ago

Halleyawoo commented 4 years ago

HI! very nice work!

I have no idea of this dataset. The link is as follows:

https://ida.loni.usc.edu/pages/access/search.jsp?tab=collection&loginKey=1568321853435385522&userEmail=949774840%40qq.com&project=ADNI&page=DOWNLOADS&subPage=IMAGE_COLLECTIONS

It just have .nii projects, I can not find .png which you are using in the test_image and test_label. Could you please give me a very specific link? I'll very appreciate about it!

bigmb commented 4 years ago

I have made my png from the MRI files. There is a .py file called 2d from 3d in the repo. Have a look at it.

Halleyawoo commented 4 years ago

okay, thanks for your reply!

Halleyawoo commented 4 years ago

please don't close it now, maybe I 'll have some problems lately. lol thank you!

bigmb commented 4 years ago

Sure. No problem. You can even write to me on malav.b93@gmail.com.

Halleyawoo commented 4 years ago

Hello! I met a problem which says:

RuntimeError: output with shape [1, 96, 96] doesn't match the broadcast shape [3, 96, 96]

I referred to online tutorials, change the sentence : transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5])])

into another sentence : transform = transforms.Compose([ transforms.ToTensor(), transforms.Lambda(lambda x: x.repeat(3,1,1)), transforms.Normalize(mean=(0.5, 0.5, 0.5), std=(0.5, 0.5, 0.5)) ])

But it is still the same error. Could you tell me why? Thx very much!

bigmb commented 4 years ago

Its probably because you are providing a 1D input to the expected 3D tensor. try : transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize(mean=[0.5], std=[0.5])])

But what is your input to the transformation?

bigmb commented 4 years ago

What is the shape of the input given to datasets? Can you share those details?

and the shape of the output of the 2d_from_3d file that you are creating?

husheng876 commented 4 years ago

Its probably because you are providing a 1D input to the expected 3D tensor. try : transform = transforms.Compose([transforms.ToTensor(), transforms.Normalize(mean=[0.5], std=[0.5])])

But what is your input to the transformation?

i have tried this solution but didn't solve the problem.And my input data is RGB and mask is gray.