Code Monkey home page Code Monkey logo

forestcoverchange's Introduction

<<<<<<< HEAD

VanillaGan

This is a simple and easy to understand implementation of a vanilla generative adversarial neural network in pytorch

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

1956f1cb9747448a5e4343868a75f4e9002e0dc9

forestcoverchange's People

Contributors

annusgit avatar agillani avatar

Watchers

James Cloos avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.