Icon

02. Define U-Net - solution

Annotations and comments
  • Create a U-Net Architecture network For Option 2: Create a Tensorflow2 environment under Preferences -> KNIME -> Python Deep Learning
  • Option 1: Create a Unet Architecture using No-Code nodes 1. Use the Keras Input Layer node to create the input layer of shape (224,224,1) 2. Create 5 Encoding Layers using the U-Net 2D Encoding Layer component with the following settings %%00009- Filter = 16, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.1, MaxPooling Pool Size = 2,2 %%00009- Filter = 32, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.1, MaxPooling Pool Size = 2,2 %%00009- Filter = 64, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.2, MaxPooling Pool Size = 2,2 %%00009- Filter = 128, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.2, MaxPooling Pool Size = 2,2 %%00009- Filter = 256, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.3, MaxPooling Pool Size = 2,2 3. Create 4 Decoding Layers using the U-Net 2D DEconding Layer component (the settings will be taken automatically from the Encoding Layers) 4. Create on final convolutional layer using the Keras Convolution 2D Layer node with Padding = "same" and Activation function = "Sigmoid" 5. Use the Keras Network Writer node to write your network to a file named u-net.h5 in the data folder %%00009(Hint: use workflow relative path: knime://knime.workflow/../../data/u-net.h5)
  • Option 2: Create a Unet Architecture using DL Python Nodes 1. In the Conda Environment propagation use the correct conda environment (using Tensorflow2 environment created in the beginning under Preferences) is selected. 2. In the DL Python Network Creator update the Python code to create a U-Net with 5 Encoding Layers and 4 Decoding Layers with the follwoing settings %%00009- Filter = 16, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.1, MaxPooling Pool Size = 2,2 %%00009- Filter = 32, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.1, MaxPooling Pool Size = 2,2 %%00009- Filter = 64, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.2, MaxPooling Pool Size = 2,2 %%00009- Filter = 128, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.2, MaxPooling Pool Size = 2,2 %%00009- Filter = 256, Activation function = "ELU”, Kernel Size = 3,3, Dropout Rate = 0.3, MaxPooling Pool Size = 2,2 3. Use the Tensorflow2 Network Writer node to write your network to a file named u-net-tf2.h5 in the data folder and make sure the conda.enrionment variable is selected in the Executable Tab %%00009(Hint: use workflow relative path: ../../data/u-net.h5)
  • UNet
  • 1
  • u-net.h5
  • u-net-tf2.h5
  • Check for flow variables from U-Net - Encoding layer
  • Kernel Size contains zero
  • MaxPooling size contains zero
  • incorrect Kernel format
  • incorrect Maxpooling format
  • Dropout Rate
  • Filter Input
  • random seed
  • Activation Function
  • Kernel Input
  • Pool Size

Nodes

Extensions

Links