Icon

01. Data Importing and Preprocessing - solution

Data Importing and PreprocessingLoad the training data, training labels and test data in the workflow and preprocess the images for the neural network. Read in the training images- Read in the train_volume.tifHint: Use the List Files/Folders node and the Path to Stringnode to provide an input for the Image Reader (Table) node Read in the training labels- Read in the train_labels.tifHint: Use the List Files/Folders node and the Path to Stringnode to provide an input for the Image Reader (Table) node Preprocessing of Training and Test images1. Split the image object using the Splitter node2. Transpose the table using the Transpose node (transposes Row -> Column)3. Rename the column to 'image" using the Column Rename node4. Resize the image to (224,224) as absolute image size using the Image Resizer node5. Normalize the pixels of the image to [-1.0,1.0] using the Image Calculator node (Hint: The greyscale is [0, 255] so ($image$-127.5)/127.5 with floattype pixels will normalize the pixels to [-1.0,1.0].)6. Use the RowID node to assign new RowIDs to the rows.7. Create a component combining all the data manipulation nodes 8. Create a shared component and save it in the data folder (with a workflow-relative link) Preprocessing of Training and Test images1. Split the image object using the Splitter node2. Transpose the table using the Transpose node (transposes Row -> Column)3. Rename the column to 'Label" using the Column Rename node4. Resize the label to (224,224) as absolute image size using the Image Resizer node5. Encode the pixels of the label to 0 or 1 using the Image Calculator node (Hint: The greyscale is [0, 255] so ($label$/255 with inttype pixels will normalize the pixels to 0 or 1.)6. Use the RowID node to assign new RowIDs to the rows. Write preprocessed training data to file1. Join the training images with the training labels using theJoiner node2. Write the table to a file in the data folder using the Table Writernode (Hint: Use relative to workflow and "../../data/training_data.table") resize the imagesto (224, 224)normalize labelsto have values in [-1,1]training_data.tableImage Resizer Splitter Transpose RowID Column Rename Image Calculator List Files/Folders Image Reader(Table) Path to String List Files/Folders Path to String Image Reader(Table) PreprocessingImages Joiner Table Writer Data Importing and PreprocessingLoad the training data, training labels and test data in the workflow and preprocess the images for the neural network. Read in the training images- Read in the train_volume.tifHint: Use the List Files/Folders node and the Path to Stringnode to provide an input for the Image Reader (Table) node Read in the training labels- Read in the train_labels.tifHint: Use the List Files/Folders node and the Path to Stringnode to provide an input for the Image Reader (Table) node Preprocessing of Training and Test images1. Split the image object using the Splitter node2. Transpose the table using the Transpose node (transposes Row -> Column)3. Rename the column to 'image" using the Column Rename node4. Resize the image to (224,224) as absolute image size using the Image Resizer node5. Normalize the pixels of the image to [-1.0,1.0] using the Image Calculator node (Hint: The greyscale is [0, 255] so ($image$-127.5)/127.5 with floattype pixels will normalize the pixels to [-1.0,1.0].)6. Use the RowID node to assign new RowIDs to the rows.7. Create a component combining all the data manipulation nodes 8. Create a shared component and save it in the data folder (with a workflow-relative link) Preprocessing of Training and Test images1. Split the image object using the Splitter node2. Transpose the table using the Transpose node (transposes Row -> Column)3. Rename the column to 'Label" using the Column Rename node4. Resize the label to (224,224) as absolute image size using the Image Resizer node5. Encode the pixels of the label to 0 or 1 using the Image Calculator node (Hint: The greyscale is [0, 255] so ($label$/255 with inttype pixels will normalize the pixels to 0 or 1.)6. Use the RowID node to assign new RowIDs to the rows. Write preprocessed training data to file1. Join the training images with the training labels using theJoiner node2. Write the table to a file in the data folder using the Table Writernode (Hint: Use relative to workflow and "../../data/training_data.table") resize the imagesto (224, 224)normalize labelsto have values in [-1,1]training_data.tableImage Resizer Splitter Transpose RowID Column Rename Image Calculator List Files/Folders Image Reader(Table) Path to String List Files/Folders Path to String Image Reader(Table) PreprocessingImages Joiner Table Writer

Nodes

Extensions

Links