All Projects → motokimura → Spacenet_building_detection

motokimura / Spacenet_building_detection

Licence: mit
Project to train/test convolutional neural networks to extract buildings from SpaceNet satellite imageries.

Projects that are alternatives of or similar to Spacenet building detection

Geospatial Machine Learning
A curated list of resources focused on Machine Learning in Geospatial Data Science.
Stars: ✭ 289 (+248.19%)
Mutual labels:  semantic-segmentation, gis, satellite-imagery
building-footprint-segmentation
Building footprint segmentation from satellite and aerial imagery
Stars: ✭ 26 (-68.67%)
Mutual labels:  gis, satellite-imagery, semantic-segmentation
Deeplab v3
Tensorflow Implementation of the Semantic Segmentation DeepLab_V3 CNN
Stars: ✭ 768 (+825.3%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Earthengine Py Notebooks
A collection of 360+ Jupyter Python notebook examples for using Google Earth Engine with interactive mapping
Stars: ✭ 807 (+872.29%)
Mutual labels:  jupyter-notebook, gis
Geemap
A Python package for interactive mapping with Google Earth Engine, ipyleaflet, and folium
Stars: ✭ 959 (+1055.42%)
Mutual labels:  jupyter-notebook, gis
Ternausnetv2
TernausNetV2: Fully Convolutional Network for Instance Segmentation
Stars: ✭ 521 (+527.71%)
Mutual labels:  jupyter-notebook, satellite-imagery
Deeplearningmugenknock
でぃーぷらーにんぐを無限にやってディープラーニングでDeepLearningするための実装CheatSheet
Stars: ✭ 684 (+724.1%)
Mutual labels:  jupyter-notebook, chainer
Deeplabv3 Plus
Tensorflow 2.3.0 implementation of DeepLabV3-Plus
Stars: ✭ 32 (-61.45%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Icnet Tensorflow
TensorFlow-based implementation of "ICNet for Real-Time Semantic Segmentation on High-Resolution Images".
Stars: ✭ 396 (+377.11%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Geotiff.io
Static website for viewing and analyzing GeoTIFF's in the browser
Stars: ✭ 53 (-36.14%)
Mutual labels:  gis, satellite-imagery
Chainer Segnet
SegNet implementation & experiments in Chainer
Stars: ✭ 42 (-49.4%)
Mutual labels:  semantic-segmentation, chainer
Multiclass Semantic Segmentation Camvid
Tensorflow 2 implementation of complete pipeline for multiclass image semantic segmentation using UNet, SegNet and FCN32 architectures on Cambridge-driving Labeled Video Database (CamVid) dataset.
Stars: ✭ 67 (-19.28%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Pytorch Unet
Simple PyTorch implementations of U-Net/FullyConvNet (FCN) for image segmentation
Stars: ✭ 470 (+466.27%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Probabilistic unet
A U-Net combined with a variational auto-encoder that is able to learn conditional distributions over semantic segmentations.
Stars: ✭ 427 (+414.46%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Pytorch 3dunet
3D U-Net model for volumetric semantic segmentation written in pytorch
Stars: ✭ 765 (+821.69%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Steal
STEAL - Learning Semantic Boundaries from Noisy Annotations (CVPR 2019)
Stars: ✭ 424 (+410.84%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Kaggle Carvana Image Masking Challenge
Top 15% ranked solution to the Carvana Image Masking Challenge on Kaggle
Stars: ✭ 13 (-84.34%)
Mutual labels:  jupyter-notebook, semantic-segmentation
Chainer Pspnet
PSPNet in Chainer
Stars: ✭ 76 (-8.43%)
Mutual labels:  semantic-segmentation, chainer
Pythonfromspace
Python Examples for Remote Sensing
Stars: ✭ 344 (+314.46%)
Mutual labels:  jupyter-notebook, gis
Vpgnet
VPGNet: Vanishing Point Guided Network for Lane and Road Marking Detection and Recognition (ICCV 2017)
Stars: ✭ 382 (+360.24%)
Mutual labels:  jupyter-notebook, semantic-segmentation

SpaceNet Building Detection

This repository privides some python scripts and jupyter notebooks to train and evaluate convolutional neural networks which extract buildings from SpaceNet satellite images.

Dependency

Usage

0. Clone this repo

$ PROJ_DIR=~/spacenet_building_detection  # assuming you clone this repo to your home directory

$ git clone --recursive https://github.com/motokimura/spacenet_building_detection.git $PROJ_DIR

1. Download SpaceNet dataset

Download satellite images and ground-truth building footprints (of SpaceNet AOI-1 Rio). Assuming you already configured AWS CLI to download the data from AWS S3.

$ cd $PROJ_DIR/data

# Download processed 200mx200m tiles of AOI 1 (3.4 GB) with associated building footprints
$ aws s3api get-object --bucket spacenet-dataset --key AOI_1_Rio/processedData/processedBuildingLabels.tar.gz --request-payer requester processedBuildingLabels.tar.gz

$ tar -xvf processedBuildingLabels.tar.gz
$ cd processedBuildingLabels
$ tar -xvf 3band.tar.gz

$ cd vectordata 
$ tar -xvf geojson.tar.gz

# Download the Source Imagery Mosaic (3-band = 2.3 GB and 8-band = 6.5 GB)
$ cd $PROJ_DIR/data
$ aws s3api get-object --bucket spacenet-dataset --key AOI_1_Rio/srcData/rasterData/3-Band.tar.gz --request-payer requester 3-Band.tar.gz
$ tar -xvf 3-Band.tar.gz

You can find more details here.

2. Build Docker image

Build docker image to setup the environment to preprocess SpaceNet dataset and train/evaluate convolutional neural networks.

$ cd $PROJ_DIR/docker
$ bash build.sh

I strongly reccomend you to use docker because you may have some troubles to install some geo-spatial data processing libraries. In case you don't want to use docker, you have to install additional dependencies described in Dockerfile.

3. Preprocess SpaceNet dataset

Convert SpaceNet ground-truth building footprints from GeoJSON into building mask images.

Run docker container by following:

$ cd $PROJ_DIR/docker
$ bash run.sh

Now you should be inside the docker container you ran. Convert SpaceNet dataset by following:

$(docker) cd /workspace/src/features
$(docker) python build_labels.py ../../data/processedBuildingLabels/3band ../../data/processedBuildingLabels/vectordata/geojson ../../data/buildingMaskImages

Now you will find many pairs of satellite images and building mask images in $PROJ_DIR/data/processedBuildingLabels/3band and $PROJ_DIR/data/buildingMaskImages respectively like below:

4. Train U-Net

Train U-Net, a convolutional neural network originaly developed for medical image segmentation.

Train U-Net with SpaceNet dataset by following:

$(docker) cd /workspace/src/models
$(docker) python train_model.py ../../data/dataSplit ../../data/processedBuildingLabels/3band ../../data/buildingMaskImages

You can check training status and validation accuracy from TensorBoard:

# Open another terminal window outside the container and type:
$ cd $PROJ_DIR/docker
$ bash exec.sh

# Now you should be inside the container already running. Start TensorBoard by following:
$(docker) tensorboard --logdir /workspace/models

Then, open http://localhost:6006 from your browser.

5. Evaluate U-Net

Evaluate U-Net with jupyter notebook.

Launch jupyter notebook by flollowing:

$(docker) cd /workspace/notebooks
$(docker) jupyter notebook

Then, open http://localhost:8888 from your browser.

Default password is passw0rd as defined in Dockerfile.

Note that you may need to modify the path to pre-trained model defined in the notebooks below.

5.1 Quantitative evaluation

Open this notebook.

5.2 Qualitative evaluation on test tile-images

Open this notebook to see segmentation results on tile images in test-plit.

Output examples:

5.3 Qualitative evaluation on mosaic images

Open this notebook to see segmentation results on source mosaic images.

Output examples:

License

MIT License

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].