All Projects → ManishSahu53 → Vector-Map-Generation-from-Aerial-Imagery-using-Deep-Learning-GeoSpatial-UNET

ManishSahu53 / Vector-Map-Generation-from-Aerial-Imagery-using-Deep-Learning-GeoSpatial-UNET

Licence: Apache-2.0 license
We propose a simple yet efficient technique to leverage semantic segmentation model to extract and separate individual buildings in densely compacted areas using medium resolution satellite/UAV orthoimages. We adopted standard UNET architecture, additionally added batch normalization layer after every convolution, to label every pixel in the ima…

Programming Languages

python
139335 projects - #7 most used programming language
Dockerfile
14818 projects

Projects that are alternatives of or similar to Vector-Map-Generation-from-Aerial-Imagery-using-Deep-Learning-GeoSpatial-UNET

Awesome Geospatial Companies
🌐 List of 500+ geospatial companies (GIS, Earth Observation, UAV, Satellite, Digital Farming, ..)
Stars: ✭ 184 (+148.65%)
Mutual labels:  uav, satellite, geospatial
Solaris
CosmiQ Works Geospatial Machine Learning Analysis Toolkit
Stars: ✭ 290 (+291.89%)
Mutual labels:  geospatial, machinelearning
Gymfc
A universal flight control tuning framework
Stars: ✭ 210 (+183.78%)
Mutual labels:  uav, machinelearning
Geotiff.io
Static website for viewing and analyzing GeoTIFF's in the browser
Stars: ✭ 53 (-28.38%)
Mutual labels:  satellite, geospatial
GDAL.jl
Thin Julia wrapper for GDAL - Geospatial Data Abstraction Library
Stars: ✭ 78 (+5.41%)
Mutual labels:  satellite, geospatial
georaster-layer-for-leaflet
Display GeoTIFFs and soon other types of raster on your Leaflet Map
Stars: ✭ 168 (+127.03%)
Mutual labels:  satellite, geospatial
uav-lidar-analytics-course
NCSU GIS595/MEA792: UAV/lidar Data Analytics
Stars: ✭ 23 (-68.92%)
Mutual labels:  uav, geospatial
Gym Pybullet Drones
PyBullet Gym environments for single and multi-agent reinforcement learning of quadcopter control
Stars: ✭ 168 (+127.03%)
Mutual labels:  uav
Starrypilot
A lightweight autopilot software for Pixhawk
Stars: ✭ 243 (+228.38%)
Mutual labels:  uav
Mav control rw
Control strategies for rotary wing Micro Aerial Vehicles using ROS
Stars: ✭ 154 (+108.11%)
Mutual labels:  uav
Qgroundcontrol
Cross-platform ground control station for drones (Android, iOS, Mac OS, Linux, Windows)
Stars: ✭ 2,026 (+2637.84%)
Mutual labels:  uav
mindsdb native
Machine Learning in one line of code
Stars: ✭ 34 (-54.05%)
Mutual labels:  machinelearning
ml-book
Codice sorgente ed Errata Corrige del mio libro "A tu per tu col Machine Learning"
Stars: ✭ 16 (-78.38%)
Mutual labels:  machinelearning
Libuavcan
Portable reference implementation of the UAVCAN protocol stack in C++ for embedded systems and Linux.
Stars: ✭ 213 (+187.84%)
Mutual labels:  uav
Inav Configurator
Stars: ✭ 243 (+228.38%)
Mutual labels:  uav
Uwb Localization
Accurate 3D Localization for MAV Swarms by UWB and IMU Fusion.
Stars: ✭ 155 (+109.46%)
Mutual labels:  uav
hawking
A Natural Language Date Time Parser that Extract date and time from text with context and parse to the required format
Stars: ✭ 168 (+127.03%)
Mutual labels:  machinelearning
Libcanard
A compact implementation of the UAVCAN/CAN protocol in C for high-integrity real-time embedded systems
Stars: ✭ 151 (+104.05%)
Mutual labels:  uav
LiuAlgoTrader
Framework for algorithmic trading
Stars: ✭ 514 (+594.59%)
Mutual labels:  machinelearning
Luatelemetry
FrSky SmartPort(S.Port), D-series, F.Port and TBS Crossfire telemetry on all Taranis and Horus transmitters
Stars: ✭ 206 (+178.38%)
Mutual labels:  uav

Unet Implementation is Keras with GPU

International Publication

ISPRS (International Soceity of Photogrammetry and Remote Sensing) (https://www.isprs-ann-photogramm-remote-sens-spatial-inf-sci.net/IV-2-W5/157/2019/isprs-annals-IV-2-W5-157-2019.pdf) is here.

How to cite: Sahu, M. and Ohri, A.: VECTOR MAP GENERATION FROM AERIAL IMAGERY USING DEEP LEARNING, ISPRS Ann. Photogramm. Remote Sens. Spatial Inf. Sci., IV-2/W5, 157-162, https://doi.org/10.5194/isprs-annals-IV-2-W5-157-2019, 2019.

Background

I have created this repo to do instance segmentation uisng U-NET and simple post processing techniques for large geospatial dtaset. Satellite or UAV generated dataset have special charecteristics:

  1. They are geo-referenced. That means easch pixel have a geo-coordinate (latitude and longitude)
  2. They are generally of very large size > 10,000 x 10,000 pixels

Thus some preprocessing and post processing is needed in order to train the Deep network with such large dataset.

Abstract

We propose a simple yet efficient technique to leverage semantic segmentation model to extract and separate individual buildings in densely compacted areas using medium resolution satellite/UAV orthoimages. We adopted standard UNET architecture, additionally added batch normalization layer after every convolution, to label every pixel in the image. The result obtained is fed into proposed post-processing pipeline for separating connected binary blobs of buildings and converting it into GIS layer for further analysis as well as for generating 3D buildings. The proposed algorithm extracts building footlogging.infos from aerial images, transform semantic to instance map and convert it into GIS layers to generate 3D buildings. We integrated this method in Indshine’s cloud platform to speed up the process of digitization, generate automatic 3D models, and perform the geospatial analysis. Our network achieved ~70% Dice coefficient for the segmentation process.

Introduction

One of the major challenges in the GIS industry is the extraction of urban feature objects like buildings, roads, trees, etc. from Satellite and UAV images. Moreover, feature extraction is never an end product of any study rather it acts as an intermediate data from which analyses are done, so there is a need for a mechanism or a platform which can provide/generate data on the fly at industrial standard formats.

Methodology

Semantic segmentation

For semantic segmentation of building footlogging.info from RGB images, we used U-Net architecture. We added an extra batch normalization layer after every convolution layer to avoid any activations to take extreme values, to reduce sensitivity towards initial weights initialization and reduce overfitting of the model. (Olaf Ronneberger, 2015) describes all the details of architecture and used it for medical image segmentation. In the original U- Net, Olaf used 512x512 image size in the network but here we have used 200x200 image size.

Semantic Segmentation issue

Noise Removal

For noise removal, we used basic morphological operation on binary data. We first applied erosion followed by dilation followed by thresholding with respect to area.

Distance Transform

To separate connected buildings, we assumed that connections/binary bridge in the joined binary blobs is less than the area of buildings itself. We used this fact and applied distance transformation (Jain, 1989) to binary image. Thus connection/binary bridge were assigned less weight as compared to buildings itself. See Figure below for illustration.

Distance Transformation

Local Maxima

To overcome the problem described above, we used Local Maxima approach. Since connections are smaller than the buildings itself, finding local maxima ensured that it lies inside building area and not in the connection. This local maximum point acted as input source/sink to the watershed algorithm.

Watershed Segmentation

Watershed segmentation is quite popular for image segmentation. Local Maxima obtained acted here as sink point and negative of distance transform as cost map. This helped to separate connected binary blobs effectively. Each blob is given a unique index for further processing

Watershed Segmentation

Vectorization

Raster obtained from the watershed segmentation is vectorized using gdal/ogr library (Contributors of GDAL/OGR, 2018). Spatial references and coordinate systems are preserved at every step and are transferred to vector file for correct overlaying. While converting from raster to vector, the output has a lot of vertices and noises. Vector is then simplified using Douglas- Peucker algorithm (David Douglas, 1973). This helps to preserve the overall geometry of the shape while simplifying number of vertices. Basic attributes like area, perimeter and elevation of the buildings were automatically added. Finally, minimum bounding box was used and saved

Vectorization

RESULTS

  1. Small_village_in_Maharashtra_India)
  2. Dense_populated_area_in_Africa)
  3. Planned_colony)
  4. Slums)

Pretrained Weights

Here is pretrained weight for buildings (https://drive.google.com/file/d/1lHf098rEvlvFwkDiGI3KO6fsf0cvJlKT/view?usp=sharing)

Tutorial

How to train on custom dataset

There are few steps that need to be followed to train on custom dataset. All the files names and datasets are to be entered in configuration file: config.py. All the functions take config as input and take the dataset/parameters from it.

  1. Prepare Training Dataset - All the training dataset should be geo referenced. Folder should contain image and label. All the TIFs should be kept inside of these 2 folders. RGB and Label image should be of SAME NAME. Example - train/image/1.tif -- train/label/1.tif

  2. Edit config.py - Change the path_input, path_output, path_validation etc. All the TIF files are to be kept in these path_input, path_validation folders.

  3. Run generateMultiRes.py - This is used to generate multiple resolutions of TIFs in VRT formats. This converts TIFs upto 1 meter resolution. Example - If the TIF are of 0.1m resoultion then this will make vrts of 0.1, 0.2, 0.3, ... 1m resolutions. This useful to make u-net robust to multiple resolution dataset.

  4. Run generateDataset.py - This takes the VRTs generated above and do tiling of the images since TIFs are generally of very high resolutions and cannot be fit into memory. This will large disk space and all the data will be written into path_output given in the config.py file.

  5. Run train.py - Now training can start. If there is any pretrained weight or model then train.py can take it. Just pass the flag --weight False, if the pretrained is complete model file.

Commands :

1. python generateMultiRes.py

If tiling is already done, then skip this step.
2. python generateDataset.py

3.1 python train.py --pretrained weight.h5 --weight True
                        or 
3.2 python train.py --pretrained model.h5 --weight False

How to do generate results

python test.py [-h] [--data] [--skipGridding] [--pretrained] [--weight] [--output]

--skipGridding If grididing/tiling is already done then use it to skip the step. [Default] False

--data Input Data folder where TIF files are stored
--pretrained Path of pretrained complete model or weight file. Use -w flag to mark it as weight or complete model

--weight If model provided is Model Weight or not. 
True - It is Weight, False- Complete Model
--output Output Data folder where TIF 
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].