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

want to try the lungs images dataset ,but failed #51

Open
nikee1 opened this issue Jun 7, 2018 · 3 comments
Open

want to try the lungs images dataset ,but failed #51

nikee1 opened this issue Jun 7, 2018 · 3 comments

Comments

@nikee1
Copy link

nikee1 commented Jun 7, 2018

hi~
i'm trying to use the lungs image as a dataset to train the network, but it looks like there are some problems. i use python 2.7,cudnn 5.1,cuda8.0, ubuntu 16.04. the lungs images size is 1,119,879,168 bytes .
is it too big ? we can't find the problems. and we use the origin images without problems.

problem:
lzh@peach-lab:~/vnet/VNet$ python main.py -train
/home/lzh/vnet/VNet/Data/Train
FILE LIST: ['13.mhd', '22.mhd', '15.mhd', '16.mhd', '23.mhd', '8.mhd', '3.mhd', '6.mhd', '10.mhd', '4.mhd', '14.mhd', '20.mhd', '5.mhd', '19.mhd', '17.mhd', '21.mhd', '18.mhd', '11.mhd', '12.mhd', '9.mhd', '7.mhd']
MetaImage: Read: Cannot open data file
Traceback (most recent call last):
File "main.py", line 37, in
model.train()
File "/home/lzh/vnet/VNet/VNet.py", line 106, in train
self.dataManagerTrain.loadTrainingData() #loads in sitk format
File "/home/lzh/vnet/VNet/DataManager.py", line 62, in loadTrainingData
self.loadImages()
File "/home/lzh/vnet/VNet/DataManager.py", line 44, in loadImages
self.sitkImages[f]=rescalFilt.Execute(sitk.Cast(sitk.ReadImage(join(self.srcFolder, f)),sitk.sitkFloat32))
File "/home/lzh/.local/lib/python2.7/site-packages/SimpleITK/SimpleITK.py", line 8614, in ReadImage
return _SimpleITK.ReadImage(*args)
RuntimeError: Exception thrown in SimpleITK ReadImage: /tmp/SimpleITK-build/ITK/Modules/IO/Meta/src/itkMetaImageIO.cxx:491:
itk::ERROR: MetaImageIO(0xc6a56a0): File cannot be read: /home/lzh/vnet/VNet/Data/Train/13.mhd for reading.
Reason: Success

@faustomilletari
Copy link
Owner

faustomilletari commented Jun 7, 2018 via email

@nikee1
Copy link
Author

nikee1 commented Jun 10, 2018

thank you! it worked ,i changed the format to mha . I have tried your code on the lung dataset without any chance, but unfortunately the test results is bad and it just marked very few blood vessels. So I changed the patch size. I changed the volsize from (128,128,64) to (64,64,64), and also I changed the dim ofthe input data and labels to (64,64,64). Then I met the error:

F0610 17:01:04.776181 23099 reshape_layer.cpp:86] Check failed: top[0]->count() == bottom[0]->count() (2097152 vs. 524288) output count must match input count
*** Check failure stack trace: ***
The dataset has shape: data - 20. labels – 20

I’m a beginner of the neural network. If you can tell me how to correct the error, or you have any good idea about how to improve the accuracy of the lung dataset, I would be appreciate a lot!!

@faustomilletari
Copy link
Owner

faustomilletari commented Jun 11, 2018 via email

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

2 participants