taigw / brats17

Brain tumor segmentation for MICCAI 2017 BraTS challenge
BSD 3-Clause "New" or "Revised" License
324 stars 130 forks source link

Question about data and label shape #20

Open xinrui-zhuang opened 6 years ago

xinrui-zhuang commented 6 years ago

@taigw in the config file, data_shape= [19, 144, 144, 4], label_shape= [11, 144, 144, 1],why the label has different shape with the data, shouldn't the label shape=[19,144,144,1] ? Thanks for your answers

HowieMa commented 6 years ago

Well, it is the problem of the model if self ! You could revise util/MSNet.py like

if __name__ == '__main__':
    x = tf.placeholder(tf.float32, shape = [1, 96, 96, 96, 1])
    y = tf.placeholder(tf.float32, shape = [1, 96, 96, 96, 2])
    net = MSNet(num_classes=2)
    predicty = net(x, is_training = True)
    print(x)
    print(predicty)
    print (Y)

ant run it like

python util/MSNet.py

You will find that the result is

shape .....
(1, 96, 96, 96, 1)
(1, 88, 96, 96, 2)
(1, 96, 96, 96, 2)

I hope this could help you solve the problem

taigw commented 5 years ago

@xinrui-zhuang , I used 'valid' mode for convolution in z-axis, so the outoput had a smaller size in z-axis.