diff --git a/228_semantic_segmentation_of_aerial_imagery_using_unet/228_training_aerial_imagery.py b/228_semantic_segmentation_of_aerial_imagery_using_unet/228_training_aerial_imagery.py index a0e93e436..09223f289 100644 --- a/228_semantic_segmentation_of_aerial_imagery_using_unet/228_training_aerial_imagery.py +++ b/228_semantic_segmentation_of_aerial_imagery_using_unet/228_training_aerial_imagery.py @@ -177,8 +177,8 @@ label = single_patch_mask # Now replace RGB to integer values to be used as labels. -#Find pixels with combination of RGB for the above defined arrays... -#if matches then replace all values in that pixel with a specific integer +# Find pixels with combination of RGB for the above defined arrays... +# if matches then replace all values in that pixel with a specific integer def rgb_to_2D_label(label): """ Suply our labale masks as input in RGB format. @@ -207,7 +207,7 @@ def rgb_to_2D_label(label): print("Unique labels in label dataset are: ", np.unique(labels)) -#Another Sanity check, view few mages +#Another Sanity check, view few images import random import numpy as np image_number = random.randint(0, len(image_dataset)) @@ -287,7 +287,7 @@ def get_model(): #model.save('models/satellite_standard_unet_100epochs_7May2021.hdf5') ############################################################ -#TRY ANOTHE MODEL - WITH PRETRINED WEIGHTS +#TRY ANOTHER MODEL - WITH PRETRAINED WEIGHTS #Resnet backbone BACKBONE = 'resnet34' preprocess_input = sm.get_preprocessing(BACKBONE)