created a 3d-unet
" \n",
" plt.subplot(1, 3, 1)\n",
" plt.title('Input Image') \n",
- " plt.imshow(image[:,:,0])\n",
+ " plt.imshow(image[8,:,:,0])\n",
" plt.colorbar()\n",
" plt.axis('off')\n",
" \n",
" plt.subplot(1, 3, 2)\n",
" plt.title('True Mask') \n",
- " plt.imshow(mask[:,:,0])\n",
+ " plt.imshow(mask[0,:,:,0])\n",
" plt.colorbar()\n",
" plt.axis('off')\n",
"\n",
"\n",
" plt.subplot(1, 3, 3)\n",
" plt.title('Predicted Mask') \n",
- " plt.imshow(prediction[:,:,0])\n",
+ " plt.imshow(prediction[0,:,:,0])\n",
" plt.colorbar()\n",
" plt.axis('off')\n",
"\n",
"outputs": [],
"source": [
"mask_dims = training_masks.shape\n",
- "assert mask_dims[1] == mask_dims[2]\n",
+ "image_dims = training_images.shape\n",
+ "assert mask_dims[2] == mask_dims[3]\n",
"grid_size = int(mask_dims[2])\n",
+ "\n",
+ "assert grid_size == image_dims[2]\n",
+ "assert grid_size == image_dims[3]\n",
+ "\n",
+ "z_size = image_dims[1]\n",
"output_channels = int(mask_dims[-1])"
]
},
},
"outputs": [],
"source": [
- "grid_size = 128\n",
- "output_channels = 1\n",
- "inputs = tf.keras.layers.Input((16, grid_size, grid_size, 1))\n",
+ "inputs = tf.keras.layers.Input((z_size, grid_size, grid_size, 1))\n",
"x = inputs\n",
"skips = []\n",
"\n",
" display(image, mask, prediction)\n",
" plt.show()"
]
- },
- {
- "cell_type": "code",
- "execution_count": null,
- "metadata": {
- "id": "ps5frL5L6asQ"
- },
- "outputs": [],
- "source": []
}
],
"metadata": {
