Giter Site home page Giter Site logo

Comments (8)

bigmb avatar bigmb commented on July 16, 2024

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.

from unet-segmentation-pytorch-nest-of-unets.

XUYUNYUN666 avatar XUYUNYUN666 commented on July 16, 2024

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

from unet-segmentation-pytorch-nest-of-unets.

bigmb avatar bigmb commented on July 16, 2024

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

from unet-segmentation-pytorch-nest-of-unets.

JasonChenhx avatar JasonChenhx commented on July 16, 2024

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?

from unet-segmentation-pytorch-nest-of-unets.

bigmb avatar bigmb commented on July 16, 2024

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

from unet-segmentation-pytorch-nest-of-unets.

iWeisskohl avatar iWeisskohl commented on July 16, 2024

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

from unet-segmentation-pytorch-nest-of-unets.

bigmb avatar bigmb commented on July 16, 2024

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.

from unet-segmentation-pytorch-nest-of-unets.

iWeisskohl avatar iWeisskohl commented on July 16, 2024

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

from unet-segmentation-pytorch-nest-of-unets.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.