All Projects → Bobholamovic → CDLab

Bobholamovic / CDLab

Licence: Unlicense license
Yet another repository for developing and benchmarking deep learning-based change detection methods.

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to CDLab

DSMSCN
[MultiTemp 2019] Official Tensorflow implementation for Change Detection in Multi-temporal VHR Images Based on Deep Siamese Multi-scale Convolutional Neural Networks.
Stars: ✭ 63 (+6.78%)
Mutual labels:  remote-sensing, change-detection
ChangeFormer
Official PyTorch implementation of our IGARSS'22 paper: A Transformer-Based Siamese Network for Change Detection
Stars: ✭ 220 (+272.88%)
Mutual labels:  remote-sensing, change-detection
massive-change-detection
QGIS 2 plugin for applying change detection algorithms on high resolution satellite imagery
Stars: ✭ 18 (-69.49%)
Mutual labels:  remote-sensing, change-detection
ChangeOS
ChangeOS: Building damage assessment via Deep Object-based Semantic Change Detection - (RSE 2021)
Stars: ✭ 33 (-44.07%)
Mutual labels:  remote-sensing, change-detection
CRC4Docker
Python scripts for the textbook "Image Analysis, Classification and Change Detection in Remote Sensing, Fourth Revised Edition"
Stars: ✭ 84 (+42.37%)
Mutual labels:  remote-sensing, change-detection
ChangeDetectionRepository
This repository contains some python code of some traditional change detection methods or provides their original websites, such as SFA, MAD, and some deep learning-based change detection methods, such as SiamCRNN, DSFA, and some FCN-based methods.
Stars: ✭ 311 (+427.12%)
Mutual labels:  remote-sensing, change-detection
FDCNN
The implementation of FDCNN in paper - A Feature Difference Convolutional Neural Network-Based Change Detection Method
Stars: ✭ 54 (-8.47%)
Mutual labels:  remote-sensing, change-detection
WhiteboxTools-ArcGIS
ArcGIS Python Toolbox for WhiteboxTools
Stars: ✭ 190 (+222.03%)
Mutual labels:  remote-sensing
retrievalSystem
The back-end of cross-modal retrieval system,wihch will contain services such as semantic location .etc
Stars: ✭ 64 (+8.47%)
Mutual labels:  remote-sensing
starfm4py
The STARFM fusion model for Python
Stars: ✭ 86 (+45.76%)
Mutual labels:  remote-sensing
opticks
Open source remote sensing analysis tool
Stars: ✭ 37 (-37.29%)
Mutual labels:  remote-sensing
lt-mapper
A Modular Framework for LiDAR-based Lifelong Mapping
Stars: ✭ 301 (+410.17%)
Mutual labels:  change-detection
deck.gl-raster
deck.gl layers and WebGL modules for client-side satellite imagery analysis
Stars: ✭ 60 (+1.69%)
Mutual labels:  remote-sensing
torchgeo
TorchGeo: datasets, samplers, transforms, and pre-trained models for geospatial data
Stars: ✭ 1,125 (+1806.78%)
Mutual labels:  remote-sensing
xarray-sentinel
Xarray backend to Copernicus Sentinel-1 satellite data products
Stars: ✭ 189 (+220.34%)
Mutual labels:  remote-sensing
waterquality
Package designed to detect and quantify water quality and cyanobacterial harmful algal bloom (CHABs) from remotely sensed imagery
Stars: ✭ 31 (-47.46%)
Mutual labels:  remote-sensing
vue-observable
IntersectionObserver, MutationObserver and PerformanceObserver in Vue.js
Stars: ✭ 24 (-59.32%)
Mutual labels:  change-detection
satellite-crosswalk-classification
Deep Learning Based Large-Scale Automatic Satellite Crosswalk Classification (GRSL, 2017)
Stars: ✭ 18 (-69.49%)
Mutual labels:  remote-sensing
deep learning ecology
Educational Resources on Neural Networks for Ecology and Remote Sensing
Stars: ✭ 45 (-23.73%)
Mutual labels:  remote-sensing
changed-files
Github action to retrieve all (added, copied, modified, deleted, renamed, type changed, unmerged, unknown) files and directories.
Stars: ✭ 733 (+1142.37%)
Mutual labels:  change-detection

Change Detection Laboratory

Note: This project is currently under development, and no stable version has yet been released.

Yet another project for developing and benchmarking deep learning-based remote sensing change detection methods.

CDLab also has a PaddlePaddle version.

English | 简体中文

Prerequisites

opencv-python==4.1.1
pytorch==1.6.0
torchvision==0.7.0
pyyaml==5.1.2
scikit-image==0.15.0
scikit-learn==0.21.3
scipy==1.3.1
tqdm==4.35.0

Tested using Python 3.7.4 on Ubuntu 16.04.

Get Started

In src/constants.py, change the dataset locations to your own.

Data Preprocessing

In scripts/ there are preprocessing scripts for several datasets。

Model Training

To train a model from scratch, use

python train.py train --exp_config PATH_TO_CONFIG_FILE

A few configuration files regarding different datasets and models are provided in the configs/ folder for ease of use. Note that the hyperparameters are not elaborately investigated to obtain a fully optimized performance.

As soon as the program starts and prints out the configurations, there will be a prompt asking you to write some notes. What you write will be recorded into the log file to help you remember what you did, or you can simply skip this step by pressing [Enter].

To resume training from some checkpoint, run the code with the --resume option.

python train.py train --exp_config PATH_TO_CONFIG_FILE --resume PATH_TO_CHECKPOINT

Other frequently used commandline options include:

  • --anew: Add it if the checkpoint is just used to initialize model weights. Note that loading an incompatible checkpoint is supported as a feature, which is useful when you are trying to utilize a well pretrained model for finetuning.
  • --save_on: By default, an epoch-based trainer is used for training. At the end of each training epoch, the trainer evaluates the model on the validation dataset. If you want to save the model output during the evaluation process, enable this option.
  • --log_off: Disable logging.
  • --tb_on: Enable TensorBoard summaries.
  • --debug_on: Useful when you are debugging your own code. In debugging mode, no checkpoint or model output will be written to disk. In addition, a breakpoint will be set where an unhandled exception occurs, which allows you to locate the causes of the crash or do some cleanup jobs.

During or after the training process, you can check the model weight files in exp/DATASET_NAME/weights/, the log files in exp/DATASET_NAME/logs/, and the output change maps in exp/DATASET_NAME/out/.

Model Evaluation

To evaluate a model on the test subset, use

python train.py eval --exp_config PATH_TO_CONFIG_FILE --resume PATH_TO_CHECKPOINT --save_on --subset test

This project also provides the funtionality of sliding-window test on large raster images. Use the following command:

python sw_test.py --exp_config PATH_TO_CONFIG_FILE \
  --resume PATH_TO_CHECKPOINT --ckp_path PATH_TO_CHECKPOINT \
  --t1_dir PATH_TO_T1_DIR --t2_dir PATH_TO_T2_DIR --gt_dir PATH_TO_GT_DIR

Other frequently used commandline options of src/sw_test.py include:

  • --window_size: Set the size of the sliding window.
  • --stride: Set the stride of the sliding window.
  • --glob: Specify a wildcard pattern to match files in t1_dir, t2_dir, and gt_dir.
  • --threshold: Set the threshold used to convert the probability map to the change map.

Note however that currently src/sw_test.py does not support custom pre-processing or post-processing modules.

Use Models from Third-Party Libraries

Currently this projects supports the training and evaluation of models from the change_detection.pytorch library, which can be achieved by simply modifying the configuration files. Please refer to the example in configs/svcd/config_svcd_cdp_unet.yaml

The version number of the supported change_detection.pytorch library is 0.1.0.

Supported Models

Model Name Link
CDNet CDNet paper
FC-EF UNet paper
FC-Siam-conc SiamUNet-conc paper
FC-Siam-diff SiamUNet-diff paper
STANet STANet paper
DSIFN IFN paper
SNUNet SNUNet paper
BIT BIT paper
L-UNet LUNet paper
DSAMNet DSAMNet paper

Supported Datasets

Dataset Name Link
Synthetic images and real season-varying remote sensing images SVCD google drive
WHU building change detection dataset WHU website
LEVIR building change detection dataset LEVIRCD website

Performance on SVCD Dataset

Model Precision Recall F1 OA
CDNet 92.99 87.08 89.94 97.59
FC-EF 94.28 83.80 88.73 97.37
FC-Siam-conc 94.57 91.34 92.93 98.28
FC-Siam-diff 95.87 90.60 93.16 98.36
STANet 89.22 98.25 93.52 98.32
DSIFN 97.64 96.35 96.99 99.26
SNUNet 97.89 97.25 97.57 99.40
BIT 97.20 96.38 96.79 99.21
L-UNet 96.48 94.79 95.63 98.93
DSAMNet 92.78 98.06 95.35 98.82

License

This project is released under the Unlicense.

Contributing

Any kind of contributions to improve this repository is welcome.

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