Icon

03. Train Model

Train a Unet using No-Code nodes1. 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 - Executable Selection tab: select conda environment flow variable4. Use the Keras Network Learner node to train the model - connections: - use the training data (upper output port from the Partitioning node) as input - use the model from the Keras Network Reader as model input - connect the conda environment flow variable from the Conda Environment Propagation node to the Flow Variable input port - Node Settings: - input column: preprocessed image column "Img Calc" - target column: preprocessed label column "Label Calc" - options: epochs: 15, training batch size: 5, optimizer: Adam - Executable Selection tab: select conda environment flow variable5. Use the Keras Network Executor node to predict on the test data - Node settings: - input columns: preprocessed image column "Img Calc" - add output: select "conv2d_19/Sigmoid:0", Conversion: "To Image", rename column "output" - Executable Selection tab: select conda environment flow variable6. Use Model Writer node to save your trained model to a file named trained.model in the data folder (Hint: use workflow relative path: ../../data/trained.model)7. Use the Interactive Segmentation View node to evaluate your prediction results training datau-net.h5convert labelings to bytepredicted labels Table Reader Keras NetworkReader Image Converter Image to Labeling InteractiveSegmentation View Joiner Conda EnvironmentPropagation Train a Unet using No-Code nodes1. 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 - Executable Selection tab: select conda environment flow variable4. Use the Keras Network Learner node to train the model - connections: - use the training data (upper output port from the Partitioning node) as input - use the model from the Keras Network Reader as model input - connect the conda environment flow variable from the Conda Environment Propagation node to the Flow Variable input port - Node Settings: - input column: preprocessed image column "Img Calc" - target column: preprocessed label column "Label Calc" - options: epochs: 15, training batch size: 5, optimizer: Adam - Executable Selection tab: select conda environment flow variable5. Use the Keras Network Executor node to predict on the test data - Node settings: - input columns: preprocessed image column "Img Calc" - add output: select "conv2d_19/Sigmoid:0", Conversion: "To Image", rename column "output" - Executable Selection tab: select conda environment flow variable6. Use Model Writer node to save your trained model to a file named trained.model in the data folder (Hint: use workflow relative path: ../../data/trained.model)7. Use the Interactive Segmentation View node to evaluate your prediction results training datau-net.h5convert labelings to bytepredicted labels Table Reader Keras NetworkReader Image Converter Image to Labeling InteractiveSegmentation View Joiner Conda EnvironmentPropagation

Nodes

Extensions

Links