GithubHelp home page GithubHelp logo

xmengli / h-denseunet Goto Github PK

View Code? Open in Web Editor NEW
525.0 525.0 161.0 13.79 MB

TMI 2018. H-DenseUNet: Hybrid Densely Connected UNet for Liver and Tumor Segmentation from CT Volumes

Python 100.00% Shell 0.01%

h-denseunet's People

Contributors

xmengli 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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

h-denseunet's Issues

Google driver links are broken

Hello, I tried to download the liver mask and pre-trained model on the google driver links. However, I found that these links are broken. Could you please renew the links?

Question about Upsampling layer input

Hello,I can not find 'long skip' in the Up-sampling process ,which your paper has mentioned. i wonder that the Up-sampling process only take the output of dense encoder without long skip from the front layers.
in your paper
image
project just take X for input
up0 = UpSampling2D(size=(2,2))(x)
conv_up0 = Conv2D(768, (3, 3), padding="same", kernel_initializer="normal", name = "conv_up0")(up0)

about cropp_img -= args.mean?

hi,
I have a question about args.mean?
what the mean args.mean? and why you are sub the args.mean for the cropp_img?

Look forward to your reply.

Question about Training 3D Net

Hello, when I run CUDA_VISIBLE_DEVICES='0' python train_hybrid.py -arch 3dpart , there was a problem as the following:

Traceback (most recent call last):
      File "train_ hybrid.py". line 218, in <modules
      train_ and_ predict(args )
      File "train_ hybrid.py". line 146, in train and_ predict
      model. load_ weights (args .model_ weight, by_ name=True, by_ gpu=True, two_ model=True, by_ flag=True)File "Keras-2. 0.8/keras/engine/ topology.py" line 2621, in load_ weights
      load_ weights_ from_ hdf5_ group_ by_ name_ mulgpu_ twomodelcombine(f, self.layers, by_ flag)
      File "Keras-2 .0.8/keras/ engine/ topology.py" line 3276, in load weights_ from_ hdf5_ group_ by_ name_ mulgpu_ twomodelcombine
      f = f[' denseul6l']
      File "h5py/_ objects.pyx". line 54, in h5py._ objects .with_ phil . wrapperFile "h5py/_ objects.pyx", line 55, in h5py._ objects.with_ phil.wrapper
      File "/usr/local/lib/python2 .7/dist -packages/h5py/_ hl/group.py". line 177, in_ getitem__
      oid = h5o.open(self.id, self._ e(name), lapl=self._ lapl)
     File "h5py/_ objects.pyx", line 54, in h5py._ objects .with_ phil.wrapperFile "h5py/_ objects.pyx". line 55, in h5py._ objects .with_ phil.wrapperFile "h5py/h5o. pyx",. line 190, in h5py.h5o . open

KeyError: "Unable to open object (object ' denseul6l' doesn't exist)"

Why did this happen? How to solve it?

prediction about 2d-denseUnet

hello~ how could we use the trained 2d-denseUnet model to predict the liver areas. Should we change the predict_tumor_inwindow function in test.py? thanks~

some question about the layer box in denseunet in your code

In the general UNet, layer will be appended to the layer box while down sampling, and concated with the feature map while up sampling, In your code, I think layers in layer box will be added to the decoder feature map, but I found that you did nothing with layer box while up sampling, could you please explain the reason about that? Thanks.

some questions of training train_hybrid.py with using multi_gpu_model

when I train train_hybrid.py with using muti_gpu_model, there is some error: Traceback (most recent call last): File "train_hybrid0.py", line 226, in <module> train_and_predict(args) File "train_hybrid0.py", line 152, in train_and_predict model = multi_gpu_model(model, 3) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/utils/multi_gpu_utils.py", line 226, in multi_gpu_model outputs = model(inputs) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/engine/base_layer.py", line 460, in __call__ output = self.call(inputs, **kwargs) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/engine/network.py", line 573, in call output_tensors, _, _ = self.run_internal_graph(inputs, masks) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/engine/network.py", line 746, in run_internal_graph layer.call(computed_tensors, **kwargs)) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/layers/merge.py", line 155, in call return self._merge_function(inputs) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/layers/merge.py", line 357, in _merge_function return K.concatenate(inputs, axis=self.axis) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/keras/backend/tensorflow_backend.py", line 1923, in concatenate return tf.concat([to_dense(x) for x in tensors], axis) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/ops/array_ops.py", line 1114, in concat return gen_array_ops.concat_v2(values=values, axis=axis, name=name) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/ops/gen_array_ops.py", line 1030, in concat_v2 "ConcatV2", values=values, axis=axis, name=name) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/op_def_library.py", line 787, in _apply_op_helper op_def=op_def) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 454, in new_func return func(*args, **kwargs) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 3155, in create_op op_def=op_def) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1731, in __init__ control_input_ops) File "/AI/Speech/Student/speech14/virtualenv/anaconda/lib/python3.6/site-packages/tensorflow/python/framework/ops.py", line 1579, in _create_c_op raise ValueError(str(e)) ValueError: Dimension 0 in both shapes must be equal, but are 0 and 1. Shapes are [0,224,224,8] and [1,224,224,0]. for 'replica_0/auto3d_residual_conv/concatenate_24/concat' (op: 'ConcatV2') with input shapes: [0,224,224,8,1], [1,224,224,0,3], [] and with computed input tensors: input[2] = <4>.
could you tell me how to modify it ?

a question about result

hello, author.
I run the whole code, the result is not same as your result in the paper and competition. I want to know what improvements you have made.

Looking forward to your reply!
Thank you very much

Question about 2D denseunet training

In the code, it shows that 2D denseunet will train 6000 epochs without validation set. My question is when to stop the training. I guess that training the model for 6000 epochs and pick the one that has lowest training loss, it that correct? Thanks.

How do the "model_best.hdf5" be generated?

Hi!

I have followed the procedure in README:

  1. load "densenet161_weights_tf.h5" and train 2D DenseUNet.
  2. load "model_best.hdf5" and train 3dpart H-DenseUNet.
  3. load "model_best.hdf5" and train end2end H-DenseUNet.

Since I just simply download your fine-trained model's weights, it seems that I haven't go through the completed procedure as you do.

I wonder how do you generate file "model_best.hdf5", my understanding is as follow, could you please correct it? Thank you very much!

  1. train 2d part of H-DenseUNet
    load "densenet161_weights_tf.h5" and train 2D DenseUNet, train and save all epochs' weight

  2. train 3d part and HFF part of H-DenseUNet
    load the best epoch's weight from "1"(2d part), set 2d part of H-DenseUNet to be untrainable, just
    train 3d part and HFF part of H-DenseUNet, train and save all epochs' weight

  3. fine tune H-DenseUNet
    load the best epoch's weight from "2"(the whole H-DenseUNet), set 2d part of H-DenseUNet to be
    trainable, train and save all epochs' weight. (since all componets of H-DenseUNet are already be
    trained, the "end2end" mode is doing the fine tune work, is my comprehesion right?)

  4. the best epoch's weight from "3" becomes the file "model_best.hdf5"

Some questions about the train_2ddense.py

Hello, please ask line 62 in the train_2ddense.py code:

crop_img = img[a - deps / 2:a + deps / 2, b - rows / 2:b + rows / 2,
                c - cols / 2: c + cols / 2 + 1].copy()
cropp_tumor = tumor[a - deps / 2:a + deps / 2, b - rows / 2:b + rows / 2,
                  c - cols / 2:c + cols / 2 + 1].copy()

What function does this code play? The colon here in python: What kind of arithmetic operation is it?

some questions about train_hybrid.py

I followed your advise:
3.Train 2D DenseUnet: First, you need to download the pretrained model from ImageNet Pretrained, extract it and put it in the folder 'model'. Then run:

sh bash_train.sh

And I save the model in Experiments/model
Then I edit the train_hybrid.py and change the model_weight = ./Experiments/model/weights.96-0.03.hdf5(the model I trained in step 3)

Then I run the train_hybrid.py but in vain.

CUDA_VISIBLE_DEVICES='2' python train_hybrid.py -mode 3dpart
Using TensorFlow backend.

Creating and compiling model...

Traceback (most recent call last):
File "train_hybrid.py", line 212, in
train_and_predict(args)
File "train_hybrid.py", line 145, in train_and_predict
model.load_weights(args.model_weight)
File "Keras-2.0.8/keras/engine/topology.py", line 2627, in load_weights
load_weights_from_hdf5_group(f, self.layers)
File "Keras-2.0.8/keras/engine/topology.py", line 3076, in load_weights_from_hdf5_group
str(len(filtered_layers)) + ' layers.')
ValueError: You are trying to load a weight file containing 1 layers into a model with 682 layers.

So I misunderstand the step?
By the way ,I want to know whether I can use the model I trained in step 3 to directly generate the liver and tumor mask?I tried to edit the test.py and change the model_weight= the model I trained in step 3.
Then the error occured.
up0_sum = add([line0, up0])
File "Keras-2.0.8/keras/layers/merge.py", line 519, in add
return Add(**kwargs)(inputs)
File "Keras-2.0.8/keras/engine/topology.py", line 577, in call
self.build(input_shapes)
File "Keras-2.0.8/keras/layers/merge.py", line 84, in build
output_shape = self._compute_elemwise_op_output_shape(output_shape, shape)
File "Keras-2.0.8/keras/layers/merge.py", line 55, in _compute_elemwise_op_output_shape
str(shape1) + ' ' + str(shape2))
ValueError: Operands could not be broadcast together with shapes (32, 32, 2208) (32, 32, 3840)
Anything else I have to edit?

slow training

When i run train_2ddense.py, every epoch takes more than 1000s. I use 2 GPUs so I changed the '-b' paramaters to be 20 instead of 40. And Considering the total epoch is set to be 6000, the whole training process could take months.

Is that normal? How could I speeeeed up? Thanks in advance!

getting Liver mask

i know livermasks are given by simple resnet
would you mind to give some simple resnet links or codes or repository that can make livermasks?

i read your paper. you said simple resnet is used to get quick but coarse segmentation of liver in [40]"Automatic liver lesion segmentation using a deep convolutional neural network method". but it has no repository in paper. so i want to get some help from you...

out of memory

Hello xmengli, I have an issue when run your program:

When run test.py, I got out of memory error. Some test cases are OK but some cases are too big that I got a ResourceExhaustedError.

My Mem is 126G, so I think it is big enough. Any idea about how to solve it?

thanks in advance!

The keras problem about the bash_train.sh

hello
I download the HdenseUnet from your github.But some error occured when I run the code:sh bash_train.sh
Traceback (most recent call last):
File "train_2ddense.py", line 215, in
train_and_predict()
File "train_2ddense.py", line 210, in train_and_predict
workers=3, use_multiprocessing=False)
File "Keras-2.0.8/keras/legacy/interfaces.py", line 87, in wrapper
return func(*args, **kwargs)
File "Keras-2.0.8/keras/engine/training.py", line 2011, in fit_generator
generator_output = next(output_generator)
StopIteration
Could you give me some help?
Thanks!

Some inconsistencies between the paper and the code.

Hi,
I read your paper H-DenseUNet: Hybrid Densely Connected UNet for Liver and Tumor Segmentation from CT Volumes and find some inconsistencies between the network structure in your paper and the released code.
(1) In the Table I of your paper, the upsampling layers of 2D DenseUNet or 3D DenseUNet is composed of a 2x2 upsampling and a dense block, while in the code, the upsampling layers are composed of a 2x2 upsampling and only one convolution (for example, see the line 154 and line 241 in hybridnet.py).
(2) Meanwhile, in your released code, I notice that the UNet-like connections in the 3D DenseUNet are commented out (see the line 153 in hybridnet.py), which is not the same as it in your paper.
Could you please help me figure it out?

question about testing scheme

Hi. Thanks for your code.
The test.py script is for H-DenseUNet. In that script, it seems that you slide a box sized 1x512x512x8x1 along the z-axis to make the prediction. the step size is 2.

Recently I'm implementing your code in pytorch, I want to test on 2D DenseUNet, I'm wondering that if testing on 2D DenseUNet follows the similar scheme, that is to say:
Find leftmost and rightmost z coordinates based on the coarse liver mask,
Then slide a box sized 1x512x512x3 along the z-axis to make the prediction on the middle slice. the step size is set up to 1.

is that correct? thanks!

About the test dataset

In the LiTS google cloud, there is not a folder for test data. All of the images(131) are for the training. When I run the test.py the livermask dimension is not the same as the test data. I want to know where do you get the test dataset? Or can you tell me what is the dataset you use for the coarse mask? Thanks a lot.

dimension unmatch

HI,

I am interested in your work!

I have some questions when i am testing your model. For example, I download the mask_ori you provided, then run the test.py. However, Segmask = Segmask * liver_labels always have dimension unmatched problem. Here is the hint:

ValueError: operands could not be broadcast together with shapes (512,512,75) (512,512,163)

I am wondering whether the dimension of mask_ori match that of original images?

Pretrained Model

Hi, I‘ve paid attention to your research for some time. Would you like to show your pretrained model of H-DenseUNet? Or weights-drop3-3.46-0.02.hdf5 in the code?

How did the input image became 224*224?

The original input image is 512x512, all the same. After the course liver segmentation (first step), the input size could be smaller but not always the same as 224*224 because every liver is different.

so how did the input image became 224x224?

Problem run test.py

Hello,

Thanks really nice paper. I am so impressed about work that you have already done.
I would like to run your code.
I am getting an error running test.py
Could you help me please ?

C:\Users\krasona\PycharmProjects\HCCLiver\venv\Scripts\python.exe C:/Users/krasona/PycharmProjects/HCCLiver/test.py
Using TensorFlow backend.
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:516: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:517: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:518: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:519: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:520: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorflow\python\framework\dtypes.py:525: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:541: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint8 = np.dtype([("qint8", np.int8, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:542: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint8 = np.dtype([("quint8", np.uint8, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:543: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint16 = np.dtype([("qint16", np.int16, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:544: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_quint16 = np.dtype([("quint16", np.uint16, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:545: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  _np_qint32 = np.dtype([("qint32", np.int32, 1)])
C:\Users\krasona\PycharmProjects\HCCLiver\venv\lib\site-packages\tensorboard\compat\tensorflow_stub\dtypes.py:550: FutureWarning: Passing (type, 1) or '1type' as a synonym of type is deprecated; in a future version of numpy, it will be understood as (type, (1,)) / '(1,)type'.
  np_resource = np.dtype([("resource", np.ubyte, 1)])
Traceback (most recent call last):
  File "C:/Users/krasona/PycharmProjects/HCCLiver/test.py", line 4, in <module>
    from keras import backend as K
  File "Keras-2.0.8\keras\__init__.py", line 4, in <module>
    from . import activations
  File "Keras-2.0.8\keras\activations.py", line 6, in <module>
    from .engine import Layer
  File "Keras-2.0.8\keras\engine\__init__.py", line 3, in <module>
    from .topology import InputSpec
  File "Keras-2.0.8\keras\engine\topology.py", line 8, in <module>
    import yaml
  File "Keras-2.0.8\yaml\__init__.py", line 2, in <module>
    from error import *
ModuleNotFoundError: No module named 'error'

about the ResNet to get "coarse" livermask

Hi, about the livermask, there're some question:
Judging by checking the *-ori.nii data, i find the livermask has little false positiver in view of liver slice, which is pretty good! So what i want to ask for is that how bigger is the "simple ResNet" to get this? like resnet18 such small or resnet101 such big?And i think there should be a little preprocess to get the "coarse" livermask? Hope to get a reply...

Some questions about codes?

您好,我对代码有几点不是很清楚,能解答一下嘛,万分感谢~~~
(1)在训练dense-2dunet是时,训练数据应该类似于shuffle的吧,并没有将3D的数据块转换成2D的训练。
(2)在训练3D的时候,3dpart和end2end有什么区别吗,模型好像没什么区别。
(3)在训练3D的时候,使用的是一块gpu,batch_size只能设置1,设置其他的在最后数据变换的时候会报错。

Hybrid Feature

Hello, when I mixed the features between 2D and 3D, there was a problem:

Traceback most recent call last) :
File "test.py". line 121, in -module>
predict(args)
File "test.py". line 48, in predict
model = dense_ rnn_ net(args )
File " /home/H- DenseUNet/hybridnet.py" line 415, in dense_ rnn_ net
final = add([feature3d, fea2d])
File "Keras-2.0. 8/keras/layers/merge.py line 5l9, in add
return Add(**kwa rgs ) (inputs )
File "Keras 2.0.8/keras/ engine/topology.py". line 577, in_ call__
self . build(input_ shapes)
File "Keras 2.0.8/keras/layers/mergepy" line 84, in build
output_ shape = self._ compute_ elemwise_ op_ output_ shape(output_ shape, shape )
File "Keras-2. 0.8/keras/layers/merge.py line 55, in_ compute_ elemwise_ op_ output. shape
str(shapel) + " ' + str(shape2))
ValueError: Operands could not be broadcast together with shapes (224. 224, 4, 64) (224, 224, 3, 64)

Can you give me some help?

liver mask

As you mentioned in your paper,

A simple ResNet is trained to get a quick but coarse segmentation of liver

Thus, I am wondering whether the liver masks which are given in the README should be the generated liver mask?

Thank you very much!

when open?

Hi, I am very interested in your work. When the full codes will be shared in this site?

Thank you very much!

Owen

Some questions about train 2D DenseUnet

When I run sh bash_train.sh , there were some questions as the following:

Traceback (most recent call last):
      File "train_ 2ddense.py". line 215, in <modulestrain_ and_ predictl
      File "train_ 2ddense.py". line 180, in train_ and_ predict
      model = make_ parallel (model, args.b 1 l0, mini_ batch=l)
      File "Keras-2.0. 8/keras/utils2/multi gpu.py". line 68, in make_ parallel
      merged . append(concatenate(outputs axis=0))
      File "Keras-2.0. 8/keras/layers/merge.py line 600 in concatenate
      return Concatenate(axis=axis, **kwa rgs ) (inputs )
      File "Keras-2.0. 8/keras/engine/topologypy line 602, in_ call__
      output = self . call(inputs, **kwargs )
      File "Keras-2. 0.8/keras/layers/merge.py line 332, in call
      return K.concatenate(inputs axis=self .axis)
      File "Keras-2.0. 8/keras/backend/tensorflow_ backend.py". line 1707. in concatenate 
      return tf . sparse_ concat(axis, tensors )
      File " /usr/local/lib/python2.7/dist -packages/ tenso rflow/python/ops/sparse_ ops.py". line 237. in sparse_ concat
gen_ sparse_ ops._ sparse_ concat(inds, vals, shapes, axis, name=name) )
      File "/usr/local/lib/python2 .7/dist- packages/ tenso rflow/ python/ops/gen_ sparse_ ops.py". line 663, in_ sparse_ concat
      concat_ dim=concat_ dim. namename)
      File "/usr/local/lib/python2 .7/dist -packages/ tensorf Low/ python/ framework/op_ def_ library.py". line 570, in ,apply_ op_ helper
      (input_ name, op_ type_ name, len(values), num_ attr.minimum )
ValueError: List argument ' indices' to 'SparseConcat' 0p with length 0 shorter than minimum length 2.

So why did these happen? How to solve them?

What was the process to get 224x224xz image shapes?

Hello,
First thank you for this very interesting article and the code you give.
I have some questions about how you get this shape of 224x224x12.
Could you please clarify on what is the preprocessing done on the original images?
In other words the original are of shape 512x512xz, did you do a resampling before/after the ResNet to get 224x224xz?
After getting the masks from the ResNet, if I understand well you crop and keep only the region of interest containing Liver by looking to the mask predicted. Are you then taking patched volumes of dimension 12 along z ?
Do all the 12 slices of each patched volume contain at least one pixel corresponding to the leaver ?
Thank you for your help.

Just a little question about multi-gpu model

Hello,
in your code, you write your own mult-gpu model. I am a little confused since keras has native multi-gpu support. Is there any problem to use the parallel model in original Keras?

Sincerely

Question about the liver ROI with 224x224

Here the paper refs:

With the region of interest (ROI), our proposed H-DenseUNet efficiently probes...

After i read the code, i find that the 224x224 ROI is generated by 'resize' function, which confuse me a little. Can you explain this distinction to me?

What's more? There is a doubt that what should i do if i just want to test the 2D-DenseUNet instead of H-DenseUNet while your training strategy is accessed to 224x224, should i be violent to use the origin resolution of 512x512 to the 2D-DenseUNet test? How can i solve this problem?

Wish to a reply in the new year~

Last, Happy New Years~

A question about test.py

Hello,when I run test.py,there is a question
Traceback (most recent call last):
File "test.py", line 124, in
predict(args)
File "test.py", line 111, in predict
Segmask = np.dot(Segmask,liver_labels)
ValueError: shapes (512,512,75) and (512,512,163) not aligned: 75 (dim 2) != 512 (dim 1)

I have change Segmask = Segmask*liver_labels as Segmask = np.dot(Segmask,liver_labels)
Anyone could explain this question?thanks!

The question about 70 testing data

Can you share the 70 testing data again? There is nothing in the folder: data/TestingData. Also the website of LiTS dataset is invalid.

Could you tell me about your experimental environment?

I'm just a beginner. And I want to reproduce your code, but I often have errors when I run it. Could you tell me about your experimental environment? And could you tell me about the versions of your python and libraries?

some question about train_2ddense.py

hi, i am very interested in your work, but i have a question about the code in train_2ddense.py

    minindex[0] = max(minindex[0] - 3, 0)
    minindex[1] = max(minindex[1] - 3, 0)
    minindex[2] = max(minindex[2] - 3, 0)
    maxindex[0] = min(img.shape[0], maxindex[0] + 3)
    maxindex[1] = min(img.shape[1], maxindex[1] + 3)
    maxindex[2] = min(img.shape[2], maxindex[2] + 3)

I can't understand why it's subtract and add 3, why not other number?

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.