Skip to content

Customly designed U-Net architecture for counting number of buildings in satellite image and area of each building

Notifications You must be signed in to change notification settings

sukeshan/Satellite-Image-Segmentaion

Repository files navigation

Calculate area and number of buildings using Satellite Image Segmentation

Segmenttion.mp4

About

Used U-net architecture to segment the satellite images . Dataset used is from Inria (open-source platform) . Since satellite images have high resolution, it cannot be fit into the memory hence divided each images into smallpatches which are than stitched after prediction. Applied mirror padding to preserve smooth connection between patches when stitched together, synthetically generated data to overcome class imbalance. Due to low computation resources used depthwise separable convolution which reduced model size from 31 to 2.8 million parameterswithout impacting the accuracy . Achieved 89% validation accuracy.

Install Requirements

pip instal -r requirements.txt

Web_Page format

  streamlit run app.py

Model Prediction:

from prediction import predict
img = 'image file path'
weight = 'model pretrained weigth file path'
result = predict(img ,weight)

Train a model with your own dataset

Load Modules

from model import load_model
from generator import data_genertor
from loss import focal_loss
from metrics import IoU ,recall,precission ,f1score

Model fit

model = load_model()
x_train = data_generator(img_dir:list ,input_size :tuple )
y_train = data_generator(img_dir:list ,input_size :tuple )
model.compile(optimizer="adam" ,loss=focl_loss ,metrics = [IoU ,recall,precission ,f1score])
model.fit_generator( x_trin ,y_train ,batch_size =16 ,epochs = 50)

About

Customly designed U-Net architecture for counting number of buildings in satellite image and area of each building

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Languages