Refresh card: model-release framing
Browse files
README.md
CHANGED
|
@@ -18,57 +18,42 @@ inference: false
|
|
| 18 |
|
| 19 |
# rsdiff-sr-cascade-ep650
|
| 20 |
|
| 21 |
-
|
| 22 |
-
|
| 23 |
-
the full RSICD test split (N=1093), slightly better than the published 66.49.
|
| 24 |
|
| 25 |
-
-
|
| 26 |
-
|
| 27 |
-
-
|
|
|
|
| 28 |
|
| 29 |
-
|
| 30 |
-
|
| 31 |
-
| Metric | Value | Reference |
|
| 32 |
-
| --- | --- | --- |
|
| 33 |
-
| **FID** (cascade-256, N=1093, feature=2048) | **65.70** | thesis 66.49 |
|
| 34 |
-
| FID (feature=768) | 0.275 | β |
|
| 35 |
-
| CLIP-score (OpenAI ViT-B/32) | 0.278 | shuffled baseline 0.232 |
|
| 36 |
-
| CLIP delta | **+0.046** | textβimage alignment vs null |
|
| 37 |
-
|
| 38 |
-
`cond_scale=5.0` (winner of a CFG sweep on the best SR milestone, ep650).
|
| 39 |
|
| 40 |
## Architecture
|
| 41 |
|
|
|
|
|
|
|
|
|
|
| 42 |
| Stage | Params | Resolution | Conditioning |
|
| 43 |
| --- | --- | --- | --- |
|
| 44 |
| LR base UNet | 27.18 M | 128Γ128 | T5-base, `p_uncond=0.1` |
|
| 45 |
-
| SR UNet | 92.66 M | 128β256 | T5-base + LR image, `p_uncond=0.1` |
|
| 46 |
|
| 47 |
-
|
| 48 |
-
Training: Adam, T=1000 DDPM steps. Path B β LR base trained 1000 epochs
|
| 49 |
-
first, then frozen at `ep700` (LR FID winner), then SR unet trained 1000
|
| 50 |
-
epochs on top using GT-lowres targets. Best SR milestone: ep650.
|
| 51 |
|
| 52 |
## Files
|
| 53 |
|
| 54 |
-
| File | Size | What |
|
| 55 |
| --- | --- | --- |
|
| 56 |
-
| `ckpt_sr_ep650_step89050.pt` | ~1.9 GB |
|
| 57 |
-
| `
|
| 58 |
-
| `
|
| 59 |
-
| `
|
| 60 |
-
| `
|
| 61 |
-
| `
|
| 62 |
-
|
| 63 |
-
The two slimmer companion checkpoints (`ckpt_step95900.pt` LR base ep700,
|
| 64 |
-
slim SR-only milestones) are not uploaded here; build them from the
|
| 65 |
-
training command in the [reproducibility doc](https://github.com/asebaq/rsdiff/blob/main/docs/reproducibility.md).
|
| 66 |
|
| 67 |
## Usage
|
| 68 |
|
| 69 |
-
> The clean `diffusers`-native trainer is still on the roadmap. For now use
|
| 70 |
-
> the bundled legacy engine.
|
| 71 |
-
|
| 72 |
```bash
|
| 73 |
git clone https://github.com/asebaq/rsdiff
|
| 74 |
cd rsdiff
|
|
@@ -78,7 +63,7 @@ uv pip install -e ".[dev,eval]"
|
|
| 78 |
# pull the checkpoint
|
| 79 |
hf download asebaq/rsdiff-sr-cascade-ep650 ckpt_sr_ep650_step89050.pt -o legacy/DDPM/ckpts/
|
| 80 |
|
| 81 |
-
# sample
|
| 82 |
python legacy/DDPM/sample_grid.py \
|
| 83 |
--log_dir legacy/DDPM/logs/full_sr_gdm \
|
| 84 |
--data_root data/RSICD_optimal \
|
|
@@ -88,37 +73,41 @@ python legacy/DDPM/sample_grid.py \
|
|
| 88 |
--sr --split test --seed 17
|
| 89 |
```
|
| 90 |
|
|
|
|
|
|
|
|
|
|
| 91 |
## Training data
|
| 92 |
|
| 93 |
[RSICD](https://huggingface.co/datasets/arampacha/rsicd) β 10 921 paired
|
| 94 |
-
satellite images and natural-language captions,
|
| 95 |
-
/ test).
|
| 96 |
-
|
| 97 |
|
| 98 |
## Intended use & limitations
|
| 99 |
|
| 100 |
**Intended use.** Research artefact for studying small-scale text-to-RS
|
| 101 |
-
generation
|
| 102 |
-
|
|
|
|
| 103 |
|
| 104 |
**Out of scope.**
|
| 105 |
|
| 106 |
-
- Operational
|
| 107 |
-
|
| 108 |
-
|
| 109 |
-
|
| 110 |
-
- Anything safety-critical (disaster response, surveillance, etc.).
|
| 111 |
|
| 112 |
**Known limitations.**
|
| 113 |
|
| 114 |
-
- **Overfit drift past SR ep650.** FID climbs
|
| 115 |
-
|
| 116 |
-
|
| 117 |
-
-
|
| 118 |
-
|
| 119 |
-
-
|
| 120 |
-
|
| 121 |
-
|
|
|
|
| 122 |
|
| 123 |
## License
|
| 124 |
|
|
@@ -137,17 +126,4 @@ Apache 2.0 β see [`LICENSE`](https://github.com/asebaq/rsdiff/blob/main/LICENS
|
|
| 137 |
year = {2024},
|
| 138 |
doi = {10.1007/s00521-024-10363-3}
|
| 139 |
}
|
| 140 |
-
|
| 141 |
-
@software{rsdiff2026,
|
| 142 |
-
title = {rsdiff: open-source diffusion models for remote sensing},
|
| 143 |
-
author = {Sebaq, Ahmad},
|
| 144 |
-
url = {https://github.com/asebaq/rsdiff},
|
| 145 |
-
year = {2026},
|
| 146 |
-
}
|
| 147 |
```
|
| 148 |
-
|
| 149 |
-
## Acknowledgements
|
| 150 |
-
|
| 151 |
-
- `lucidrains/imagen-pytorch` for the cascade scaffolding.
|
| 152 |
-
- Nile University AI program for hosting the thesis work.
|
| 153 |
-
- vast.ai for cheap RTX 4090 hourly compute (~$166 total).
|
|
|
|
| 18 |
|
| 19 |
# rsdiff-sr-cascade-ep650
|
| 20 |
|
| 21 |
+
A T5-conditioned cascaded diffusion model for **text-to-satellite-image
|
| 22 |
+
generation** at 256Γ256, trained on RSICD.
|
|
|
|
| 23 |
|
| 24 |
+
- **FID 65.70** on the full RSICD test split (N=1093, Inception
|
| 25 |
+
feature=2048, cascade-256, `cond_scale=5.0`).
|
| 26 |
+
- **CLIP-score 0.278** (OpenAI ViT-B/32), with a +0.046 lift over a
|
| 27 |
+
shuffled-caption null baseline.
|
| 28 |
|
| 29 |
+
Code & full tech report: https://github.com/asebaq/rsdiff
|
| 30 |
+
([REPORT.md](https://github.com/asebaq/rsdiff/blob/main/docs/REPORT.md)).
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 31 |
|
| 32 |
## Architecture
|
| 33 |
|
| 34 |
+
Two-stage Imagen-style cascade conditioned on a frozen T5-base text
|
| 35 |
+
encoder.
|
| 36 |
+
|
| 37 |
| Stage | Params | Resolution | Conditioning |
|
| 38 |
| --- | --- | --- | --- |
|
| 39 |
| LR base UNet | 27.18 M | 128Γ128 | T5-base, `p_uncond=0.1` |
|
| 40 |
+
| SR UNet | 92.66 M | 128 β 256 | T5-base + LR image, `p_uncond=0.1` |
|
| 41 |
|
| 42 |
+
Total β **120 M params**. Sampler: DDPM, T=1000 denoising steps.
|
|
|
|
|
|
|
|
|
|
| 43 |
|
| 44 |
## Files
|
| 45 |
|
| 46 |
+
| File | Size | What it is |
|
| 47 |
| --- | --- | --- |
|
| 48 |
+
| `ckpt_sr_ep650_step89050.pt` | ~1.9 GB | Merged cascade weights (LR base + SR) |
|
| 49 |
+
| `samples/` | ~2 MB | 16 demo PNGs at 256Β² + 4Γ4 grid |
|
| 50 |
+
| `captions.txt` | 72 KB | 1093 RSICD-test captions matching the demo and FID PNGs |
|
| 51 |
+
| `fid_result.json` | β | Headline FID (Inception feature=2048) |
|
| 52 |
+
| `fid_result_f768.json` | β | Cross-comparison FID (feature=768) |
|
| 53 |
+
| `clip_result.json` | β | OpenAI CLIP ViT-B/32 score + shuffled-baseline null |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 54 |
|
| 55 |
## Usage
|
| 56 |
|
|
|
|
|
|
|
|
|
|
| 57 |
```bash
|
| 58 |
git clone https://github.com/asebaq/rsdiff
|
| 59 |
cd rsdiff
|
|
|
|
| 63 |
# pull the checkpoint
|
| 64 |
hf download asebaq/rsdiff-sr-cascade-ep650 ckpt_sr_ep650_step89050.pt -o legacy/DDPM/ckpts/
|
| 65 |
|
| 66 |
+
# sample 16 captions from the RSICD test split
|
| 67 |
python legacy/DDPM/sample_grid.py \
|
| 68 |
--log_dir legacy/DDPM/logs/full_sr_gdm \
|
| 69 |
--data_root data/RSICD_optimal \
|
|
|
|
| 73 |
--sr --split test --seed 17
|
| 74 |
```
|
| 75 |
|
| 76 |
+
A `diffusers`-native sampling path is on the project roadmap; for now the
|
| 77 |
+
bundled cascade runner (`legacy/`) loads this checkpoint directly.
|
| 78 |
+
|
| 79 |
## Training data
|
| 80 |
|
| 81 |
[RSICD](https://huggingface.co/datasets/arampacha/rsicd) β 10 921 paired
|
| 82 |
+
satellite images and natural-language captions, official 8/1/1
|
| 83 |
+
train/val/test split (1093 test). At training time the first caption per
|
| 84 |
+
image (`sent1`) is used as the conditioning text.
|
| 85 |
|
| 86 |
## Intended use & limitations
|
| 87 |
|
| 88 |
**Intended use.** Research artefact for studying small-scale text-to-RS
|
| 89 |
+
generation. Useful as a baseline for new remote-sensing diffusion work
|
| 90 |
+
and as a starting point for downstream tasks (augmentation, change-
|
| 91 |
+
detection priors).
|
| 92 |
|
| 93 |
**Out of scope.**
|
| 94 |
|
| 95 |
+
- Operational or commercial remote-sensing imagery synthesis β visual
|
| 96 |
+
fidelity is well below modern web-scale models.
|
| 97 |
+
- Generating imagery intended to be mistaken for real satellite data.
|
| 98 |
+
- Anything safety-critical (disaster response, surveillance, defence).
|
|
|
|
| 99 |
|
| 100 |
**Known limitations.**
|
| 101 |
|
| 102 |
+
- **Overfit drift past SR ep650.** Validation FID climbs slightly after
|
| 103 |
+
the bowl (see [REPORT.md Β§4](https://github.com/asebaq/rsdiff/blob/main/docs/REPORT.md)).
|
| 104 |
+
No augmentation or weight decay; the train set is small (10 921 images).
|
| 105 |
+
- **Single-caption conditioning.** RSICD provides 5 captions per image;
|
| 106 |
+
this run uses only the first.
|
| 107 |
+
- **Pixel-space cascade.** Slower at inference than a latent-diffusion
|
| 108 |
+
port; a latent-space rewrite is on the project roadmap.
|
| 109 |
+
- **No memorisation probe.** Partial training-set memorisation is not
|
| 110 |
+
ruled out β pHash audit is on the roadmap.
|
| 111 |
|
| 112 |
## License
|
| 113 |
|
|
|
|
| 126 |
year = {2024},
|
| 127 |
doi = {10.1007/s00521-024-10363-3}
|
| 128 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 129 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|