Giter Club home page Giter Club logo

changedetectionproject's Introduction

Deep Active Learning in Remote Sensing for data efficient Change Detection [arXiv:2008.11201]

Implementation of the Siamese U-Net model with the pre-trained ResNet34 architecture as an encoder for the Change Detection task on Remote Sensing dataset with support for Deep Active Learning.

Colab demo with a pre-trained model:

Check out the basic change detection demo at: ChangeDetection_prediction_example.ipynb

Note: This demo shows only the basic model inference and not the Active Learning approach (which requires more computational resources and a dataset at your disposal).

Setup:

Start with installing the prerequisite python libraries. We worked with the following versions:

tensorflow              1.12.0
Keras                   2.2.4
Keras-Applications      1.0.7
Keras-Preprocessing     1.0.5
numpy                   1.16.0
opencv-python-headless  4.0.0.21
scikit-image            0.14.2
scikit-learn            0.20.2
albumentations         0.2.0
image-classifiers      0.2.0
imageio                2.5.0
imageio-ffmpeg         0.2.0
seaborn                0.9.0
segmentation-models    0.2.0
tqdm                   4.29.1

Download the dataset and place it into a folder specified in Settings.py (note: the original used dataset is from the Swiss company Swisstopo and as such is not publicly available).

To train a model on the task of change detection see the "main.py" and run it with the required arguments (such as encoder type, number of epochs or the batch size).

Run this to see the help:

python3 main.py --help

To use the deep active learning algorithms see "ActiveLearningLoop.py".

Run this to see the help:

python3 ActiveLearningLoop.py --help

These are the example calls for the three tested methods:

python3 ActiveLearningLoop.py -name Run1_Ensemble_N5 -AL_method Ensemble -AL_Ensemble_numofmodels 5 -train_augmentation True
python3 ActiveLearningLoop.py -name Run2_MCBN_M5 -AL_method MonteCarloBatchNormalization -AL_MCBN_numofruns 5 -train_augmentation True
python3 ActiveLearningLoop.py -name Run0_Random -AL_method Random -train_augmentation True

# Note we can also use:
# -AL_AcquisitionFunction (choose from "Variance", "Entropy")

# Further experimentation:
# Adding N - this one would add 32 samples for 40 iterations => 1280 samples in the final iteration
python3 ActiveLearningLoop.py -name Run3_Ensemble_N5_Add32 -AL_method Ensemble -AL_Ensemble_numofmodels 5 -AL_iterations 40 -AL_iterationsample_size 32 -train_augmentation True

Siamese U-Net model

Code for the model directly at: https://github.com/previtus/ChangeDetectionProject/blob/master/Model2_builder.py

changedetectionproject's People

Contributors

previtus avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

changedetectionproject's Issues

Dataset demo

Hi,
I tried to run your code, in particular the activelearningloop.py file. Where I can find the datasets used for experiments.
For example I have this error /scratch/ruzicka/python_projects_large/ChangeDetectionProject_files/saved_paths_2012_256x256_cleanManualALL.pickle
but I don't found the pickle file in the repository

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.