zEttOn86 / 3D-Unet

Chainer implementation of 3D Unet for brain segmentaion.
MIT License
10 stars 5 forks source link

How to view the generated prediction nii.raw And nii.mhd file #4

Open chenjingyi-star opened 4 years ago

chenjingyi-star commented 4 years ago

![Uploading 1.png]()

zEttOn86 commented 4 years ago

Thank you for your question. I always use 3D slicer to view mhd files. please install this and drag and drop it to this. https://www.slicer.org/

chenjingyi-star commented 4 years ago

Thank you for your reply.I would like to ask what hardware you use for this project.I have a 2080ti GPU here,but it's not enough,and why do you have 450000 iterations here?Due to hardware limitations,I only ran 50000 iterations here.Will this make the effect worse?

chenjingyi-star commented 4 years ago

When I trained my data set,I reported the flowing error: 1 Initilaze dataset

of cases: 10

Org from: t1/xIBSR/06/fxIBSR_06_ana.nii.gz label from: seg/fmask06.nii.gz Traceback (most recent call last): File "train.py", line 156, in main() File "train.py", line 59, in main config.unet['number_of_label']) File "/home/customer/桌面/my3DUnet/dataset.py", line 40, in init org = IO.read_mhd_and_raw(os.path.join(self._root, i[0])).astype("float32") File "/home/customer/桌面/my3DUnet/util/dataIO.py", line 15, in read_mhd_and_raw img = sitk.ReadImage(path) File "/usr/local/lib/python3.6/dist-packages/SimpleITK/SimpleITK.py", line 8876, in ReadImage return _SimpleITK.ReadImage(*args) RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/Core/Common/include/itkImageBase.hxx:207: itk::ERROR: Image(0x2db1bc0): Bad direction, determinant is 0. Direction is -0 0 0 0 -0 0 0 0 0

How can I solve this problem?

zEttOn86 commented 4 years ago

Hi sorry for late reply.

i would like to ask what hardware you >use for this project.I have a 2080ti GPU >here,

I probably used same gpus.Do you use own dataset.

but it's not enough,and why do you have >450000 iterations here?Due to hardware >limitations,I only ran 50000 iterations >here.Will this make the effect worse?

There are no reason to choice this iterations. It is difficult to answer since i dont know your loss curve. I guess that its ok if loss curve has converged.

Your error is due to header file error. So check your image file. And change direction to 1 0 0 0 1 0 0 0 1. If you would like to check header file, convert gz file to mhd file using 3d slicer.

chenjingyi-star commented 4 years ago

Thank you for your reply.Could you please give me the installation method of 3D slicer under Ubuntu18.04 system?I've been here for a long time.And the online method makes me confused,QT toolbox is necessary to install?

chenjingyi-star commented 4 years ago

Here I recommend a medical image viewing software called MRIcron,which is also very useful.And I solved that problem with it.

zEttOn86 commented 4 years ago

Hi, Im sorry for my late reply. Thank you for sharing useful information. I will try it if i have a chance.