Skip to content

Change Detection project - the more experimental build version. Trying out Active Learning in with deep CNNs for Change detection on remote sensing data.

Notifications You must be signed in to change notification settings

previtus/ChangeDetectionProject

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Change Detection project - the more experimental build version. Trying out Active Learning in with deep CNNs for Change detection on remote sensing data.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published