MIC-DKFZ / BraTS2017

Apache License 2.0
74 stars 16 forks source link

How to change the predicted image into the original shape? #26

Closed yianzhongguo closed 5 years ago

yianzhongguo commented 5 years ago

@FabianIsensee Hi, sir. When the segmentation prediction was completed, the shape of the image is (128,128,128). How is it changed into a (240,240,155) image which is the same shape as the original image. Thank you!

FabianIsensee commented 5 years ago

You can plug any shape into the network. It does not have to be 128x128x128. If your patient is say 147x156x123 then you need to pad it to the next multiple of 16: 144x160x128, then put it into the prediction function, then crop back to original shape. Best, Fabian

yianzhongguo commented 5 years ago

Thank you! Now I have the dataset whose shape is (240,240,155). First it can be cropped into (128,128,128)(or any other required shape by the network input) since the input shape of the build_net is (128,128,128). Because the architecture of the network is U-net, its output shape is also the same as the input and is (128,128,128). My question is that how to restore the output(predicted) to the shape (240,240,155).