Skip to content

trile83/RQUNet-DPC

Repository files navigation

RQUNet-DPC

Dense Predictive Coding model and UNet model architecture framework for segmenting satellite images time series.

Proposed Architecture and Workflow

Model Architecture

Dense Predictive Coding Architecture

Dense Predictive Coding

HLS time series data

HLS data

How to run the code

Create the Python environment 3.8.12 in terminal/command line for Linux OS
conda env create -f environment.yml
conda activate env

Sample images into timeseries dataset

To preprocess images to hdf5 datacube
python models/create_timeseries.py

Training DPC and other DL models

To train DPC+UNet model for image segmentation, prepare the Dataset in time series format for Pytorch: T x C x H x W
python RQUNet-DPC/models/train_dpc_seg_nonoverlap.py --img_dim 64 --epochs 150 --standardization None --segment_model conv3d --ts_length 16 --net unet --channels 10 --loss dice --noncrop_pct 0.7 --noncrop_thresh 0.7 --crop_thresh 0.2 --num_chips 50 --rescale None --num_val 10 --addindices False

To train benchmark models, ConvLSTM or ConvGRU or 3D UNet
python RQUNet-DPC/models/train_benchmodel.py --model 3d-unet --img_dim 64 --epochs 120 --standardization None --noncrop_pct 0.1 --noncrop_thresh 0.3 --crop_thresh 0.5 --num_chips 50
python RQUNet-DPC/models/train_benchmodel.py --model convlstm --img_dim 64 --epochs 120 --standardization None --noncrop_pct 0.1 --noncrop_thresh 0.3 --crop_thresh 0.5 --num_chips 50
python RQUNet-DPC/models/train_benchmodel.py --model convgru --img_dim 64 --epochs 120 --standardization None --noncrop_pct 0.1 --noncrop_thresh 0.3 --crop_thresh 0.5 --num_chips 50

To train UNet mean-frame segmentation model
python models/train_unet_meanframe.py

Prediction

To perform prediction for small tiles of large raster, same dataset format
python RQUNet-DPC/models/predict_nonoverlap.py --img_dim 64 --model dpc-unet --segment_model conv3d --ts_length 16 --dataset PEV --net unet --channels 10 --standardization None --rescale None --saveproba False --addindices False

To perform window sliding prediction, run the file
python RQUNet-DPC/models/predict_nonoverlap.py --img_dim 64 --model dpc-unet --segment_model conv3d --ts_length 16 --dataset PEV_large_2019 --net unet --channels 10 --standardization None --rescale None --addindices False
python RQUNet-DPC/models/predict_nonoverlap.py --img_dim 64 --model 3d-unet --ts_length 16 --dataset PEV_large_2019 --channels 10 --standardization None --rescale None --saveproba False --addindices False

To run experiment DPC+Poisson segmentation
python dpc_poisson.py

Results

HLS data

About

Dense Predictive Coding and UNet framework for satellite images time series segmentation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors