GithubHelp home page GithubHelp logo

andywangon / brain-tumor-segmentation-using-deep-learning Goto Github PK

View Code? Open in Web Editor NEW
54.0 54.0 29.0 820 KB

#BRATS2015 #BRATS2018 #deep learning #fully automatic brain tumor segmentation #U-net # tensorflow #Keras

Python 3.04% Jupyter Notebook 96.96%
brain-tumor brats deep-learning keras mri tensorflow u-net

brain-tumor-segmentation-using-deep-learning's People

Contributors

andywangon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

brain-tumor-segmentation-using-deep-learning's Issues

your article

Hello
I have error:
C:\Users\pars.conda\envs\tensorflow\lib\site-packages\ipykernel_launcher.py:22: UserWarning: The merge function is deprecated and will be removed after 08/2017. Use instead layers from keras.layers.merge, e.g. add, concatenate, etc.
C:\Users\pars.conda\envs\tensorflow\lib\site-packages\keras\legacy\layers.py:465: UserWarning: The Merge layer is deprecated and will be removed after 08/2017. Use instead layers from keras.layers.merge, e.g. add, concatenate, etc.
name=name)

ValueError Traceback (most recent call last)
in ()
3 num = 31100
4
----> 5 model = unet_model()

in unet_model()
20 conv5 = Conv2D(512, (3, 3), activation='relu', padding='same')(conv5)
21
---> 22 up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)
23 conv6 = Conv2D(256, (3, 3), activation='relu', padding='same')(up6)
24 conv6 = Conv2D(256, (3, 3), activation='relu', padding='same')(conv6)

~.conda\envs\tensorflow\lib\site-packages\keras\legacy\layers.py in merge(inputs, mode, concat_axis, dot_axes, output_shape, output_mask, arguments, name)
463 node_indices=node_indices,
464 tensor_indices=tensor_indices,
--> 465 name=name)
466 return merge_layer._inbound_nodes[0].output_tensors[0]
467 else:

~.conda\envs\tensorflow\lib\site-packages\keras\legacy\layers.py in init(self, layers, mode, concat_axis, dot_axes, output_shape, output_mask, arguments, node_indices, tensor_indices, name)
116 self._arguments_validation(layers, mode,
117 concat_axis, dot_axes,
--> 118 node_indices, tensor_indices)
119 self.built = True
120 input_tensors = []

~.conda\envs\tensorflow\lib\site-packages\keras\legacy\layers.py in _arguments_validation(self, layers, mode, concat_axis, dot_axes, node_indices, tensor_indices)
196 'layers with matching '
197 'output shapes except for the concat axis. '
--> 198 'Layer shapes: %s' % (input_shapes))
199
200 def call(self, inputs, mask=None):

ValueError: "concat" mode can only merge layers with matching output shapes except for the concat axis. Layer shapes: [(None, 512, 14, 14), (None, 256, 15, 15)]

can you help me?

please help in this regard.

Sir
Really, you have done wonderful work. But there is not available the file weights-full-best .h5.
how to overcome this.

How to cite

This is not a problem. Just a question. your work is great! It inspired me to modify to suit my problem. How to cite your work ?

Thanks.

Problem of weights file

First, thank you for your sharing! But When I used your weights-full-best.h5, I got a problem as :

ValueError: You are trying to load a weight file containing 41 layers into a model with 40 layers.

I am sure that I did not modify your model, so why I got this problem?

Missing file

Hey, could you please send the files which are mentioned in the below code

#%%

catch all T1c.mha

create_data('/home/andy/Brain_tumor/BRATS2015/BRATS2015_Training/HGG/', '/Flair.mha', label=False, resize=(155,img_size,img_size))
create_data('/home/andy/Brain_tumor/BRATS2015/BRATS2015_Training/HGG/', '
/OT.mha', label=True, resize=(155,img_size,img_size))

#%%

catch BRATS2017 Data

create_data('/home/andy/Brain_tumor/BRATS2017/Pre-operative_TCGA_GBM_NIfTI_and_Segmentations/', '/*_flair.nii.gz', label=False, resize=(155,img_size,img_size))
create_data('/home/andy/Brain_tumor/BRATS2017/Pre-operative_TCGA_GBM_NIfTI_and_Segmentations/', '
/*_GlistrBoost_ManuallyCorrected.nii.gz', label=True, resize=(155,img_size,img_size))

#%%

load numpy array data

x = np.load('/home/andy/x_{}.npy'.format(img_size))
y = np.load('/home/andy/y_{}.npy'.format(img_size))

training set for tumor core

Hi,
Thank you for sharing! I wonder if you still keep the code of making the training set for tumor core segmentation? I wrote a piece of codes by myself based on the readme document, but it didn't work very well. The DSC is only about 0.4 after 50 epochs.

pretrained models

Can you please share saved models .h5 files which are missing, without these am unable to run the code

Parameters for model Training

#history = model.fit(x, y, batch_size=16, validation_split=0,validation_data = (val_x,val_y) ,epochs = 40,callbacks = callbacks_list ,verbose=1, shuffle=True)
I have the dataset with me, i'm trying to train the model but can't get what are the x and y in the above line. Also it would be great if you tell how you have defined x and y.
Please Help

Not able to load weight file.

On loading ET/ core weight file, I am getting these errors:

OSError: Unable to open file (truncated file: eof = 74436151, sblock->base_addr = 0, stored_eof = 257557808)

ValueError: Cannot create group in read only mode.

CT Image

Hi, may I ask if I can use the weights for kidney tumour segmentation, which are based on CT images?

"TypeError": 'module' object is not callable......

merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)

when I Run the above line....it gave me the following error...Kindly reply as fast as possible

"
Traceback (most recent call last):
File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pydev\pydevd.py", line 1664, in
main()
File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pydev\pydevd.py", line 1658, in main
globals = debugger.run(setup['file'], None, None, is_module)
File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pydev\pydevd.py", line 1068, in run
pydev_imports.execfile(file, globals, locals) # execute the script
File "C:\Program Files\JetBrains\PyCharm 2018.1.3\helpers\pydev_pydev_imps_pydev_execfile.py", line 18, in execfile
exec(compile(contents+"\n", file, 'exec'), glob, loc)
File "C:/Users/Mubeen/Downloads/Brain-tumor-segmentation-using-deep-learning-master/BRATS2015.py", line 187, in
model = unet_model()
File "C:/Users/Mubeen/Downloads/Brain-tumor-segmentation-using-deep-learning-master/BRATS2015.py", line 140, in unet_model
up6 = merge([UpSampling2D(size=(2, 2))(conv5), conv4], mode='concat', concat_axis=1)
TypeError: 'module' object is not callable
"

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.