andywangon / brain-tumor-segmentation-using-deep-learning Goto Github PK
View Code? Open in Web Editor NEW#BRATS2015 #BRATS2018 #deep learning #fully automatic brain tumor segmentation #U-net # tensorflow #Keras
#BRATS2015 #BRATS2018 #deep learning #fully automatic brain tumor segmentation #U-net # tensorflow #Keras
merge
function is deprecated and will be removed after 08/2017. Use instead layers from keras.layers.merge
, e.g. add
, concatenate
, etc.Merge
layer is deprecated and will be removed after 08/2017. Use instead layers from keras.layers.merge
, e.g. add
, concatenate
, etc.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?
Sir
Really, you have done wonderful work. But there is not available the file weights-full-best .h5.
how to overcome this.
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.
Hello
I need data to train the U-net model for Tumor core and ET
thank you
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?
Hey, could you please send the files which are mentioned in the below code
#%%
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))
#%%
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))
#%%
x = np.load('/home/andy/x_{}.npy'.format(img_size))
y = np.load('/home/andy/y_{}.npy'.format(img_size))
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.
Can you please share saved models .h5 files which are missing, without these am unable to run the code
Dear sir
I want to cite this, How to ?
#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
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.
Hi, may I ask if I can use the weights for kidney tumour segmentation, which are based on CT images?
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
"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.