Views
No views yet
Dense Predictive Coding (DPC) paired with U-Net for spatiotemporal segmentation on satellite image time series, plus baseline 3D-UNet, ConvLSTM, and ConvGRU checkpoints.
| File | Model | Bands | Loss / Seg. Head (from filename) | Epoch |
|---|---|---|---|---|
dpc-unet-2024-12-05-crossentropy_conv3d_std_None_200_0.038_0.0binary_10band_epoch108.pth | DPC-UNet | 10 | CrossEntropy, Conv3D head, std=None | 108 (Hugging Face) |
dpc-unet-2025-04-15-crossentropy_conv3d_std_None_200_0.174_0.4binary_4band_epoch30.pth | DPC-UNet | 4 | CrossEntropy, Conv3D head, std=None | 30 (Hugging Face) |
3d-unet_2024-11-25_10band_0.109_epoch_13.pth | 3D-UNet | 10 | (3D-UNet baseline) | 13 (Hugging Face) |
convlstm_2024-12-02_10band_0.036_epoch_119.pth | ConvLSTM | 10 | (ConvLSTM baseline) | 119 (Hugging Face) |
convlstm_2025-05-06_4band_0.081_epoch_32.pth | ConvLSTM | 4 | (ConvLSTM baseline) | 32 (Hugging Face) |
convgru_2024-12-02_10band_0.02_epoch_72.pth | ConvGRU | 10 | (ConvGRU baseline) | 72 (Hugging Face) |
Note on filenames: Many training hyperparameters are encoded in each filename (e.g.,crossentropy,conv3d,std_None,10band/4band, andepochN). See training commands below for the canonical setup. (GitHub)
1# Create environment (from repo)
2conda env create -f environment.yml
3conda activate env
4
5# Convert images to time-series datacubes (HDF5 / PT format)
6python RQUNet-DPC/models/create_timeseries.py1# Non-overlap small-tile prediction (example)
2python RQUNet-DPC/models/predict_nonoverlap.py \
3 --img_dim 64 \
4 --model dpc-unet \
5 --segment_model conv3d \
6 --ts_length 16 \
7 --dataset PEV \
8 --net unet \
9 --channels 10 \
10 --standardization None \
11 --rescale None \
12 --saveproba False \
13 --addindices False
14
15# Sliding-window prediction on large rasters (example)
16python RQUNet-DPC/models/predict_nonoverlap.py \
17 --img_dim 64 \
18 --model 3d-unet \
19 --ts_length 16 \
20 --dataset PEV_large_2019 \
21 --channels 10 \
22 --standardization None \
23 --rescale None--model, --channels, and --ts_length to match the checkpoint you download here. (GitHub)The state dicts correspond to architectures defined in the GitHub repo; import the matching model class before loading.
1import torch
2
3# Example: build your model to match the checkpoint architecture/hparams
4# (Replace with actual constructors from the repo modules.)
5from RQUNet_DPC_like import build_dpc_unet # placeholder import; see repo
6
7ckpt_path = "dpc-unet-2024-12-05-crossentropy_conv3d_std_None_200_0.038_0.0binary_10band_epoch108.pth"
8model = build_dpc_unet(in_channels=10, ts_length=16, segment_model="conv3d") # match bands & T
9state = torch.load(ckpt_path, map_location="cpu")
10model.load_state_dict(state)
11model.eval()
12
13# Input should align with training: e.g., (B, C, T, H, W) for 3D backbones or
14# repo’s internal reshaping of (T, C, H, W). See training/prediction scripts.
15x = torch.randn(1, 10, 16, 64, 64)
16with torch.no_grad():
17 logits = model(x) # segmentation logitspredict_nonoverlap.py CLI to ensure pre/post-processing matches the training setup. (GitHub)1# Train DPC + U-Net (Conv3D segment head)
2python RQUNet-DPC/models/train_dpc_seg_nonoverlap.py \
3 --img_dim 64 --epochs 150 --standardization None \
4 --segment_model conv3d --ts_length 16 --net unet --channels 10 \
5 --loss dice \
6 --noncrop_pct 0.7 --noncrop_thresh 0.7 --crop_thresh 0.2 \
7 --num_chips 50 --rescale None --num_val 10 --addindices False
8
9# Baselines: 3D-UNet, ConvLSTM, ConvGRU
10python RQUNet-DPC/models/train_benchmodel.py --model 3d-unet --img_dim 64 --epochs 120 \
11 --standardization None --noncrop_pct 0.1 --noncrop_thresh 0.3 --crop_thresh 0.5 --num_chips 50
12
13python RQUNet-DPC/models/train_benchmodel.py --model convlstm --img_dim 64 --epochs 120 \
14 --standardization None --noncrop_pct 0.1 --noncrop_thresh 0.3 --crop_thresh 0.5 --num_chips 50
15
16python RQUNet-DPC/models/train_benchmodel.py --model convgru --img_dim 64 --epochs 120 \
17 --standardization None --noncrop_pct 0.1 --noncrop_thresh 0.3 --crop_thresh 0.5 --num_chips 50