Skip to content

zulfiqarAlibalti/U-Net-for-Semantic-Segmention

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

Unet-for-Semantic-Segmentation of Aerial Images

In this repository I make a project on segmentation using Convolutional Neural Network architecture called U-Net architecture on aerial imagery dataset captured by drone.

Content
    • Semantic Segmentation
    • U-Net Architecture
    • Data Preprocessing
    • Accuracy and loss plots
  • Semantic Segmentation

    Image segmentation is the task of partitioning an image into multiple segments. This makes it a whole lot easier to analyze the given image. And essentially, isn’t that what we are always striving for in computer vision? The below images perfectly illustrates the results of image segmentation

    image image

    As seen in the figure above, detecting the objects in the content of the image with the bonding box is called Object detection.Semantic Segmentation.

    U-Net Architecture

    U-Net is a specific type of CNN architecture that was bascially developed for biomedical images such as Computer Tomography(CT), MRI scans etc.

    The model consist of the encoder (contraction) which is the downsampling and decoder which is up-sampling parts and it is named as U-Net because of U-shaped of the scheme as shown in figure below.

    image

    In our Archecture.py

    • Input is defined as 256 x 256 x 3.
    • conv_1 consist of 16 filters,256 x 256 x 16 dimensions are obtained it is reduced to 128 x128 x 16 with Maxpooling in pool_1.
    • Similarly remaining layers architectures are shown in code.

    Data Preprocessing

    • In preprocessing first imported the Architecture as from Architecture import multiclass_unet_architecture, jacrad,jacard_loss
    • Resized the RGB images of size 6000 x 4000 to 256 x 256 pixels.
    • Rescale the RGB images using MinMaxScaler
    • Actual image(ground truth) are imported as there was 23 labels in dataset assigned to the content of the images based on the pixel values.
    • Label the dataset using `one-Hot-Encoded for classification
    • and separate the data into training and testing.

    Accuracy and Loss plots

    Accuracy metrics and Jacard index are used in the training process Adam use as Oprimizer, loss is set as categorical_crossentropy Below figures are validation-jaccard and loss of the training process

    loss loss