Skip to content

annusgit/BTT-ForestCoverChange

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Forest Cover Change Detection and Prediction over Pakistani Areas

The aim of this project is to use Sentinel and Landsat imagery in order to perform forest cover change detection in Pakistan. The first step is to segment an image from our AOI and then do the same for a whole temporal series of images and finally compare them to see what changes occured in forest areas. We also intend to predict forestation change trend in Pakistan.

Getting Started

All of the models in this repo are written with pytorch.

Dependencies

You will need the following modules to get the code running

Results

Image Segmentation on ISPRS data set using UNet architecture.

Unet Architecture

Vaihingen Dataset Segmentation after downsampling

Patch-wise classification of Sentinel-2 Satellite Images.

We used the Eurosat data set and a two variants of VGG architecture for classifying 64*64 patches of image. Here are the two confusion matrices, the left one is with 3 channels (96.38% acc. on the test set) and the right one is for 5 channels (98.05% acc. on the test set) at the input of the VGG.

  • The following images show our results one different landscapes. It should be noted that these images were not a part of the training or test set. They were downloaded separately from scihub and earthexplorer for inference.

Change Detection on a series of Sentinel Images from German Landscapes (2016-2018)

Same result but color coded in full resolution

  • Germany

  • Pakistan (Peshawar Region)

  • Pakistan (Muzaffarabad Region)

Usage

Inference on custom sentinel images downloaded from Sentinel or EarthExplorer.

cd location/of/ForestCoverChange/
python -m pipeline.detect --images path/to/folder/containing/images/ --model_type model_name --channels number_of_channels_depending_on_the_model --trained_model path/to/pretrained/model --bands list_of_bands_to_use --save_dir path/to/save/results/ --device cpu_or_gpu

For example,

cd /home/annus/PycharmProjects/ForestCoverChange/
python -m pipeline.detect --images /home/annus/Desktop/13bands_european_image_time_series/ --model_type VGG_N --channels 3 --trained_model patch_classification/trained_models/vgg3.pt --bands 4 3 2 --save_dir temp-3 --device cpu

Both pretrained models VGG_3 and VGG_5 are available in patch_classification/trained_models/

Authors

  • Annus Zulfiqar

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

  • Sentinel program for providing complete coverage of Earth for free
  • Eurosat for providing a labeled dataset
  • Pytorch Forum for providing valuable help when needed

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published