Icon

03. Train Model

Annotations and comments
  • Train a Unet using No-Code nodes 1. Partition your data using the Partitioning node (Settings: Relative partitioning size 80%, Draw randomly) 2. Use the Conda Environment Propagation node to ensure the correct conda environment (use the Keras environment created in the previous exercise under Preferences) is selected. 3. Read in your U-Net from the previous exercise using the Keras Network Reader node %%00009- Executable Selection tab: select conda environment flow variable 4. Use the Keras Network Learner node to train the model %%00009- connections: %%00009%%00009- use the training data (upper output port from the Partitioning node) as input %%00009%%00009- use the model from the Keras Network Reader as model input %%00009%%00009- connect the conda environment flow variable from the Conda Environment Propagation node to the Flow Variable input port %%00009- Node Settings: %%00009%%00009- input column: preprocessed image column "Img Calc" %%00009%%00009- target column: preprocessed label column "Label Calc" %%00009%%00009- options: epochs: 15, training batch size: 5, optimizer: Adam %%00009%%00009- Executable Selection tab: select conda environment flow variable 5. Use the Keras Network Executor node to predict on the test data %%00009- Node settings: %%00009%%00009- input columns: preprocessed image column "Img Calc" %%00009%%00009- add output: select "conv2d_19/Sigmoid:0", Conversion: "To Image", rename column "output" %%00009%%00009- Executable Selection tab: select conda environment flow variable 6. Use Model Writer node to save your trained model to a file named trained.model in the data folder %%00009(Hint: use workflow relative path: ../../data/trained.model) 7. Use the Interactive Segmentation View node to evaluate your prediction results
  • convert labelings to byte
  • predicted labels
  • u-net.h5

Nodes

Extensions

Links