Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

what is the 2d_from_3d? #24

Closed
XUYUNYUN666 opened this issue Dec 28, 2019 · 8 comments
Closed

what is the 2d_from_3d? #24

XUYUNYUN666 opened this issue Dec 28, 2019 · 8 comments

Comments

@XUYUNYUN666
Copy link

How to use the code?

@bigmb
Copy link
Owner

bigmb commented Dec 28, 2019

That code is for getting the 2d slices from 3D mri scans.
Just have to add the folder in the first lines and it will give you the slices.

@XUYUNYUN666
Copy link
Author

That code is for getting the 2d slices from 3D mri scans.
Just have to add the folder in the first lines and it will give you the slices.

But if my dataset is 2d with input_channels 3, and the label is the gray, what should i do? thank you

@bigmb
Copy link
Owner

bigmb commented Jan 1, 2020

You dont want to use the 2D_from_3d in your code if you want to run the unet.
You just have to add the folder path to these lines in pytorch)run :

t_data = '' # Input data
l_data = '' #Input Label
test_image = '' #Image to be predicted while training
test_label = '' #Label of the prediction Image
test_folderP = '' #Test folder Image
test_folderL = '' #Test folder Label for calculating the Dice score

@JasonChenhx
Copy link

You dont want to use the 2D_from_3d in your code if you want to run the unet.
You just have to add the folder path to these lines in pytorch)run :

t_data = '' # Input data
l_data = '' #Input Label
test_image = '' #Image to be predicted while training
test_label = '' #Label of the prediction Image
test_folderP = '' #Test folder Image
test_folderL = '' #Test folder Label for calculating the Dice score

Hi ,I want to ask you a question,
Using CenterCrop(96) in Data_Loader() in the code, but my dataset's size is(400,600), so I want to know how to change the code.
My code is CenterCrop((600,400)) or Resize((600,400)), do you think the modification is right?

@bigmb
Copy link
Owner

bigmb commented Jan 10, 2020

You dont have to change anything.
In the pytorch_run in line 120, change the transformation to (96)

@iWeisskohl
Copy link

hello, I have one question for 2d_from_3d.py in line 21 and line 31, the code 'x = yimage[:184,:232,112:136]'. Could you please tell what does it mean to use [:184,:232,112:136] and how can i set the parameters for my own dataset with shape(155,240,240)? Thanks in advance

@bigmb
Copy link
Owner

bigmb commented Feb 22, 2020

I have taken [:184,:232,112:136] because I just wanted those slices of the 3d mri. So my 2d images extracted will just be from 112:136 , that is my area of interest.

@iWeisskohl
Copy link

I have taken [:184,:232,112:136] because I just wanted those slices of the 3d mri. So my 2d images extracted will just be from 112:136 , that is my area of interest.

Thanks for you reply

@bigmb bigmb closed this as completed Apr 29, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants