Image-to-Image
Diffusers
Safetensors
sar-to-eo
remote-sensing
flow-matching
synthetic-aperture-radar
Run this model with HF Jobs
Run JeonghyeokDo/ReFlowSET on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/JeonghyeokDo/ReFlowSET. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/JeonghyeokDo/ReFlowSET on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use JeonghyeokDo/ReFlowSET with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use JeonghyeokDo/ReFlowSET with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("JeonghyeokDo/ReFlowSET", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Upload folder using huggingface_hub
Browse filesFiles changed (50)
- README.md+24-4
- baselines/README.mdAdded+313
- baselines/licenses/LICENSE-SoftPool-MIT.txtAdded+21
- baselines/licenses/LICENSE-bbdm.txtAdded+21
- baselines/licenses/LICENSE-cbbdm.txtAdded+21
- baselines/licenses/LICENSE-cdiffset.txtAdded+21
- baselines/licenses/LICENSE-cyclegan.txtAdded+58
- baselines/licenses/LICENSE-hidiff.txtAdded+201
- baselines/licenses/LICENSE-p2phd.txtAdded+45
- baselines/licenses/LICENSE-pix2pix.txtAdded+58
- baselines/licenses/LICENSE-resshift.txtAdded+35
- baselines/licenses/LICENSE-sd21ft.txtAdded+21
- baselines/licenses/LICENSE-spade.txtAdded+177
- baselines/licenses/NO-UPSTREAM-LICENSE.mdAdded+189
- baselines/qxs-saropt/bbdm/README.mdAdded+136
- baselines/qxs-saropt/cbbdm/README.mdAdded+153
- baselines/qxs-saropt/cdiffset/README.mdAdded+164
- baselines/qxs-saropt/cdiffset/config.jsonAdded+45
- baselines/qxs-saropt/conddiff/README.mdAdded+173
- baselines/qxs-saropt/controlnet/README.mdAdded+127
- baselines/qxs-saropt/controlnet/config.jsonAdded+56
- baselines/qxs-saropt/cyclegan/README.mdAdded+169
- baselines/qxs-saropt/ddpm/README.mdAdded+174
- baselines/qxs-saropt/e3diff/README.mdAdded+177
- baselines/qxs-saropt/hidiff/README.mdAdded+162
- baselines/qxs-saropt/p2phd/README.mdAdded+142
- baselines/qxs-saropt/pix2pix/README.mdAdded+141
- baselines/qxs-saropt/resshift/README.mdAdded+144
- baselines/qxs-saropt/sd21ft/README.mdAdded+156
- baselines/qxs-saropt/sd21ft/config.jsonAdded+45
- baselines/qxs-saropt/spade/README.mdAdded+176
- baselines/qxs-saropt/stegogan/README.mdAdded+200
- baselines/sar2opt/bbdm/README.mdAdded+138
- baselines/sar2opt/cbbdm/README.mdAdded+155
- baselines/sar2opt/cdiffset/README.mdAdded+166
- baselines/sar2opt/cdiffset/config.jsonAdded+45
- baselines/sar2opt/conddiff/README.mdAdded+175
- baselines/sar2opt/controlnet/README.mdAdded+128
- baselines/sar2opt/controlnet/config.jsonAdded+56
- baselines/sar2opt/cyclegan/README.mdAdded+172
- baselines/sar2opt/ddpm/README.mdAdded+176
- baselines/sar2opt/e3diff/README.mdAdded+179
- baselines/sar2opt/hidiff/README.mdAdded+164
- baselines/sar2opt/p2phd/README.mdAdded+145
- baselines/sar2opt/pix2pix/README.mdAdded+144
- baselines/sar2opt/resshift/README.mdAdded+146
- baselines/sar2opt/sd21ft/README.mdAdded+158
- baselines/sar2opt/sd21ft/config.jsonAdded+45
- baselines/sar2opt/spade/README.mdAdded+179
- baselines/sar2opt/stegogan/README.mdAdded+205
12345613 unmodified lines2021222324252688 unmodified lines115116117118119120121122123---license: cc-by-nc-4.0license_name: cc-by-nc-4.0pipeline_tag: image-to-imagelibrary_name: diffuserstags:13 unmodified lines- **Paper:** https://arxiv.org/abs/{{ARXIV_ID}}- **Code:** https://github.com/KAIST-VICLab/ReFlowSET- **Project page:** https://kaist-viclab.github.io/ReFlowSET_site/- **Comparison-method weights:** [`JeonghyeokDo/ReFlowSET-baselines`](https://huggingface.co/JeonghyeokDo/ReFlowSET-baselines)## Checkpoints88 unmodified linespretraining corpus. Neither dataset is redistributed. QXS-SAROPT requires citingarXiv:2103.08259 for research use.## Licence and provenance**Weights: CC BY-NC 4.0. Code: Apache-2.0.**The frozen autoencoder bundled in `vae/` is the **Apache-2.0** autoencoder from[`black-forest-labs/FLUX.2-klein-base-4B`](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4B),12345613 unmodified lines2021222324252688 unmodified lines115116117118119120121122123124125126127128129130131132133134135136137138139140141142143---license: otherlicense_name: mixed-see-model-cardpipeline_tag: image-to-imagelibrary_name: diffuserstags:13 unmodified lines- **Paper:** https://arxiv.org/abs/{{ARXIV_ID}}- **Code:** https://github.com/KAIST-VICLab/ReFlowSET- **Project page:** https://kaist-viclab.github.io/ReFlowSET_site/- **Comparison-method weights:** [`baselines/`](https://huggingface.co/JeonghyeokDo/ReFlowSET/tree/main/baselines) in this repository — all fifteen prior methods, both datasets## Checkpoints88 unmodified linespretraining corpus. Neither dataset is redistributed. QXS-SAROPT requires citingarXiv:2103.08259 for research use.## Comparison methods, in this same repository`baselines/` holds the **fifteen prior methods of the paper's main table**,retrained by us on the same splits and scored by the same evaluator — thirtycheckpoints, both datasets, each with its own card, its measured row, itsupstream repository and its licence. Start at[`baselines/README.md`](https://huggingface.co/JeonghyeokDo/ReFlowSET/blob/main/baselines/README.md).```pythonfrom diffusers import UNet2DConditionModelunet = UNet2DConditionModel.from_pretrained("JeonghyeokDo/ReFlowSET", subfolder="baselines/qxs-saropt/cdiffset")```## Licence and provenance**This repository is mixed-licence, so the Hub tag is `other`.** ReFlowSET's ownweights are **CC BY-NC 4.0** and the code is **Apache-2.0**. Everything under`baselines/` is a third-party method carrying its own terms — MIT, BSD-3-Clause,Apache-2.0, CreativeML-OpenRAIL-M, CC BY-NC-SA 4.0, S-Lab 1.0, and four with noupstream licence file at all. The per-method cards state each one, and the textsthat must travel are in `baselines/licenses/`. Check the method you intend touse; the repo-level tag is not a substitute.The frozen autoencoder bundled in `vae/` is the **Apache-2.0** autoencoder from[`black-forest-labs/FLUX.2-klein-base-4B`](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4B),
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313---license: otherlicense_name: per-method-see-belowlibrary_name: pytorchpipeline_tag: image-to-imagetags: - sar-to-eo - image-translation - remote-sensing - baselines - benchmark - reflowset---
# ReFlowSET — retrained comparison-method checkpoints
The fifteen comparison methods of the **ReFlowSET** SAR-to-EO benchmark, on bothof its datasets: **QXS-SAROPT** (256 px) and **SAR2Opt** (512 px). Thirtycheckpoint cells in total.
**Every checkpoint here was retrained by us.** None is an original author'sreleased checkpoint. Each method was trained on the same official split, at thesame resolution, under a budget stated in optimizer updates, and every cell wasthen scored through one evaluation pipeline with an identity-collapse andground-truth-leak audit. That is what makes the rows below comparable **to eachother** — and, for exactly the same reason, not comparable with the numbers inthe methods' own papers.
ReFlowSET itself is not in this repository. It lives at[JeonghyeokDo/ReFlowSET](https://huggingface.co/JeonghyeokDo/ReFlowSET); code at https://github.com/KAIST-VICLab/ReFlowSET; project pageat https://kaist-viclab.github.io/ReFlowSET_site/.
## Results — all sixteen rows, both datasets
Our own measurements, on the images each checkpoint produced. No number belowis copied from any paper.
### QXS-SAROPT — n = 3,999, 256 px
| Method | Venue | FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|---|---|| *General image-to-image* | | | | | | || pix2pix | CVPR'17 | 174.6 | 0.373 | 0.665 | 0.203 | 12.33 || CycleGAN ⚠ | ICCV'17 | 104.4 | 0.376 | 0.653 | 0.262 | 12.92 || pix2pixHD | CVPR'18 | 85.7 | 0.298 | 0.573 | 0.358 | 16.13 || SPADE | CVPR'19 | 90.7 | 0.292 | 0.599 | 0.320 | 14.53 || DDPM (SR3-class) | TPAMI'22 | 43.8 | 0.311 | 0.620 | 0.359 | 14.04 || SD2.1 fine-tune only | CVPR'22 | 19.1 | 0.257 | 0.561 | 0.348 | 15.40 || BBDM | CVPR'23 | 76.6 | 0.270 | 0.568 | 0.352 | 15.34 || ControlNet | ICCV'23 | 50.4 | 0.307 | 0.604 | 0.297 | 13.42 || HI-Diff | NeurIPS'23 | 324.3 | 0.539 | 0.692 | 0.457 | 17.10 || ResShift | NeurIPS'23 | 140.2 | 0.334 | 0.607 | 0.217 | 14.20 || StegoGAN ⚠ | CVPR'24 | 106.8 | 0.384 | 0.658 | 0.254 | 12.96 || *SAR-to-EO* | | | | | | || Conditional Diffusion | GRSL'24 | 88.6 | 0.355 | 0.730 | 0.213 | 11.55 || cBBDM | GRSL'25 | 50.6 | 0.246 | 0.539 | 0.372 | 16.02 || E3Diff | GRSL'25 | 47.8 | 0.278 | 0.530 | 0.302 | 16.44 || C-DiffSET | TCSVT'26 | 19.9 | 0.233 | 0.526 | 0.380 | 16.92 || *Ours* | | | | | | || **ReFlowSET (ours)** | — | 19.1 | 0.231 | 0.534 | 0.355 | 16.09 |
### SAR2Opt — n = 627, 512 px (centre crops of the 600 px tiles)
| Method | Venue | FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|---|---|| *General image-to-image* | | | | | | || pix2pix | CVPR'17 | 261.9 | 0.347 | 0.657 | 0.199 | 13.39 || CycleGAN ⚠ | ICCV'17 | 143.5 | 0.330 | 0.650 | 0.178 | 12.90 || pix2pixHD | CVPR'18 | 146.3 | 0.283 | 0.567 | 0.268 | 15.95 || SPADE | CVPR'19 | 142.5 | 0.265 | 0.597 | 0.234 | 14.47 || DDPM (SR3-class) | TPAMI'22 | 122.5 | 0.295 | 0.610 | 0.313 | 13.65 || SD2.1 fine-tune only | CVPR'22 | 71.8 | 0.211 † | 0.541 | 0.293 | 16.24 || BBDM | CVPR'23 | 143.1 | 0.290 | 0.590 | 0.276 | 15.29 || ControlNet | ICCV'23 | 140.5 | 0.350 | 0.643 | 0.217 | 11.73 || HI-Diff | NeurIPS'23 | 319.8 | 0.473 | 0.692 | 0.384 | 17.36 || ResShift | NeurIPS'23 | 141.7 | 0.304 | 0.597 | 0.177 | 14.31 || StegoGAN ⚠ | CVPR'24 | 150.1 | 0.347 | 0.655 | 0.158 | 12.47 || *SAR-to-EO* | | | | | | || Conditional Diffusion | GRSL'24 | 211.8 | 0.415 | 0.686 | 0.248 | 12.48 || cBBDM | GRSL'25 | 222.3 | 0.377 | 0.571 | 0.361 | 17.05 || E3Diff | GRSL'25 | 104.7 | 0.232 | 0.529 | 0.249 | 16.09 || C-DiffSET | TCSVT'26 | 78.1 | 0.214 † | 0.529 | 0.314 | 16.81 || *Ours* | | | | | | || **ReFlowSET (ours)** | — | 66.3 | 0.185 | 0.522 | 0.287 | 16.06 |
⚠ **fails the input-copy audit** — see *Identity collapse* below.† **these two DISTS values were re-measured.** The image dumps for these twoSAR2Opt cells were regenerated after their last extended-metrics pass, and thatpass's resume check keys on the number of images rather than on their content, soit skipped them and their stored DISTS went stale. Both were re-measured on thecurrent dumps at full n=627 and the table prints the re-measurement (SD2.1-FT0.212 -> **0.211**; C-DiffSET 0.2141 -> **0.2136**, unchanged at three decimals).The harness was validated on a cell that is *not* stale, whose DISTS itreproduces to 6e-6. FID, LPIPS, SSIM and PSNR come from a pass that rescoresevery cell on every run and were never affected.
## Read before you compare these numbers with a paper
**These numbers are not comparable with the source papers, and are not meant tobe.** Three reasons, all deliberate:
1. **Budgets are matched across the benchmark, not to each method's own recipe.** Several methods are trained here at a fraction of their published schedule — HI-Diff, for instance, is trained for 50,000 updates against an upstream recipe of 600,000, with progressive resizing disabled. Where we departed from a published recipe, the method's own card says so and says by how much.2. **Budgets are quoted in optimizer updates, never epochs.** The two datasets differ by more than tenfold in size (16,001 versus 1,450 training pairs), so an epoch count means something completely different on each. Comparing unpaired methods by epochs produced two successive wrong conclusions in our own work before we changed the unit.3. **One evaluation protocol for everyone.** Same test items, same resolution, same metric implementations, same ground truth. SAR2Opt is **centre-cropped** to 512 px and never resized, in training and in evaluation alike.
### The LPIPS convention
LPIPS here is **LPIPS-VGG on inputs mapped to `[-1, 1]`** before the network —`lpips_vgg(x * 2 - 1, y * 2 - 1)` with the library's default `normalize=False`.The other convention, which several released evaluators use, hands the network`[0, 1]` inputs *unscaled* (still `normalize=False`) and produces a**systematically lower number** — about 0.05 lower — on the same images. Notethat `[0, 1]` inputs with `normalize=True` is the *same* thing as ours, not theother one; only the flag differs. Both are called "LPIPS" in the literature. If you compare a number fromthis table against one from a paper, check which convention that paper usedfirst; otherwise the comparison is meaningless. The same care applies in reverseto anyone quoting these numbers.
PSNR and SSIM are per-image torchmetrics with `data_range=1`. FID is`pytorch-fid` against the size-matched ground-truth test set. DISTS is thestandard implementation on the same pairs. Where the generated size and theground-truth size differ, the ground truth is centre-cropped to match.
### Identity collapse
**Four of the thirty cells fail an input-copy audit**: CycleGAN and StegoGAN, onboth datasets. Their outputs are closer to the SAR image they were given than tothe EO image they were asked for — mean |output − SAR| < mean |output − groundtruth| — which is the signature of a model that has learned to pass its inputthrough rather than translate it.
| cell | ratio (SAR distance ÷ GT distance) | verdict ||---|---|---|| QXS-SAROPT CycleGAN | 0.847 | COLLAPSED || QXS-SAROPT StegoGAN | 0.919 | COLLAPSED || SAR2Opt CycleGAN | 0.795 | COLLAPSED || SAR2Opt StegoGAN | 0.758 | COLLAPSED |
**Their metric values are reported unchanged and marked in place.** They are whatthe released implementation does at its own published protocol, and a benchmarkthat quietly substitutes a better-behaved variant is not reporting the method.But they should not be read as translation quality. No other cell on eitherdataset collapses — in particular DDPM, Conditional Diffusion and BBDM do **not**collapse here, whatever they may do elsewhere.
The companion leak audit is clean: no cell on either dataset shows a generationthat matches its own ground truth anomalously better than it matches otherimages' ground truth. Per-cell numbers are on each method's card.
**One oracle you must not use.** StegoGAN's `fake_B` output is computed as`netG_A(real_A, latent(real_B))` — conditioned on the ground truth, andimpossible to produce at deployment. Only `fake_B_clean = netG_A(real_A)` is aprediction, and it is what the StegoGAN rows above report. Any published StegoGANnumber should say which of the two it is.
## Layout
```<dataset>/<method>/<weight files> + README.mddataset ∈ { qxs-saropt, sar2opt }licenses/ third-party licence texts, one per method```
Every one of the thirty folders carries its own `README.md` with that cell'sarchitecture, the file-by-file contents, the training budget in optimizerupdates, the measured metrics, a copy-pasteable load-and-translate snippet, thetraps specific to that method, and its licence stated factually.
| method | folder | files | upstream code ||---|---|---|---|| pix2pix | `pix2pix/` | `net_G.pth` | `junyanz/pytorch-CycleGAN-and-pix2pix` || CycleGAN | `cyclegan/` | `net_G_A.pth` (**SAR→EO**), `net_G_B.pth` | `junyanz/pytorch-CycleGAN-and-pix2pix` || pix2pixHD | `p2phd/` | `net_G.pth` | `NVIDIA/pix2pixHD` || SPADE | `spade/` | `net_G.pth` | `NVlabs/SPADE` || DDPM (SR3-class) | `ddpm/` | `gen.pth` | `DeepSARRS/E3Diff`, stage 1 || SD2.1 fine-tune only | `sd21ft/` | `diffusion_pytorch_model.safetensors`, `config.json` | `KAIST-VICLab/C-DiffSET`, stage 1, on SD 2.1-base || BBDM | `bbdm/` | `last_model.pth` | `xuekt98/BBDM` || ControlNet | `controlnet/` | `diffusion_pytorch_model.safetensors`, `config.json` | `huggingface/diffusers` `train_controlnet.py`, on SD 2.1-base || HI-Diff | `hidiff/` | `S1_*.pth` ×2, `S2_*.pth` ×3 (**only the three `S2_` files are needed at inference**) | `zhengchen1999/HI-Diff` || ResShift | `resshift/` | `ema_model.pth` | `zsyOAOA/ResShift` || StegoGAN | `stegogan/` | `net_G_A.pth` (**SAR→EO**), `net_G_B.pth` | `sian-wusidi/StegoGAN` || Conditional Diffusion | `conddiff/` | `ema_final.pt` | `Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation` || cBBDM | `cbbdm/` | `last_model.pth` | `egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical` || E3Diff | `e3diff/` | `gen.pth` | `DeepSARRS/E3Diff`, stage 2 || C-DiffSET | `cdiffset/` | `diffusion_pytorch_model.safetensors`, `config.json` | `KAIST-VICLab/C-DiffSET`, stage 2 |
### Three checkpoints these weights need and this repository does not carry
* **BBDM and cBBDM** need the CompVis latent-diffusion **vq-f4 VQGAN** (`model.ckpt`, 756,175,527 bytes) at the path named in their config — at construction time, even though the same weights are also inside `last_model.pth`. MIT.* **ResShift** needs the CompVis **vq-f4 autoencoder** (221,364,711 bytes). MIT.* **SD2.1-FT, ControlNet and C-DiffSET** need Stable Diffusion 2.1-base for the frozen VAE, text encoder, tokenizer and scheduler. Their cards name the exact repository we loaded.* **DDPM and E3Diff** need no extra checkpoint, but do need **PPB-despeckled and Canny condition images** computed from each SAR input; neither can be run from a SAR file alone.
## Licences
**A single repository-wide licence tag would be wrong for this collection.** Thefifteen methods fall into three tiers, and the restrictive terms in tiers B and Ctravel with the individual cells. Each method's card states its position in full;the licence texts are in `licenses/`.
| method | upstream licence | redistribution | what propagates ||---|---|---|---|| pix2pix | multi-part BSD (CycleGAN / pix2pix / DCGAN notices) | ✅ with the notice | no-endorsement (DCGAN part) || CycleGAN | same file as pix2pix | ✅ with the notice | same || pix2pixHD | BSD (NVIDIA 2019) + bundled CycleGAN notice | ✅ with both notices | none || **SPADE** | **CC BY-NC-SA 4.0** | ⚠️ **non-commercial only** | **NonCommercial + ShareAlike** — this cell is itself distributed under CC BY-NC-SA 4.0 || **DDPM (SR3-class)** | **none declared** | ⚠️ **no express grant** — published by our decision | unknown; there is no licence to read || SD2.1 fine-tune only | MIT code (C-DiffSET) / **Open RAIL++-M** weights | ✅ under Open RAIL++-M | **Attachment A use restrictions** || BBDM | MIT | ✅ | none (needs the external vq-f4 VQGAN, MIT) || ControlNet | Apache-2.0 code (diffusers) / **Open RAIL++-M** weights | ✅ under Open RAIL++-M | **Attachment A use restrictions** || HI-Diff | Apache-2.0 | ✅ | ship the licence, keep notices, state your modifications || **ResShift** | **S-Lab License 1.0** | ⚠️ **non-commercial only** | **NonCommercial**; no-endorsement || **StegoGAN** | **none declared** | ⚠️ **no express grant** — published by our decision | unknown || **Conditional Diffusion** | **none declared** | ⚠️ **no express grant** — published by our decision | unknown (the guided-diffusion parts it forks are MIT) || cBBDM | MIT | ✅ | none (needs the external vq-f4 VQGAN, MIT) || **E3Diff** | **none declared** | ⚠️ **no express grant** — published by our decision | unknown || C-DiffSET | MIT code / **Open RAIL++-M** weights | ✅ under Open RAIL++-M | **Attachment A use restrictions** |
### The four with no upstream licence
**StegoGAN, E3Diff, DDPM (SR3-class) and Conditional Diffusion are derived fromupstream code that publishes no licence at all** — no LICENSE, LICENCE, COPYINGor NOTICE file, no licence section in the README, and no licence declared toGitHub. Under default copyright, all rights remain reserved by those authors and**no express permission to redistribute derived work has been granted** to us orto you.
We publish these four anyway, so that the benchmark is reproducible end to end,and we say so plainly rather than implying a permission that does not exist. Ifyou intend to redistribute them or build on them, assess that for yourself, andconsider asking the upstream authors directly.`licenses/NO-UPSTREAM-LICENSE.md` records, per method, exactly what we checkedand exactly what we found.
### Files in `licenses/`
`LICENSE-pix2pix.txt`, `LICENSE-cyclegan.txt`, `LICENSE-p2phd.txt`,`LICENSE-spade.txt`, `LICENSE-bbdm.txt`, `LICENSE-cbbdm.txt`,`LICENSE-hidiff.txt`, `LICENSE-resshift.txt`, `LICENSE-cdiffset.txt`,`LICENSE-sd21ft.txt` — one per method, copied verbatim from the upstreamrepository we trained with. `LICENSE-SoftPool-MIT.txt` is a vendored dependencyof the E3Diff code base and is included because it is genuinely part of whatthose two cells were trained with; it is **not** a licence for E3Diff.`NO-UPSTREAM-LICENSE.md` covers the four methods with no grant.`LICENSE-WEIGHTS.md` at the repository root is the CreativeML Open RAIL++-Mtext, including Attachment A, which governs the three Stable-Diffusion-derivedcells.
## Datasets
Neither corpus is redistributed here, in any form, and neither may beredistributed from here.
* **QXS-SAROPT** publishes no licence file; its one stated term is a citation requirement — *"This paper must be cited when the dataset is used for research purposes"* (Huang et al., [arXiv:2103.08259](https://arxiv.org/abs/2103.08259)). Its distribution is request-gated by the authors. Obtain it from them.* **SAR2Opt** ships an MIT LICENSE, `Copyright (c) 2021 MarsZhaoYT`. The MIT text grants rights in "the Software"; the repository does not name the imagery sources, so that file is best read as covering the authors' packaging and code. Citation requested: Zhao, Celik, Liu and Li, *A Comparative Analysis of GAN-based Methods for SAR-to-Optical Image Translation*, IEEE GRSL, 2022.* **The optical side of both datasets is Google-Earth-derived.** Copyright in that imagery is held by third parties, not by the dataset authors and not by us. No such imagery appears in this repository.
## A note on two venue labels
The table above prints the venue strings as they appear in the ReFlowSET paper.Two of them do not match the year in the upstream repositories' own citationblocks, and both refer to the same paper under an early-access versus issue year:
* **Conditional Diffusion** — the authors' bibtex says **2023**, [doi:10.1109/LGRS.2023.3337143](https://doi.org/10.1109/LGRS.2023.3337143).* **E3Diff** — the authors' bibtex says **2024**, [doi:10.1109/LGRS.2024.3506566](https://doi.org/10.1109/LGRS.2024.3506566).
Cite by DOI.
## Citation
If you use this benchmark or any of these weights, please cite ReFlowSET:
```bibtex@article{do2026reflowset, title = {ReFlowSET: Representation-Aligned Latent Flow Matching for SAR-to-EO Image Translation}, author = {Jeonghyeok Do<sup>1</sup>, Seungchul Lee<sup>2</sup>, Munchurl Kim<sup>1*</sup>}, journal = {arXiv preprint arXiv:{{ARXIV_ID}}}, year = {2026}}```
**And please cite each method's original paper** — every model card carries thereference — **and both dataset papers.** The QXS-SAROPT citation is required bythat dataset's own terms.123456789101112131415161718192021MIT License
Copyright (c) 2020 Alexandros Stergiou
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021MIT License
Copyright (c) 2023 xuekt98
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021MIT License
Copyright (c) 2025 egshkim
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021MIT License
Copyright (c) 2026 KAIST VICLab
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758Copyright (c) 2017, Jun-Yan Zhu and Taesung ParkAll rights reserved.
Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------- LICENSE FOR pix2pix --------------------------------BSD License
For pix2pix softwareCopyright (c) 2016, Phillip Isola and Jun-Yan ZhuAll rights reserved.
Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
----------------------------- LICENSE FOR DCGAN --------------------------------BSD License
For dcgan.torch software
Copyright (c) 2015, Facebook, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name Facebook nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201 Apache License Version 2.0, January 2004 http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files.
"Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions:
(a) You must give any other recipients of the Work or Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License.
You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives.
Copyright 2023 HI-Diff Authors
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.123456789101112131415161718192021222324252627282930313233343536373839404142434445Copyright (C) 2019 NVIDIA Corporation. Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu.BSD License. All rights reserved.
Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR ANY PARTICULAR PURPOSE. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
--------------------------- LICENSE FOR pytorch-CycleGAN-and-pix2pix ----------------Copyright (c) 2017, Jun-Yan Zhu and Taesung ParkAll rights reserved.
Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758Copyright (c) 2017, Jun-Yan Zhu and Taesung ParkAll rights reserved.
Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THEIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE AREDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLEFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIALDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS ORSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVERCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USEOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------- LICENSE FOR pix2pix --------------------------------BSD License
For pix2pix softwareCopyright (c) 2016, Phillip Isola and Jun-Yan ZhuAll rights reserved.
Redistribution and use in source and binary forms, with or withoutmodification, are permitted provided that the following conditions are met:
* Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
* Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
----------------------------- LICENSE FOR DCGAN --------------------------------BSD License
For dcgan.torch software
Copyright (c) 2015, Facebook, Inc. All rights reserved.
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
Neither the name Facebook nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.1234567891011121314151617181920212223242526272829303132333435S-Lab License 1.0
Copyright 2022 S-Lab
Redistribution and use for non-commercial purpose in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
In the event that redistribution and/or use for commercial purpose in source or binary forms, with or without modification is required, please contact the contributor(s) of the work.123456789101112131415161718192021MIT License
Copyright (c) 2026 KAIST VICLab
Permission is hereby granted, free of charge, to any person obtaining a copyof this software and associated documentation files (the "Software"), to dealin the Software without restriction, including without limitation the rightsto use, copy, modify, merge, publish, distribute, sublicense, and/or sellcopies of the Software, and to permit persons to whom the Software isfurnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in allcopies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS ORIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THEAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHERLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THESOFTWARE.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177## creative commons
# Attribution-NonCommercial-ShareAlike 4.0 International
Creative Commons Corporation (“Creative Commons”) is not a law firm and does not provide legal services or legal advice. Distribution of Creative Commons public licenses does not create a lawyer-client or other relationship. Creative Commons makes its licenses and related information available on an “as-is” basis. Creative Commons gives no warranties regarding its licenses, any material licensed under their terms and conditions, or any related information. Creative Commons disclaims all liability for damages resulting from their use to the fullest extent possible.
### Using Creative Commons Public Licenses
Creative Commons public licenses provide a standard set of terms and conditions that creators and other rights holders may use to share original works of authorship and other material subject to copyright and certain other rights specified in the public license below. The following considerations are for informational purposes only, are not exhaustive, and do not form part of our licenses.
* __Considerations for licensors:__ Our public licenses are intended for use by those authorized to give the public permission to use material in ways otherwise restricted by copyright and certain other rights. Our licenses are irrevocable. Licensors should read and understand the terms and conditions of the license they choose before applying it. Licensors should also secure all rights necessary before applying our licenses so that the public can reuse the material as expected. Licensors should clearly mark any material not subject to the license. This includes other CC-licensed material, or material used under an exception or limitation to copyright. [More considerations for licensors](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensors).
* __Considerations for the public:__ By using one of our public licenses, a licensor grants the public permission to use the licensed material under specified terms and conditions. If the licensor’s permission is not necessary for any reason–for example, because of any applicable exception or limitation to copyright–then that use is not regulated by the license. Our licenses grant only permissions under copyright and certain other rights that a licensor has authority to grant. Use of the licensed material may still be restricted for other reasons, including because others have copyright or other rights in the material. A licensor may make special requests, such as asking that all changes be marked or described. Although not required by our licenses, you are encouraged to respect those requests where reasonable. [More considerations for the public](http://wiki.creativecommons.org/Considerations_for_licensors_and_licensees#Considerations_for_licensees).
## Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License
By exercising the Licensed Rights (defined below), You accept and agree to be bound by the terms and conditions of this Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International Public License ("Public License"). To the extent this Public License may be interpreted as a contract, You are granted the Licensed Rights in consideration of Your acceptance of these terms and conditions, and the Licensor grants You such rights in consideration of benefits the Licensor receives from making the Licensed Material available under these terms and conditions.
### Section 1 – Definitions.
a. __Adapted Material__ means material subject to Copyright and Similar Rights that is derived from or based upon the Licensed Material and in which the Licensed Material is translated, altered, arranged, transformed, or otherwise modified in a manner requiring permission under the Copyright and Similar Rights held by the Licensor. For purposes of this Public License, where the Licensed Material is a musical work, performance, or sound recording, Adapted Material is always produced where the Licensed Material is synched in timed relation with a moving image.
b. __Adapter's License__ means the license You apply to Your Copyright and Similar Rights in Your contributions to Adapted Material in accordance with the terms and conditions of this Public License.
c. __BY-NC-SA Compatible License__ means a license listed at [creativecommons.org/compatiblelicenses](http://creativecommons.org/compatiblelicenses), approved by Creative Commons as essentially the equivalent of this Public License.
d. __Copyright and Similar Rights__ means copyright and/or similar rights closely related to copyright including, without limitation, performance, broadcast, sound recording, and Sui Generis Database Rights, without regard to how the rights are labeled or categorized. For purposes of this Public License, the rights specified in Section 2(b)(1)-(2) are not Copyright and Similar Rights.
e. __Effective Technological Measures__ means those measures that, in the absence of proper authority, may not be circumvented under laws fulfilling obligations under Article 11 of the WIPO Copyright Treaty adopted on December 20, 1996, and/or similar international agreements.
f. __Exceptions and Limitations__ means fair use, fair dealing, and/or any other exception or limitation to Copyright and Similar Rights that applies to Your use of the Licensed Material.
g. __License Elements__ means the license attributes listed in the name of a Creative Commons Public License. The License Elements of this Public License are Attribution, NonCommercial, and ShareAlike.
h. __Licensed Material__ means the artistic or literary work, database, or other material to which the Licensor applied this Public License.
i. __Licensed Rights__ means the rights granted to You subject to the terms and conditions of this Public License, which are limited to all Copyright and Similar Rights that apply to Your use of the Licensed Material and that the Licensor has authority to license.
h. __Licensor__ means the individual(s) or entity(ies) granting rights under this Public License.
i. __NonCommercial__ means not primarily intended for or directed towards commercial advantage or monetary compensation. For purposes of this Public License, the exchange of the Licensed Material for other material subject to Copyright and Similar Rights by digital file-sharing or similar means is NonCommercial provided there is no payment of monetary compensation in connection with the exchange.
j. __Share__ means to provide material to the public by any means or process that requires permission under the Licensed Rights, such as reproduction, public display, public performance, distribution, dissemination, communication, or importation, and to make material available to the public including in ways that members of the public may access the material from a place and at a time individually chosen by them.
k. __Sui Generis Database Rights__ means rights other than copyright resulting from Directive 96/9/EC of the European Parliament and of the Council of 11 March 1996 on the legal protection of databases, as amended and/or succeeded, as well as other essentially equivalent rights anywhere in the world.
l. __You__ means the individual or entity exercising the Licensed Rights under this Public License. Your has a corresponding meaning.
### Section 2 – Scope.
a. ___License grant.___
1. Subject to the terms and conditions of this Public License, the Licensor hereby grants You a worldwide, royalty-free, non-sublicensable, non-exclusive, irrevocable license to exercise the Licensed Rights in the Licensed Material to:
A. reproduce and Share the Licensed Material, in whole or in part, for NonCommercial purposes only; and
B. produce, reproduce, and Share Adapted Material for NonCommercial purposes only.
2. __Exceptions and Limitations.__ For the avoidance of doubt, where Exceptions and Limitations apply to Your use, this Public License does not apply, and You do not need to comply with its terms and conditions. 3. __Term.__ The term of this Public License is specified in Section 6(a).
4. __Media and formats; technical modifications allowed.__ The Licensor authorizes You to exercise the Licensed Rights in all media and formats whether now known or hereafter created, and to make technical modifications necessary to do so. The Licensor waives and/or agrees not to assert any right or authority to forbid You from making technical modifications necessary to exercise the Licensed Rights, including technical modifications necessary to circumvent Effective Technological Measures. For purposes of this Public License, simply making modifications authorized by this Section 2(a)(4) never produces Adapted Material. 5. __Downstream recipients.__
A. __Offer from the Licensor – Licensed Material.__ Every recipient of the Licensed Material automatically receives an offer from the Licensor to exercise the Licensed Rights under the terms and conditions of this Public License.
B. __Additional offer from the Licensor – Adapted Material.__ Every recipient of Adapted Material from You automatically receives an offer from the Licensor to exercise the Licensed Rights in the Adapted Material under the conditions of the Adapter’s License You apply.
C. __No downstream restrictions.__ You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, the Licensed Material if doing so restricts exercise of the Licensed Rights by any recipient of the Licensed Material.
6. __No endorsement.__ Nothing in this Public License constitutes or may be construed as permission to assert or imply that You are, or that Your use of the Licensed Material is, connected with, or sponsored, endorsed, or granted official status by, the Licensor or others designated to receive attribution as provided in Section 3(a)(1)(A)(i). b. ___Other rights.___
1. Moral rights, such as the right of integrity, are not licensed under this Public License, nor are publicity, privacy, and/or other similar personality rights; however, to the extent possible, the Licensor waives and/or agrees not to assert any such rights held by the Licensor to the limited extent necessary to allow You to exercise the Licensed Rights, but not otherwise.
2. Patent and trademark rights are not licensed under this Public License.
3. To the extent possible, the Licensor waives any right to collect royalties from You for the exercise of the Licensed Rights, whether directly or through a collecting society under any voluntary or waivable statutory or compulsory licensing scheme. In all other cases the Licensor expressly reserves any right to collect such royalties, including when the Licensed Material is used other than for NonCommercial purposes. ### Section 3 – License Conditions.
Your exercise of the Licensed Rights is expressly made subject to the following conditions.
a. ___Attribution.___
1. If You Share the Licensed Material (including in modified form), You must:
A. retain the following if it is supplied by the Licensor with the Licensed Material:
i. identification of the creator(s) of the Licensed Material and any others designated to receive attribution, in any reasonable manner requested by the Licensor (including by pseudonym if designated);
ii. a copyright notice;
iii. a notice that refers to this Public License;
iv. a notice that refers to the disclaimer of warranties;
v. a URI or hyperlink to the Licensed Material to the extent reasonably practicable;
B. indicate if You modified the Licensed Material and retain an indication of any previous modifications; and
C. indicate the Licensed Material is licensed under this Public License, and include the text of, or the URI or hyperlink to, this Public License.
2. You may satisfy the conditions in Section 3(a)(1) in any reasonable manner based on the medium, means, and context in which You Share the Licensed Material. For example, it may be reasonable to satisfy the conditions by providing a URI or hyperlink to a resource that includes the required information.
3. If requested by the Licensor, You must remove any of the information required by Section 3(a)(1)(A) to the extent reasonably practicable.
b. ___ShareAlike.___
In addition to the conditions in Section 3(a), if You Share Adapted Material You produce, the following conditions also apply.
1. The Adapter’s License You apply must be a Creative Commons license with the same License Elements, this version or later, or a BY-NC-SA Compatible License.
2. You must include the text of, or the URI or hyperlink to, the Adapter's License You apply. You may satisfy this condition in any reasonable manner based on the medium, means, and context in which You Share Adapted Material.
3. You may not offer or impose any additional or different terms or conditions on, or apply any Effective Technological Measures to, Adapted Material that restrict exercise of the rights granted under the Adapter's License You apply.
### Section 4 – Sui Generis Database Rights.
Where the Licensed Rights include Sui Generis Database Rights that apply to Your use of the Licensed Material:
a. for the avoidance of doubt, Section 2(a)(1) grants You the right to extract, reuse, reproduce, and Share all or a substantial portion of the contents of the database for NonCommercial purposes only;
b. if You include all or a substantial portion of the database contents in a database in which You have Sui Generis Database Rights, then the database in which You have Sui Generis Database Rights (but not its individual contents) is Adapted Material, including for purposes of Section 3(b); and
c. You must comply with the conditions in Section 3(a) if You Share all or a substantial portion of the contents of the database.
For the avoidance of doubt, this Section 4 supplements and does not replace Your obligations under this Public License where the Licensed Rights include other Copyright and Similar Rights.
### Section 5 – Disclaimer of Warranties and Limitation of Liability.
a. __Unless otherwise separately undertaken by the Licensor, to the extent possible, the Licensor offers the Licensed Material as-is and as-available, and makes no representations or warranties of any kind concerning the Licensed Material, whether express, implied, statutory, or other. This includes, without limitation, warranties of title, merchantability, fitness for a particular purpose, non-infringement, absence of latent or other defects, accuracy, or the presence or absence of errors, whether or not known or discoverable. Where disclaimers of warranties are not allowed in full or in part, this disclaimer may not apply to You.__
b. __To the extent possible, in no event will the Licensor be liable to You on any legal theory (including, without limitation, negligence) or otherwise for any direct, special, indirect, incidental, consequential, punitive, exemplary, or other losses, costs, expenses, or damages arising out of this Public License or use of the Licensed Material, even if the Licensor has been advised of the possibility of such losses, costs, expenses, or damages. Where a limitation of liability is not allowed in full or in part, this limitation may not apply to You.__
c. The disclaimer of warranties and limitation of liability provided above shall be interpreted in a manner that, to the extent possible, most closely approximates an absolute disclaimer and waiver of all liability.
### Section 6 – Term and Termination.
a. This Public License applies for the term of the Copyright and Similar Rights licensed here. However, if You fail to comply with this Public License, then Your rights under this Public License terminate automatically.
b. Where Your right to use the Licensed Material has terminated under Section 6(a), it reinstates:
1. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
2. automatically as of the date the violation is cured, provided it is cured within 30 days of Your discovery of the violation; or
For the avoidance of doubt, this Section 6(b) does not affect any right the Licensor may have to seek remedies for Your violations of this Public License.
c. For the avoidance of doubt, the Licensor may also offer the Licensed Material under separate terms or conditions or stop distributing the Licensed Material at any time; however, doing so will not terminate this Public License.
d. Sections 1, 5, 6, 7, and 8 survive termination of this Public License.
### Section 7 – Other Terms and Conditions.
a. The Licensor shall not be bound by any additional or different terms or conditions communicated by You unless expressly agreed.
b. Any arrangements, understandings, or agreements regarding the Licensed Material not stated herein are separate from and independent of the terms and conditions of this Public License.
### Section 8 – Interpretation.
a. For the avoidance of doubt, this Public License does not, and shall not be interpreted to, reduce, limit, restrict, or impose conditions on any use of the Licensed Material that could lawfully be made without permission under this Public License.
b. To the extent possible, if any provision of this Public License is deemed unenforceable, it shall be automatically reformed to the minimum extent necessary to make it enforceable. If the provision cannot be reformed, it shall be severed from this Public License without affecting the enforceability of the remaining terms and conditions.
c. No term or condition of this Public License will be waived and no failure to comply consented to unless expressly agreed to by the Licensor.
d. Nothing in this Public License constitutes or may be interpreted as a limitation upon, or waiver of, any privileges and immunities that apply to the Licensor or You, including from the legal processes of any jurisdiction or authority.
```Creative Commons is not a party to its public licenses. Notwithstanding, Creative Commons may elect to apply one of its public licenses to material it publishes and in those instances will be considered the “Licensor.” Except for the limited purpose of indicating that material is shared under a Creative Commons public license or as otherwise permitted by the Creative Commons policies published at [creativecommons.org/policies](http://creativecommons.org/policies), Creative Commons does not authorize the use of the trademark “Creative Commons” or any other trademark or logo of Creative Commons without its prior written consent including, without limitation, in connection with any unauthorized modifications to any of its public licenses or any other arrangements, understandings, or agreements concerning use of licensed material. For the avoidance of doubt, this paragraph does not form part of the public licenses.
Creative Commons may be contacted at [creativecommons.org](http://creativecommons.org/).```123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189# Four upstream code bases publish no licence
This file records, per method, **exactly what we checked and exactly what wefound**. It exists because four of the fifteen comparison methods in thisrepository are derived from upstream code that grants no licence at all, and areader of these weights is entitled to that fact stated plainly rather thaninferred from a missing file.
The four are **StegoGAN**, **E3Diff**, **DDPM (SR3-class)** — which is the E3Diffcode base run in its stage-1 configuration — and **Conditional Diffusion(CondDiff)**.
The checkpoints derived from them **are published here anyway**, as a deliberatedecision, so that the benchmark is reproducible end to end. We are not assertingthat a licence exists, and we are not granting one. Under default copyright, allrights in the upstream code remain reserved by its authors, and **no expresspermission to redistribute derived work has been granted to us or to you**. Ifyou intend to redistribute these four checkpoints or build on them, assess thatfor yourself, and consider asking the upstream authors directly.
Everything below was checked on **2026-08-28**.
---
## What "checked" means
For each upstream we ran three tests. Where a test does not apply (for example,a vendored tree that is not a git clone has no tracked-file list), that is statedrather than skipped silently.
1. **Filesystem.** `find <repo> -maxdepth 3 \( -iname '*licen*' -o -iname 'COPYING*' -o -iname 'NOTICE*' \)` over the vendored working tree.2. **Version control.** `git ls-files | grep -iE 'licen|copying|notice'` at the pinned commit, which catches a licence file that exists upstream but was deleted locally.3. **Upstream host.** The GitHub REST API for the repository (`license` field) and its `/license` endpoint.4. **README.** `grep -inE 'licen|copyright|all rights reserved|commercial'` over the repository README, because some projects state terms in prose instead of in a file.
---
## StegoGAN
*StegoGAN: Leveraging Steganography for Non-Bijective Image-to-ImageTranslation*, Wu, Chen, Mermet, Hurni, Schindler, Gonthier and Landrieu,CVPR 2024.
| test | result ||---|---|| upstream | `https://github.com/sian-wusidi/StegoGAN` (the official CVPR 2024 code) || pinned commit | `cad61997c0f82793444f60f81298142b80cdf3c1` || filesystem, maxdepth 3 | **no match** — no LICENSE, LICENCE, COPYING or NOTICE at any depth || tracked files at that commit | **0 of 52** tracked paths are licence-shaped || GitHub API | repository exists; `"license": null`; the `/license` endpoint returns **HTTP 404** || README | **no match** for `licen`, `copyright`, `all rights reserved` or `commercial` — the README has no licence section |
**Lineage.** StegoGAN's README states it is built on`junyanz/pytorch-CycleGAN-and-pix2pix`. The parts of the tree that areunmodified CycleGAN carry that project's BSD notice, reproduced here as`LICENSE-cyclegan.txt`. **That notice does not extend to StegoGAN's owncontributions**, which are the mismatch-mask generator (`resnet_9blocks_maskv1` /`maskv3`), the fusion block and the consistency/regularisation losses — i.e.precisely the parts that make the released `net_G_A.pth` what it is.
**Conclusion: no licence. Weights published by decision, with this disclosure.**
---
## E3Diff
*Efficient End-to-End Diffusion Model for One-Step SAR-to-Optical Translation*,Qin, Zou, Li and Zhang, IEEE GRSL, doi:10.1109/LGRS.2024.3506566.
| test | result ||---|---|| upstream | `https://github.com/DeepSARRS/E3Diff` || pinned commit | `38601093ab8f8e4b478144621f20890b100a3b74` || filesystem, maxdepth 3 | **one match, and it is not a grant for E3Diff**: `SoftPool/LICENSE.txt` || tracked files at that commit | **1 of 58** — the same `SoftPool/LICENSE.txt` || GitHub API | repository exists; `"license": null`; `/license` returns **HTTP 404** || README | **no match** — no licence section |
**About the one licence file in the tree.** `SoftPool/LICENSE.txt` is the MITlicence of a **vendored third-party dependency**, `alexandrosstergiou/SoftPool`,`Copyright (c) 2020 Alexandros Stergiou`. It is reproduced here as`LICENSE-SoftPool-MIT.txt` because that dependency's code is genuinely part ofwhat the checkpoint was trained with (E3Diff's CPEN module imports SoftPoolunconditionally). It is **not** a licence for E3Diff, and it must not be readas one.
**Lineage.** E3Diff's README credits SR3(`Janspiry/Image-Super-Resolution-via-Iterative-Refinement`, Apache-2.0),`GaParmar/img2img-turbo` (MIT) and `alexandrosstergiou/SoftPool` (MIT). Thoselicences cover the borrowed parts only, not E3Diff's own two-stage contribution.We do not ship the SR3 or img2img-turbo licence texts here because neither fileis vendored in the tree we trained from; fetch them from those repositories ifyou need them.
**These are our own retrained weights**, never the authors' released checkpoint.
**Conclusion: no licence. Weights published by decision, with this disclosure.**
---
## DDPM (SR3-class)
| test | result ||---|---|| upstream | **the same code base as E3Diff**, `https://github.com/DeepSARRS/E3Diff`, run in its stage-1 configuration (`"stage": 1`) || pinned commit | `38601093ab8f8e4b478144621f20890b100a3b74` || all four tests | **identical results to the E3Diff row above** |
This row reproduces the **SR3 method class** — an eps-prediction conditionalDDPM on the source image — using E3Diff's stage-1 code. It is **not** the SR3authors' implementation and no code from the SR3 release was used. Its licenceposition is therefore exactly E3Diff's: none.
**Conclusion: no licence. Weights published by decision, with this disclosure.**
---
## Conditional Diffusion (CondDiff)
*Conditional Diffusion for SAR to Optical Image Translation*, Bai, Pu and Xu,IEEE GRSL, doi:10.1109/LGRS.2023.3337143.
| test | result ||---|---|| upstream | `https://github.com/Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation` || pinned commit | **not recoverable — see below** || filesystem, maxdepth 3 | **no match** — no LICENSE, LICENCE, COPYING or NOTICE anywhere in the vendored tree || tracked files | **test does not apply**: the vendored copy is not a git clone (no `.git`, no `.gitmodules`, no VERSION file) || GitHub API | repository exists; `"license": null`; `/license` returns **HTTP 404** || README | **no match** — no licence section |
**A second, separate reproducibility gap.** Because the vendored copy carries noversion control and records no upstream URL inside the tree, **the exact upstreamcommit this checkpoint was trained from cannot be recovered.** The repositoryURL above is recorded in our own collection script, not in the vendored code. A"clone upstream, then apply our patch" recipe is therefore not possible for thisrow; the vendored tree itself is the only source of truth.
**Lineage.** CondDiff's README states the repository is based on`openai/guided-diffusion` with modifications, and the vendored tree is visiblythat code base — OpenAI provenance comments survive in`guided_diffusion/logger.py` and `guided_diffusion/unet.py`.`openai/guided-diffusion` is **MIT**. The unmodified guided-diffusion parts carrythat MIT licence; it does not extend to the authors' modifications. We do notship the guided-diffusion MIT text here because it is not vendored in the tree wetrained from — fetch it from that repository if you need it.
**We modified the code further**, and say so as a matter of discipline ratherthan because any licence compels it:
* the distributed-init helper no longer overwrites `CUDA_VISIBLE_DEVICES`;* **the sampler sorts its directory listings.** Upstream paired SAR with EO by *unsorted* `os.listdir` position, i.e. by filesystem order, so any number produced with the unpatched sampler is measured against effectively arbitrary ground truth. This is a correctness fix, not a convenience;* the noise tensor for a partial last batch is shaped from the batch, not from the `--batch_size` flag;* the sampler takes `--test_dir` / `--out_dir` and builds its resize transform at run time, so the 512 px cell is not silently resized to 256.
All four changes are commented in place in the vendored source. Sampling usesrespaced DDPM with 250 steps, which is the authors' own `sample.sh` protocol;the released DDIM path is broken upstream (`ddim_sample_loop` has no `condition`parameter, so passing `--use_ddim True` raises `TypeError`).
**Conclusion: no licence. Weights published by decision, with this disclosure.**
---
## Summary
| method | upstream | licence file | GitHub `license` | verdict ||---|---|---|---|---|| StegoGAN | `sian-wusidi/StegoGAN` | none (0 of 52 tracked) | `null`, `/license` 404 | **no grant** || E3Diff | `DeepSARRS/E3Diff` | only a dependency's (`SoftPool/LICENSE.txt`, MIT) | `null`, `/license` 404 | **no grant** || DDPM (SR3-class) | same repo, stage 1 | as above | `null`, `/license` 404 | **no grant** || CondDiff | `Coordi777/Conditional-Diffusion-…` | none | `null`, `/license` 404 | **no grant** |
Every other upstream that **does** publish a licence file has its text in thissame directory, one file per method. The one remaining method, ControlNet, istrained with `huggingface/diffusers`, whose grant is an Apache-2.0 header in thetrainer source rather than a repository LICENSE file, so there is no file tocopy; that row's weight terms are the Open RAIL++-M text at the repository root.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136# BBDM — QXS-SAROPT
**BBDM: Image-to-Image Translation with Brownian Bridge Diffusion Models**, Li,Xue, Liu and Lai, *CVPR 2023*([arXiv:2205.07680](https://arxiv.org/abs/2205.07680)). Upstream code:[`xuekt98/BBDM`](https://github.com/xuekt98/BBDM) at commit`02c3b13c9f9dfab0853e32123100680a0640c4ed`.
This is the latent Brownian-bridge diffusion model we retrained ourselves onQXS-SAROPT, and it is the checkpoint behind the BBDM row of the ReFlowSETcomparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `last_model.pth` | 2,118,317,140 | the whole trained system — see below |
`last_model.pth` is a pickled dictionary, not a bare state dict. It holds:
* `['model']` — the full `LatentBrownianBridgeModel` state dict: the denoising UNet **and**, embedded inside it, the frozen vq-f4 VQGAN submodule;* `['ema']` — the EMA shadow weights. **Sampling uses these**, not `['model']`; the runner calls `apply_ema()` before generating;* `['step']` and `['epoch']`.
UNet: latent resolution 64×64, `model_channels` 128, `num_res_blocks` 2,attention at resolutions 32/16/8, `channel_mult` (1, 4, 8), 8 heads,64 channels per head, scale-shift normalisation, resblock up/downsampling.
The denoising UNet has `condition_key: nocond` — there is no separateconditioning branch, because in BBDM the SAR image *is* one endpoint of theBrownian bridge and the EO image is the other. The translation is the bridge,not a conditioner.
## Training budget we used
| | ||---|---|| **generator updates released** | **50,000** || batch size / resolution | 32 @ 256 px || iterations per epoch | 500 || epochs | 100 || optimizer | Adam, lr 1e-4, β₁ 0.9, no weight decay; `ReduceLROnPlateau` (factor 0.5, patience 3,000, min lr 5e-7) || EMA | decay 0.995, started at step 30,000, updated every 8 steps || bridge | `mt_type` linear, objective `grad`, L1 loss, T = 1,000, `max_var` 1.0 || sampler (test) | 200 skip-sampled steps, η = 1.0, `clip_denoised` off || latent space | CompVis **vq-f4** VQGAN, frozen (`embed_dim` 3, `n_embed` 8192) || horizontal flip | disabled |
The step cap and the epoch count coincide exactly here.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 76.6 | 0.270 | 0.568 | 0.352 | 15.34 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
There is no smaller entry point than the repository's own runner, because themodel is constructed with a VQGAN whose weights are loaded from a path in theconfig **even though the same weights are already inside `last_model.pth`**.You must have the CompVis latent-diffusion **vq-f4** checkpoint(`model.ckpt`, 756,175,527 bytes) on disk and pointed at by`model.VQGAN.params.ckpt_path`, or construction fails before any of this runs.
```bash# from the BBDM repository root, with a config whose data.dataset_config# points at your SAR / EO directories and whose VQGAN ckpt_path exists:python main.py -c configs/<your>-LBBDM-f4.yaml --gpu_ids 0 \ -r <output dir> --sample_to_eval --resume_model last_model.pth```
`--resume_model` sets `model.model_load_path`; the runner loads it with`torch.load(..., weights_only=False)`, restores the EMA shadow and applies itbefore sampling.
Outputs land in`<output dir>/<dataset_name>/LBBDM-f4/sample_to_eval/`,in three sibling directories: **`200/` holds the generated EO** (the name is the`sample_step` count), `condition/` holds the SAR inputs and `ground_truth/` holdsthe targets. Score `200/`.
## Read before using this checkpoint
* **Sampling must use the EMA weights.** `['model']` and `['ema']` are both in the file and they are different networks. The reported numbers are the EMA.* **You need the external vq-f4 VQGAN.** It is not redistributed here — it is CompVis latent-diffusion material with its own (MIT) licence, and the config requires it at construction time regardless.* **`torch.load` needs `weights_only=False`.** PyTorch ≥ 2.6 flipped that default; these are pickled Lightning-style checkpoints. We made that change in four places in the repository (`model/VQGAN/vqgan.py`, `runners/BaseRunner.py` twice, `runners/.../BBDMRunner.py`) and also removed a `verbose=True` kwarg from `ReduceLROnPlateau` that PyTorch 2.x no longer accepts. All four are compatibility fixes; none changes the maths.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `xuekt98/BBDM` ships a LICENSE file, reproduced verbatim here as`licenses/LICENSE-bbdm.txt`: the **MIT licence**, `Copyright (c) 2023 xuekt98`.
**Redistribution of these weights is permitted.** No non-commercial clause, noshare-alike clause.
One dependency note that is attribution, not restriction: this checkpoint cannotbe run without the CompVis latent-diffusion **vq-f4** VQGAN, which is MIT and is**not** redistributed here.
Attribution: *trained with `xuekt98/BBDM` (MIT, Copyright (c) 2023 xuekt98).Requires the CompVis latent-diffusion vq-f4 VQGAN (MIT,https://github.com/CompVis/latent-diffusion), which is not redistributed here.Full text in `licenses/LICENSE-bbdm.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153# cBBDM — QXS-SAROPT
**Conditional Brownian Bridge Diffusion Model for VHR SAR to Optical ImageTranslation**, Kim and Chung, *IEEE Geoscience and Remote Sensing Letters*, 2025([arXiv:2408.07947](https://arxiv.org/abs/2408.07947); the venue and year aretaken from the authors' own citation block — the repository records no DOI).Upstream code:[`egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical`](https://github.com/egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical)at commit `8ce15934f4d4e3f01efe70d11e2d9b9e0859210c`, a fork of[`xuekt98/BBDM`](https://github.com/xuekt98/BBDM).
This is the conditional Brownian-bridge latent diffusion model we retrainedourselves on QXS-SAROPT, and it is the checkpoint behind the cBBDM row of theReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `last_model.pth` | 2,118,345,622 | the whole trained system — see below |
`last_model.pth` is a pickled dictionary, not a bare state dict. It holds:
* `['model']` — the full `LatentBrownianBridgeModel` state dict: the denoising UNet **and**, embedded inside it, the frozen vq-f4 VQGAN submodule;* `['ema']` — the EMA shadow weights. **Sampling uses these**, not `['model']`; the runner calls `apply_ema()` before generating;* `['step']` and `['epoch']`.
UNet: latent resolution 64×64, `model_channels` 128, `num_res_blocks` 2,attention at resolutions 32/16/8, `channel_mult` (1, 4, 8), 8 heads,64 channels per head, scale-shift normalisation, resblock up/downsampling.
The denoising UNet differs from plain BBDM in exactly two ways, and they arethe method: **`in_channels` is 6, not 3**, and **`condition_key` is`SpatialRescaler`** — a small trained module that rescales the SAR latent andconcatenates it to the bridge state at every step, so the SAR conditioning isexplicit rather than implicit in the bridge endpoints. The SpatialRescaler istrained (it is in the model's parameter list) and is inside this file.
## Training budget we used
| | ||---|---|| **generator updates released** | **50,000** || batch size / resolution | 32 @ 256 px || iterations per epoch | 500 || epochs | 100 || optimizer | Adam, lr 1e-4, β₁ 0.9, no weight decay; `ReduceLROnPlateau` (factor 0.5, patience 3,000, min lr 5e-7) || EMA | decay 0.995, started at step 30,000, updated every 8 steps || bridge | `mt_type` linear, objective `grad`, L1 loss, T = 1,000, `max_var` 1.0 || sampler (test) | 200 skip-sampled steps, η = 1.0, `clip_denoised` off || latent space | CompVis **vq-f4** VQGAN, frozen (`embed_dim` 3, `n_embed` 8192) || horizontal flip | disabled |
The step cap and the epoch count coincide exactly here.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 50.6 | 0.246 | 0.539 | 0.372 | 16.02 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
There is no smaller entry point than the repository's own runner, because themodel is constructed with a VQGAN whose weights are loaded from a path in theconfig **even though the same weights are already inside `last_model.pth`**.You must have the CompVis latent-diffusion **vq-f4** checkpoint(`model.ckpt`, 756,175,527 bytes) on disk and pointed at by`model.VQGAN.params.ckpt_path`, or construction fails before any of this runs.
```bash# from the cBBDM repository root, with a config whose data.dataset_config# points at your SAR / EO directories and whose VQGAN ckpt_path exists:python main.py -c configs/<your>-cBBDM-f4.yaml --gpu_ids 0 \ -r <output dir> --sample_to_eval --resume_model last_model.pth```
`--resume_model` sets `model.model_load_path`; the runner loads it with`torch.load(..., weights_only=False)`, restores the EMA shadow and applies itbefore sampling.
Outputs land in`<output dir>/<dataset_name>/cBBDM-f4/sample_to_eval/`,in three sibling directories: **`200/` holds the generated EO** (the name is the`sample_step` count), `condition/` holds the SAR inputs and `ground_truth/` holdsthe targets. Score `200/`.
## Read before using this checkpoint
* **Sampling must use the EMA weights.** `['model']` and `['ema']` are both in the file and they are different networks. The reported numbers are the EMA.* **You need the external vq-f4 VQGAN.** It is not redistributed here — it is CompVis latent-diffusion material with its own (MIT) licence, and the config requires it at construction time regardless.* **`torch.load` needs `weights_only=False`.** PyTorch ≥ 2.6 flipped that default; these are pickled Lightning-style checkpoints. We made that change in four places in the repository (`model/VQGAN/vqgan.py`, `runners/BaseRunner.py` twice, `runners/.../BBDMRunner.py`) and also removed a `verbose=True` kwarg from `ReduceLROnPlateau` that PyTorch 2.x no longer accepts. All four are compatibility fixes; none changes the maths.* **A performance patch we applied, and when.** This fork regressed the DataLoader worker count from upstream BBDM's 8 to 0, which dominated wall-clock time (one 32-pair batch: 6.5 s serial versus 1.1 s across 8 threads). We restored `num_workers=8`. **Both cells published here were trained *before* that change, i.e. with 0 workers** — same data, same order, same step count, only slower. The numbers on this page are unaffected either way: worker count cannot change which samples the model sees.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical` ships a LICENSE file,reproduced verbatim here as `licenses/LICENSE-cbbdm.txt`: the **MIT licence**,`Copyright (c) 2025 egshkim`. Its README adds: *"The original source code islicensed under the MIT License, and this repository continues to comply with itsterms"* — the original being `xuekt98/BBDM`, also MIT(`licenses/LICENSE-bbdm.txt`).
**Redistribution of these weights is permitted.** No non-commercial clause, noshare-alike clause.
One dependency note that is attribution, not restriction: this checkpoint cannotbe run without the CompVis latent-diffusion **vq-f4** VQGAN, which is MIT and is**not** redistributed here.
Attribution: *trained with `egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical`(MIT, Copyright (c) 2025 egshkim), a fork of `xuekt98/BBDM` (MIT, Copyright (c)2023 xuekt98). Requires the CompVis vq-f4 VQGAN (MIT,https://github.com/CompVis/latent-diffusion), not redistributed here. Full textsin `licenses/LICENSE-cbbdm.txt` and `licenses/LICENSE-bbdm.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164# C-DiffSET — QXS-SAROPT
**C-DiffSET: Leveraging Latent Diffusion for SAR-to-EO Image Translation withConfidence-Guided Reliable Object Generation**, Do, Lee, Lee and Kim,*IEEE Transactions on Circuits and Systems for Video Technology*, 2026([doi:10.1109/TCSVT.2026.3701447](https://doi.org/10.1109/TCSVT.2026.3701447),[arXiv:2411.10788](https://arxiv.org/abs/2411.10788)). Upstream code:[`KAIST-VICLab/C-DiffSET`](https://github.com/KAIST-VICLab/C-DiffSET).
This is the **stage-2 (confidence-guided) UNet** we retrained ourselves onQXS-SAROPT, and it is the checkpoint behind the C-DiffSET row of the ReFlowSETcomparison table.
## What is in this folder
A single `UNet2DConditionModel` (865,925,125 parameters, fp32, 686 tensors) withtwo channel modifications relative to stock SD 2.1-base:
* **`conv_in` 4 -> 8 channels.** The UNet is conditioned by channel concatenation in latent space, **SAR first**: `torch.cat([sar_latent, noisy_eo_latent], dim=1)`. The extra half was initialised by duplicating the pretrained kernel and halving it; in this trained checkpoint the two halves have clearly diverged (mean |w| 0.01424 on channels 0-3 vs 0.02810 on channels 4-7).* **`conv_out` 4 -> 5 channels.** Channels 0-3 are the usual epsilon prediction; channel 4 is a **raw spatial variance** used by the confidence-guided loss. It was zero-initialised and is no longer zero (mean |w| 0.02922), i.e. the head really trained. To turn it into a variance: `var = clamp(softplus(raw + c) + 1e-6, 1e-6, 10)` where the offset `c = log(exp(1 - 1e-6) - 1)` is the inverse softplus of the initial variance, and confidence is `1 / var`. **The scheduler must only ever see channels 0-3.**
There is no VAE, no text encoder and no scheduler here — take those from thebase model (below).
## Training budget we used
| | ||---|---|| optimizer updates released | **40,000** (fixed-step snapshot `checkpoint-40000`) || updates the run was configured for | 50,000 || initialised from | our own stage-1 checkpoint (the `sd21ft` folder's run, at its final 50,000-update state) || batch size / resolution | 64 @ 256 px || epochs the 40,000 updates work out to | ~160 (16,001 training pairs, 250 updates/epoch) || optimizer | AdamW, lr 3e-5, weight decay 0.01, cosine schedule, 100-step warmup || precision | fp32 (no mixed precision) || seed | 2024 || prediction type | epsilon, with the confidence-guided (Gaussian-NLL) loss || prompt | the fixed string `"electro-optical image"` || augmentation | horizontal flip, vertical flip, 90-degree rotation || test-time sampler | **DDIM, 50 steps**, fp32, one image at a time |
The budget is quoted in **optimizer updates**, not epochs, because the twodatasets have very different training-set sizes. Two things a readerreproducing this needs to know: the released snapshot is taken at update 40,000of a cosine schedule that was laid out for 50,000, so the learning rate had**not** finished decaying at that point; and we publish the fixed-step snapshotrather than the repository's validation-selected `best/`, because every othermethod in our comparison publishes its last checkpoint and selecting onvalidation PSNR would have been an asymmetry in C-DiffSET's favour.
Data: 256 px, no crop and no resize (the chips are already 256 px). SAR chips come from the `sar_256_oc_0.2` directory of QXS-SAROPT; the EO target is the same stem under `opt_256_oc_0.2`.
## Base model
This checkpoint is a derivative of **Stable Diffusion 2.1-base**. Because theoriginal `stabilityai/stable-diffusion-2-1-base` repository is no longeravailable on the Hub, our training and every snippet below load the communitymirror [`Manojb/stable-diffusion-2-1-base`](https://huggingface.co/Manojb/stable-diffusion-2-1-base).That is what we actually trained against — verified in the trainingconfiguration files, the launch scripts and the training logs, none of whichever reference `stabilityai/...`. The frozen VAE, CLIP text encoder, tokenizerand scheduler all come from that repo. A different SD 2.1-base mirror isexpected to work but has not been verified by us.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | KID↓ | DISTS↓ | LPIPS↓ | PSNR↑ | SSIM↑ ||---|---|---|---|---|---|| 19.9 | 0.0055 | 0.233 | 0.526 | 16.92 | 0.380 |
These are our own re-evaluation numbers, not numbers copied from any paper.LPIPS is **LPIPS-VGG on inputs mapped to [-1, 1]** (the `normalize=False`convention); the alternative [0, 1] convention gives a systematically differentnumber and the two must never be mixed. PSNR/SSIM are per-image torchmetricswith `data_range=1`; FID is `pytorch-fid` against the size-matched ground truth.
## Load it and translate one SAR PNG
```pythonimport numpy as npimport torchfrom PIL import Imagefrom diffusers import UNet2DConditionModel, AutoencoderKL, DDIMSchedulerfrom transformers import CLIPTextModel, CLIPTokenizer
REPO = "JeonghyeokDo/ReFlowSET" # comparison cells live under baselines/BASE = "Manojb/stable-diffusion-2-1-base" # frozen VAE / text encoder / schedulerDEV, DT = "cuda", torch.float32
unet = UNet2DConditionModel.from_pretrained( REPO, subfolder="baselines/qxs-saropt/cdiffset", torch_dtype=DT).to(DEV).eval()vae = AutoencoderKL.from_pretrained(BASE, subfolder="vae", torch_dtype=DT).to(DEV).eval()tok = CLIPTokenizer.from_pretrained(BASE, subfolder="tokenizer")txt = CLIPTextModel.from_pretrained(BASE, subfolder="text_encoder", torch_dtype=DT).to(DEV).eval()sch = DDIMScheduler.from_pretrained(BASE, subfolder="scheduler")sch.set_timesteps(50, device=DEV)
# The fixed training prompt, tokenized exactly as in training (no padding).ids = tok("electro-optical image", padding="do_not_pad", max_length=tok.model_max_length, truncation=True, return_tensors="pt").input_ids.to(DEV)with torch.no_grad(): embed = txt(ids)[0]
# SAR input: 256x256 PNG -> RGB -> [-1, 1]. Do not resize; crop if needed.sar = Image.open("sar.png").convert("RGB")x = torch.from_numpy(np.array(sar)).permute(2, 0, 1)[None]x = (x.to(DEV, DT) / 255.0) * 2 - 1
with torch.no_grad(): sar_lat = vae.encode(x).latent_dist.mean * vae.config.scaling_factor # .mean, not .sample() eo_lat = torch.randn_like(sar_lat) for t in sch.timesteps: out = unet(torch.cat([sar_lat, eo_lat], 1), # SAR first, then the noisy EO latent t, encoder_hidden_states=embed).sample # channels 0-3 are epsilon; channel 4 is the raw variance and never # goes to the scheduler. eo_lat = sch.step(out[:, :4], t, eo_lat).prev_sample eo = vae.decode(eo_lat / vae.config.scaling_factor).sample eo = (eo * 0.5 + 0.5).clamp(0, 1)[0].cpu()
Image.fromarray((eo.permute(1, 2, 0).numpy() * 255).round().astype(np.uint8)).save("eo.png")```
The three things that silently produce a plausible-but-wrong image if you getthem backwards: the concatenation order is **SAR first**, only `out[:, :4]`reaches the scheduler, and the VAE must be read as `latent_dist.mean`, not`.sample()`.
## Licence status — stated factually
* **Training code:** MIT, `Copyright (c) 2026 KAIST VICLab` ([`KAIST-VICLab/C-DiffSET`](https://github.com/KAIST-VICLab/C-DiffSET) ships a LICENSE file).* **These weights:** they are a fine-tune of Stable Diffusion 2.1-base and are therefore a *Derivative of the Model* under the **CreativeML Open RAIL++-M** licence. The base repository we loaded declares `openrail++`. The **Attachment A use restrictions travel with these weights** — they bind you, and you must pass them on to anyone you redistribute to. The full text, including Attachment A, ships in this repository as `LICENSE-WEIGHTS.md`.
Attribution: *fine-tuned from Stable Diffusion 2.1-base (obtained as`Manojb/stable-diffusion-2-1-base`, a re-upload of`stabilityai/stable-diffusion-2-1-base`) with the training code of`KAIST-VICLab/C-DiffSET`. Do, Lee, Lee and Kim, "C-DiffSET", IEEE TCSVT 2026,doi:10.1109/TCSVT.2026.3701447.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint retrained by us on QXS-SAROPT; it is not ReFlowSET itself. Everycomparison method in the release was retrained by us on the same splits at thesame resolution, so the rows are directly comparable to each other.123456789101112131415161718192021222324252627282930313233343536373839404142434445{ "_class_name": "UNet2DConditionModel", "_diffusers_version": "0.10.0.dev0", "act_fn": "silu", "attention_head_dim": [ 5, 10, 20, 20 ], "block_out_channels": [ 320, 640, 1280, 1280 ], "center_input_sample": false, "cross_attention_dim": 1024, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "dual_cross_attention": false, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 8, "layers_per_block": 2, "mid_block_scale_factor": 1, "norm_eps": 1e-05, "norm_num_groups": 32, "num_class_embeds": null, "only_cross_attention": false, "out_channels": 5, "sample_size": 64, "up_block_types": [ "UpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D" ], "use_linear_projection": true}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173# Conditional Diffusion — QXS-SAROPT
**Conditional Diffusion for SAR to Optical Image Translation**, Bai, Pu and Xu,*IEEE Geoscience and Remote Sensing Letters*, 2023([doi:10.1109/LGRS.2023.3337143](https://doi.org/10.1109/LGRS.2023.3337143); theyear is the one in the authors' own citation block — a table that labels thisrow with a later issue year is referring to the same paper).
Upstream code:[`Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation`](https://github.com/Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation),a modified copy of [`openai/guided-diffusion`](https://github.com/openai/guided-diffusion).**The exact upstream commit is not recoverable** — see the licence section.
This is the pixel-space conditional diffusion model we retrained ourselves onQXS-SAROPT, and it is the checkpoint behind the Conditional Diffusion row of theReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `ema_final.pt` | 657,495,287 | EMA (decay 0.9999) of the UNet at update 50,000 — a **bare state dict**, no wrapper key |
`ema_final.pt` is the EMA of a **164.3 M-parameter guided-diffusion UNet**:`num_channels` 128, `num_res_blocks` 3, `learn_sigma` **False**, attention atresolutions 16 and 8. It is a plain `state_dict` — load it directly, with no`['model']` or `['ema']` indirection.
The QXS-SAROPT and SAR2Opt files differ in size (657,495,287 vs 662,459,343bytes) purely because of the 256 px versus 512 px positional and attentionbuffers; the parameter count is otherwise the same.
**Conditioning.** The SAR image is concatenated to the noisy state **noise-free**at every reverse step and at training time — that is the paper's claim, and thecode does exactly that.
## Training budget we used
| | ||---|---|| **generator updates released** | **50,000** || batch size / resolution | 24 @ 256 px || optimizer | Adam, **constant** lr 1e-4 with `--lr_anneal_steps 50000` (linear decay to zero, which is also the only stop mechanism in the released code) || EMA | decay 0.9999 || diffusion | T = 2,000, linear β schedule, eps-prediction, `learn_sigma` False || sampler (test) | **respaced DDPM, 250 steps**, `clip_denoised` on || augmentation | none — the released code has none || input | the chips are natively 256 px, used as they are |
**The paper and the released code disagree about the learning-rate schedule.**The paper describes warmup plus cosine; the released code implements neither. Weran the code.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 88.6 | 0.355 | 0.730 | 0.213 | 11.55 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
```pythonimport torchfrom guided_diffusion.script_util import (create_model_and_diffusion, model_and_diffusion_defaults)
d = model_and_diffusion_defaults()d.update(image_size=256, num_channels=128, num_res_blocks=3, learn_sigma=False, diffusion_steps=2000, noise_schedule='linear', timestep_respacing='250')model, diffusion = create_model_and_diffusion(**d)model.load_state_dict(torch.load('ema_final.pt', map_location='cpu'))model.cuda().eval()
# sar: (1, 3, 256, 256) float tensor in [-1, 1]sample = diffusion.p_sample_loop(model, (1, 3, 256, 256), clip_denoised=True, model_kwargs={}, noise=None, condition=sar)```
The repository imports `blobfile` and `mpi4py` unconditionally; a single-processrun on a local filesystem needs either those packages or small local stand-ins on`PYTHONPATH`.
**Never pass `use_ddim=True`.** See below.
## Read before using this checkpoint
* **DDIM is broken upstream, and that is not a choice we made.** `p_sample_loop(..., condition=None, ...)` accepts and threads the SAR condition; `ddim_sample_loop(...)` has **no `condition` parameter at all**, so passing `--use_ddim True` raises `TypeError`. Sampling is respaced DDPM with 250 steps, which is also what the authors' own `sample.sh` uses.* **A correctness bug in the released sampler, which we fixed.** Upstream paired each SAR image with an EO image by **unsorted `os.listdir` position** — i.e. by filesystem order. Any number produced with the unpatched sampler is measured against effectively arbitrary ground truth. We sort both listings. If you reproduce this row from a clean upstream checkout, apply that fix or your metrics are meaningless.* **Three further changes we made**, all commented in place: the distributed-init helper no longer overwrites `CUDA_VISIBLE_DEVICES` (upstream pins rank % 8, which on a shared machine hijacks another user's device); the noise tensor for a partial last batch is shaped from the batch rather than from the `--batch_size` flag; and the sampler takes explicit input/output directories and builds its resize transform at run time, because the module-level transform hard-codes 256 px and would silently downsize the 512 px cell.* **The training loader requires integer filenames.** It sorts with `int(stem)`, so any non-numeric stem raises `ValueError`. Feed it an integer-named adapter directory and keep a manifest to map back to the real stems.* **Do not let the released 512 px path resize.** The fork's `center_crop_arr` *resizes* 600 → 512. We wrote deterministic centre-512 crops instead, to keep a crop-not-resize protocol across the whole benchmark.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually ⚠ no upstream licence exists
**The upstream code base publishes no licence.**[`Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation`](https://github.com/Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation)has no LICENSE, LICENCE, COPYING or NOTICE file anywhere in the tree we trainedfrom, no licence section in its README, and the GitHub API reports no declaredlicence, with the `/license` endpoint returning 404. Checked 2026-08-28.
Under default copyright that means **all rights are reserved by the authors andno express permission to redistribute derived work has been granted** to us orto you. We publish this checkpoint anyway and state the position plainly. Assessredistribution for yourself; consider asking the authors.
**A second gap, which is about reproducibility rather than licensing.** Ourvendored copy of this repository carries no version control and records noupstream URL inside its tree, so **the exact commit these weights were trainedfrom cannot be recovered**. A "clone upstream, then apply our patch" recipe istherefore not possible for this row.
**Lineage.** The README states the repository is based on`openai/guided-diffusion` with modifications, and the tree is visibly that codebase — OpenAI provenance comments survive in `guided_diffusion/logger.py` and`guided_diffusion/unet.py`. `openai/guided-diffusion` is **MIT**; the unmodifiedguided-diffusion parts carry that licence, which does **not** extend to theauthors' modifications. We do not ship the guided-diffusion licence text herebecause it is not vendored in the tree we trained from — take it from thatrepository if you need it, and make sure the copyright line you carry isOpenAI's rather than another project's MIT file.
**We modified the code further**, and say so as a matter of discipline ratherthan because any licence compels it: the four changes listed in the sectionabove, of which the sorted-listing fix is a correctness fix.
Please cite: Bai, Pu and Xu, *Conditional Diffusion for SAR to Optical ImageTranslation*, IEEE Geoscience and Remote Sensing Letters,[doi:10.1109/LGRS.2023.3337143](https://doi.org/10.1109/LGRS.2023.3337143).The full record of what we checked, per method, is in`licenses/NO-UPSTREAM-LICENSE.md` at the root of this repository.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127# ControlNet — QXS-SAROPT
**Adding Conditional Control to Text-to-Image Diffusion Models**, Zhang, Rao andAgrawala, *ICCV* 2023. The SAR image is the control signal and the baseStable Diffusion 2.1-base UNet stays frozen.
> **How our row was produced, precisely.** We trained with the> `examples/controlnet/train_controlnet.py` script from> [`huggingface/diffusers`](https://github.com/huggingface/diffusers)> (Apache-2.0, Copyright 2025 The HuggingFace Inc. team), initialising the> adapter with `ControlNetModel.from_unet` on SD 2.1-base. **No code from> `lllyasviel/ControlNet` was used.** The method is theirs; the implementation> is the diffusers one.
## What is in this folder
A complete diffusers `ControlNetModel` folder — `config.json` plus`diffusion_pytorch_model.safetensors` (364,228,240 parameters, fp32, 340tensors). It is the encoder half of the UNet plus the zero-convolutions and theconditioning embedder; it has no `up_blocks` and no `conv_out`, so **it cannotgenerate anything on its own** and must be paired with the base pipeline.
The conditioning input is 3-channel RGB (`conditioning_channels: 3`) withembedder widths `[16, 32, 96, 256]`; the SAR PNG is opened as RGB, so the threechannels are identical.
## Training budget we used
| | ||---|---|| optimizer updates | **50,000** || batch size / resolution | 32 @ 256 px || epochs the 50,000 updates work out to | ~100 (16,001 training pairs, 500 updates/epoch) || optimizer | AdamW, lr 1e-5, **constant** schedule (the script's default) || precision | bf16 mixed precision — the saved tensors are the fp32 master weights || seed | 42 || trainable parameters | the adapter only; the SD 2.1-base UNet, VAE and text encoder stayed frozen || prompt | the fixed string `"electro-optical image"` for every pair || augmentation | **none** — the diffusers trainer applies only `Resize(res)` + `CenterCrop(res)`, both no-ops at our input size, and no flips or rotations || test-time sampler | **UniPCMultistepScheduler, 50 steps, guidance scale 7.5**, bf16 |
Unlike the two UNet folders in this repository, this is **not** an SD 2.1fine-tune: the base weights were never updated, which is why only the 364 Madapter ships.
Reproduction note: our inference script creates **one** `torch.Generator`seeded 42 and reuses it across the whole test set in batches of 32,so a single image regenerated on its own will not be bit-identical to our dumpeven at the same seed. The conditioning image isthe SAR PNG opened as RGB and bilinearly resized to 256x256 (a no-op at ourevaluation resolution, since the SAR inputs are already 256 px).
Data: 256 px chips, used as-is (no crop, no resize). SAR chips come from the `sar_256_oc_0.2` directory of QXS-SAROPT; the EO target is the same stem under `opt_256_oc_0.2`.
## Base model
This checkpoint is a derivative of **Stable Diffusion 2.1-base**. Because theoriginal `stabilityai/stable-diffusion-2-1-base` repository is no longeravailable on the Hub, our training and every snippet below load the communitymirror [`Manojb/stable-diffusion-2-1-base`](https://huggingface.co/Manojb/stable-diffusion-2-1-base).That is what we actually trained against — verified in the trainingconfiguration files, the launch scripts and the training logs, none of whichever reference `stabilityai/...`. The frozen VAE, CLIP text encoder, tokenizerand scheduler all come from that repo. A different SD 2.1-base mirror isexpected to work but has not been verified by us.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | KID↓ | DISTS↓ | LPIPS↓ | PSNR↑ | SSIM↑ ||---|---|---|---|---|---|| 50.4 | 0.0211 | 0.307 | 0.604 | 13.42 | 0.297 |
These are our own re-evaluation numbers, not numbers copied from any paper.LPIPS is **LPIPS-VGG on inputs mapped to [-1, 1]** (the `normalize=False`convention); the alternative [0, 1] convention gives a systematically differentnumber and the two must never be mixed. PSNR/SSIM are per-image torchmetricswith `data_range=1`; FID is `pytorch-fid` against the size-matched ground truth.
## Load it and translate one SAR PNG
```pythonimport torchfrom PIL import Imagefrom diffusers import (ControlNetModel, StableDiffusionControlNetPipeline, UniPCMultistepScheduler)
REPO = "JeonghyeokDo/ReFlowSET" # comparison cells live under baselines/BASE = "Manojb/stable-diffusion-2-1-base"
controlnet = ControlNetModel.from_pretrained( REPO, subfolder="baselines/qxs-saropt/controlnet", torch_dtype=torch.bfloat16)pipe = StableDiffusionControlNetPipeline.from_pretrained( BASE, controlnet=controlnet, torch_dtype=torch.bfloat16, safety_checker=None).to("cuda")pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
sar = Image.open("sar.png").convert("RGB").resize((256, 256), Image.BILINEAR)eo = pipe("electro-optical image", image=sar, height=256, width=256, num_inference_steps=50, guidance_scale=7.5, generator=torch.Generator("cuda").manual_seed(42)).images[0]eo.save("eo.png")```
## Licence status — stated factually
* **Training code:** Apache-2.0. The trainer is `examples/controlnet/train_controlnet.py` from [`huggingface/diffusers`](https://github.com/huggingface/diffusers), `Copyright 2025 The HuggingFace Inc. team`; the Apache-2.0 grant is in the file header. Our copy of that script is four loose files rather than a full clone, so it carries no separate repository LICENSE file — the header is the grant.* **Method credit:** ControlNet (Zhang et al., ICCV 2023), [`lllyasviel/ControlNet`](https://github.com/lllyasviel/ControlNet), Apache-2.0. **No code from that repository was used in this row.*** **These weights:** initialised from Stable Diffusion 2.1-base via `ControlNetModel.from_unet`, so they are an SD 2.1 derivative under the **CreativeML Open RAIL++-M** licence (`openrail++`). The **Attachment A use restrictions travel with these weights**. Full text, including Attachment A, ships in this repository as `LICENSE-WEIGHTS.md`.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint retrained by us on QXS-SAROPT; it is not ReFlowSET itself. Everycomparison method in the release was retrained by us on the same splits at thesame resolution, so the rows are directly comparable to each other.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556{ "_class_name": "ControlNetModel", "_diffusers_version": "0.37.1", "act_fn": "silu", "addition_embed_type": null, "addition_embed_type_num_heads": 64, "addition_time_embed_dim": null, "attention_head_dim": [ 5, 10, 20, 20 ], "block_out_channels": [ 320, 640, 1280, 1280 ], "class_embed_type": null, "conditioning_channels": 3, "conditioning_embedding_out_channels": [ 16, 32, 96, 256 ], "controlnet_conditioning_channel_order": "rgb", "cross_attention_dim": 1024, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "encoder_hid_dim": null, "encoder_hid_dim_type": null, "flip_sin_to_cos": true, "freq_shift": 0, "global_pool_conditions": false, "in_channels": 4, "layers_per_block": 2, "mid_block_scale_factor": 1, "mid_block_type": "UNetMidBlock2DCrossAttn", "norm_eps": 1e-05, "norm_num_groups": 32, "num_attention_heads": null, "num_class_embeds": null, "only_cross_attention": false, "projection_class_embeddings_input_dim": null, "resnet_time_scale_shift": "default", "transformer_layers_per_block": 1, "upcast_attention": false, "use_linear_projection": true}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169# CycleGAN — QXS-SAROPT
**Unpaired Image-to-Image Translation using Cycle-Consistent AdversarialNetworks**, Zhu, Park, Isola and Efros, *ICCV 2017*([arXiv:1703.10593](https://arxiv.org/abs/1703.10593)). Upstream code:[`junyanz/pytorch-CycleGAN-and-pix2pix`](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix)at commit `2a7afba2895d52556dd5dfe07e8555ef657ced6f`.
This is the unpaired cycle-consistent GAN we retrained ourselves on QXS-SAROPT,and it is the checkpoint behind the CycleGAN row of the ReFlowSET comparisontable. **It fails our input-copy audit — see the section below before you useor quote it.**
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G_A.pth` | 45,533,133 | **SAR → EO** — this is the translation direction the table reports || `net_G_B.pth` | 45,533,133 | EO → SAR, the reverse generator that closes the cycle; not used to produce any reported number |
Both are **`resnet_9blocks` generators** with instance normalisation,`ngf = 64`, 3 in / 3 out, dropout disabled. The direction assignment is not aconvention we chose: upstream's unaligned loader binds `A_paths` to the`trainA` / `testA` directory, which holds the SAR side, and the model computes`fake_B = netG_A(real_A)`. So **`net_G_A` is the SAR → EO generator**.
`net_G_B` is shipped because it is half of the trained system and someonereproducing the cycle needs it; it is not needed to reproduce our numbers. Thetwo discriminators are not released.
## Training budget we used
| | ||---|---|| **generator updates released** | **100,050** || batch size | 8 || epochs (constant LR + linear decay) | 25 + 25 || iterations per epoch | 2,001 (16,001 training images, the loader does not drop the last batch) || optimizer | Adam, lr 2e-4, β₁ 0.5, linear decay to 0 over the second half || adversarial loss | LSGAN; discriminator `basic` (70×70 PatchGAN) || cycle losses | λ_A 10, λ_B 10 || identity loss | λ_identity 0.5 || augmentation | horizontal flip || input | 256 px, no resize |
Budgets are quoted in **optimizer updates**, never epochs. This is the singlemost important comparability rule for the unpaired methods in this benchmark:"100 + 100 epochs" is 72,600 updates on 1,450 images and 400,000+ on16,001, a difference that reads as budget-matched and is not.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 104.4 | 0.376 | 0.653 | 0.262 | 12.92 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
Clone `junyanz/pytorch-CycleGAN-and-pix2pix` at the commit above and run thisfrom its root. The model code is stock — we applied no patch to it.
```pythonimport numpy as np, torchfrom PIL import Imagefrom models.networks import define_G # from the junyanz repo
G_A = define_G(3, 3, 64, 'resnet_9blocks', 'instance', use_dropout=False, init_type='normal', init_gain=0.02, gpu_ids=[])sd = torch.load('net_G_A.pth', map_location='cpu')if hasattr(sd, '_metadata'): del sd._metadataG_A.load_state_dict(sd)G_A.eval()
sar = Image.open('sar.png').convert('RGB')x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): y = G_A(x) # this is fake_B
eo = ((y[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
Upstream also supports a SAR-only run without this snippet:`test.py --model test --dataset_mode single --no_dropout --model_suffix _A`,which loads `latest_net_G_A.pth` directly.
## ⚠ This cell fails the input-copy audit
We audit every cell for **identity collapse**: a model that has learned to passits input through rather than translate it. The test compares the mean absolutedistance from the generated image to the SAR **input** against the distance tothe EO **target**; a ratio below 1.0 means the output is closer to the input itwas given than to the answer it was asked for.
| quantity | value ||---|---|| mean \|generated − ground truth\| | 47.548 || mean \|generated − SAR input\| | 40.274 || **ratio** (SAR distance ÷ GT distance) | **0.847** — below 1.0 || verdict | **COLLAPSED** || cross-pair separation | 0.955 (cohort median 1.160) — no oracle behaviour |
**Read the metrics on this page with that in mind.** They are reported unchangedbecause they are what the released implementation does at its own publishedprotocol, and a benchmark that quietly substitutes a better-behaved variant isnot reporting the method. But they should not be read as translation quality.The separation figure is the companion check for the *opposite* failure: it isthe mean distance from a generated image to **other** images' ground truthdivided by the distance to its **own**, so a value well above the cohort medianwould indicate that ground-truth information had leaked into the generation.This cell sits at or below the median, so there is no leak — the problem here isinput-copying, and only input-copying.
On this dataset the collapse is at least partly a budget effect: a diagnostic control run of the same code at **400,000** updates (4× this one) does **not** collapse (ratio 1.127). That control is not published here and is not the table's CycleGAN row, which is the method at its own protocol's budget.
## Read before using this checkpoint
* **`net_G_A` is SAR → EO.** Loading `net_G_B` and expecting an EO image gives you the reverse mapping and a confusing result.* Build the network with `gpu_ids=[]` — the checkpoints have bare keys and a non-empty `gpu_ids` introduces a `module.` prefix the load will reject.* Normalisation is `[-1, 1]`.* CycleGAN is **unpaired**: it never saw a SAR/EO correspondence during training, only the two marginal distributions.
## Licence — stated factually
Same upstream, same LICENSE file as pix2pix; reproduced verbatim here as`licenses/LICENSE-cyclegan.txt` (byte-identical to `licenses/LICENSE-pix2pix.txt`— one file covers both methods upstream). It is three stacked notices:
* CycleGAN — `Copyright (c) 2017, Jun-Yan Zhu and Taesung Park` (BSD-2-Clause in form);* pix2pix — `Copyright (c) 2016, Phillip Isola and Jun-Yan Zhu`;* DCGAN — `Copyright (c) 2015, Facebook, Inc.` (BSD-3-Clause, with a no-endorsement clause).
**Redistribution of these weights is permitted** with the notice reproduced. Nonon-commercial and no share-alike clause. Do not use Facebook's name to promotethis release.
Attribution: *trained with `junyanz/pytorch-CycleGAN-and-pix2pix`. Copyright (c)2017, Jun-Yan Zhu and Taesung Park (CycleGAN); Copyright (c) 2016, Phillip Isolaand Jun-Yan Zhu (pix2pix); Copyright (c) 2015, Facebook, Inc. (DCGAN). All rightsreserved. Redistributed under the BSD terms reproduced in`licenses/LICENSE-cyclegan.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174# DDPM (SR3-class) — QXS-SAROPT
The **SR3 method class** — an eps-prediction conditional DDPM that conditions onthe source image — as introduced in *Image Super-Resolution via IterativeRefinement*, Saharia, Ho, Chan, Salimans, Fleet and Norouzi,*IEEE TPAMI 2022* ([arXiv:2104.07636](https://arxiv.org/abs/2104.07636)).
**Read this before citing the row: the code is not the SR3 authors'.** No codefrom any SR3 release was used. This cell is[`DeepSARRS/E3Diff`](https://github.com/DeepSARRS/E3Diff) at commit`38601093ab8f8e4b478144621f20890b100a3b74`, run in its **stage-1**configuration (`"stage": 1`), which is an SR3-class conditional DDPM. Weretrained it ourselves on QXS-SAROPT and it is the checkpoint behind the DDPMrow of the ReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `gen.pth` | 768,426,944 | the `sr3` UNet at iteration 250,000 — the whole model |
`gen.pth` is E3Diff's **`sr3` UNet**: `inner_channel` 64,`channel_multiplier` [1, 2, 4, 8, 16], `res_blocks` 1, `norm_groups` 16, **noattention** (`attn_res` is empty), 3 input channels, 3 output channels and a3-channel condition.
The condition is **not the raw SAR image alone**. It is a three-channel stack`[PPB, Canny, SAR]`:
* channel 0 — the SAR image after **FAST_PPB** speckle filtering (Deledalle 2009, P = 3, W = 10, h = 0.5), a GPU port of E3Diff's own `FAST_PPB.m`;* channel 1 — `cv2.Canny(ppb_uint8, 50, 150, L2gradient=True)` on that filtered image;* channel 2 — the raw SAR image.
**This row cannot be run from a SAR PNG alone**: the PPB and Canny images mustbe computed first.
## Training budget we used
| | ||---|---|| **generator updates released** | **250,000** || batch size / resolution | 16 @ 256 px || optimizer | Adam, lr 5e-5, constant (`MultiStepLR` with no milestones) || EMA | decay 0.9999, started at step 5,000, updated every step || diffusion (train) | T = 1,000, linear β from 1e-6 to 1e-2 || sampler (test) | **DDIM, 50 steps** || loss | plain eps-prediction MSE — the stage-2 auxiliary losses are all zero here (`lpips_w` 0, `fft_w` 0, `lambda_gan` 0) || augmentation | flips, 90° rotations, and a random brightness jitter applied to the SAR/PPB pair only (upstream's own `transform_augment`) |
Both datasets get the same 250,000 updates; the batch differs so that thepixels-per-update budget matches (16 × 256² = 4 × 512²).
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 43.8 | 0.311 | 0.620 | 0.359 | 14.04 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
This model cannot be driven from a bare SAR file: it needs the PPB and Cannycondition channels, and the E3Diff loader looks them up by filename. Build thecondition first, then run the repository's own entry point.
```python# 1. Build the condition channels for each SAR image, once.import cv2, numpy as np# ppb = FAST_PPB(sar, P=3, W=10, h=0.5) # Deledalle 2009; E3Diff ships FAST_PPB.m# canny = cv2.Canny(ppb.astype(np.uint8), 50, 150, L2gradient=True)# Write ppb and canny under <root>/val/SAR-PPB/<name> and <root>/val/SAR-canny/<name>,# alongside <root>/val/SAR/<name> and <root>/val/EO/<name>. Names must match exactly.
# 2. Run the repository, phase 'val', with a config whose# path.resume_state is the checkpoint PREFIX -- no '_gen.pth' suffix:# "path": {"resume_state": "<dir>/I250000_E<epoch>"} # place gen.pth as I250000_E<epoch>_gen.pth# "stage": 1,# "model": {"beta_schedule": {"val": {"n_timestep": 50, "ddim": 1, ...}}},# "datasets": {"val": {"data_len": -1, "r_resolution": 256}}# python main.py -c <val.json> -p val -enable_wandb "" --seed 1```
Two mechanical details that will otherwise cost you a full inference pass:
* the RGB loader. Upstream's `SAR2EODataset` hard-codes a **grayscale** EO target and a two-channel `[PPB, Canny]` condition. QXS-SAROPT's optical side is RGB, and with three channels upstream's `ddim_sample()` slices the condition to `condition_x[:, :3]` and concatenates it with 3-channel predictions, which raises on the first validation image. We ran through a small wrapper that patches `SAR2EODataset.__getitem__` **in memory** — returning `HR = EO[0:3]`, `LR = SAR[0:3]`, `SR = cat(PPB[0:1], Canny[0:1], SAR[0:1])` — and then executes the repository's `main.py` verbatim, so no upstream file is touched and every flag behaves the same. Reproduce that patch or write your own three-channel loader;* `-enable_wandb ""` is mandatory. The flag defaults to the string `'false'`, which is truthy.
## Read before using this checkpoint
* **The checkpoint loads with `strict=False`.** `model/model.py` calls `load_state_dict(..., strict=False)`, so a configuration that does not match the file **loads nothing and raises no error** — you get a fully random model and a plausible-looking run. Verify the `Loading pretrained model for G [...]` line in the log and eyeball the first output.* **`-p val` writes next to the checkpoint and then renames.** Images land in `<resume_state>/sample/`, and at the end the directory is renamed to `<resume_state>_S<ssim>_P<psnr>_l2<l2>_Lp<lpips>`. That rename **raises if the target already exists** — after the entire inference has been paid for. Guard for an existing `<prefix>_S*/sample` before starting.* **SoftPool.** The E3Diff code imports the SoftPool CUDA extension unconditionally. We used a pure-PyTorch drop-in with identical maths (`softpool(x) = avgpool(x·eˣ) / avgpool(eˣ)`) and identical autograd, which needs no build step. Either build the extension or write the equivalent.* **A known tone offset, inherited deliberately.** On another dataset in the wider campaign this exact configuration produced generations that were, on average, tens of gray levels brighter than the ground truth, at a substantial cost in PSNR. We did **not** correct it per dataset, because comparability across the row was judged worth more than per-cell tuning. Read this row's PSNR with that in mind.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually ⚠ no upstream licence exists
**The upstream code base publishes no licence.**[`DeepSARRS/E3Diff`](https://github.com/DeepSARRS/E3Diff), whose stage-1configuration this row is, has no LICENSE, LICENCE, COPYING or NOTICE file atany depth in its tree; only 1 of its 58 tracked files is licence-shaped and thatone is `SoftPool/LICENSE.txt`, the MIT licence of a **vendored third-partydependency** (`Copyright (c) 2020 Alexandros Stergiou`, reproduced here as`licenses/LICENSE-SoftPool-MIT.txt`) — not a grant for E3Diff. Its README has nolicence section, and the GitHub API reports no declared licence, with the`/license` endpoint returning 404. Checked 2026-08-28.
Under default copyright that means **all rights are reserved by the authors andno express permission to redistribute derived work has been granted** to us orto you. We publish this checkpoint anyway, so that the benchmark is reproducibleend to end, and we state the position plainly rather than implying a permissionthat does not exist. If you intend to redistribute this checkpoint or build onit, assess that for yourself, and consider asking the authors directly.
The code base credits SR3(`Janspiry/Image-Super-Resolution-via-Iterative-Refinement`, Apache-2.0),`GaParmar/img2img-turbo` (MIT) and `alexandrosstergiou/SoftPool` (MIT). Thoselicences cover the borrowed parts, not the authors' own contribution.
Please cite the SR3 paper for the method class, and E3Diff for the code thatproduced these weights: Qin, Zou, Li and Zhang, *Efficient End-to-End DiffusionModel for One-Step SAR-to-Optical Translation*, IEEE Geoscience and RemoteSensing Letters, [doi:10.1109/LGRS.2024.3506566](https://doi.org/10.1109/LGRS.2024.3506566).The full record of what we checked, per method, is in`licenses/NO-UPSTREAM-LICENSE.md` at the root of this repository.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177# E3Diff — QXS-SAROPT
**Efficient End-to-End Diffusion Model for One-Step SAR-to-OpticalTranslation**, Qin, Zou, Li and Zhang, *IEEE Geoscience and Remote SensingLetters*, 2024([doi:10.1109/LGRS.2024.3506566](https://doi.org/10.1109/LGRS.2024.3506566); theyear is the one in the authors' own citation block — a table that labels this rowwith a later issue year is referring to the same paper). Upstream code:[`DeepSARRS/E3Diff`](https://github.com/DeepSARRS/E3Diff) at commit`38601093ab8f8e4b478144621f20890b100a3b74`.
This is the authors' two-stage method, **retrained by us end to end** onQXS-SAROPT, and it is the checkpoint behind the E3Diff row of the ReFlowSETcomparison table.
**These are our weights, not the authors' released checkpoint.** The authors'own weights exist for a different dataset and are not what this row measures.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `gen.pth` | 768,426,944 | the `sr3` UNet after stage 2, at absolute iteration 310,000 |
Architecturally this is **the same network as the DDPM (SR3-class) row** in thisrepository — E3Diff's two stages share one UNet. What differs is the training:
* **stage 1** (250,000 updates) is the eps-prediction conditional DDPM. Its checkpoint is the `ddpm/` folder in this repository.* **stage 2** (60,000 further updates, absolute iteration 310,000) fine-tunes that same network into a **one-step generator**: the sampler is run *with gradients* from pure noise for `ddim_steps = 1`, and the loss is taken directly on pixels.
UNet: `inner_channel` 64, `channel_multiplier` [1, 2, 4, 8, 16], `res_blocks` 1,`norm_groups` 16, no attention, 3 in / 3 out, 3-channel condition.
The condition is the same three-channel `[PPB, Canny, SAR]` stack described onthe DDPM card: FAST_PPB speckle filtering (Deledalle 2009, P = 3, W = 10,h = 0.5), `cv2.Canny(ppb, 50, 150, L2gradient=True)`, and the raw SAR image.**This row cannot be run from a SAR PNG alone.**
## Training budget we used
| | ||---|---|| **generator updates released** | **250,000 (stage 1, inherited) + 60,000 (stage 2) = 310,000 absolute** || batch size / resolution | 16 @ 256 px || optimizer | Adam, lr 5e-5 || stage-2 sampler during training | DDIM, **1 step**, run with gradients from pure noise || stage-2 losses | L1 on pixels, + LPIPS (weight 5), + focal-frequency (weight 10), + a vision-aided CLIP GAN (λ_gan 0.5) || stage-1 losses | plain eps-prediction MSE (all auxiliary weights zero) || sampler (test) | **DDIM, 1 step** || EMA | decay 0.9999 (stage 1) || augmentation | flips, 90° rotations, and a random brightness jitter on the SAR/PPB pair (upstream's `transform_augment`) |
The stage-2 budget is 24 % of the stage-1 budget, which follows the authors' ownratio (they resume at 640,000 and run to 800,000). Note that `n_iter` in thiscode base is an **absolute** step count continuing stage 1, not a stage-2budget — a config that reads 310,000 buys 60,000 new iterations.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 47.8 | 0.278 | 0.530 | 0.302 | 16.44 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
Same entry point and same mechanics as the DDPM row, with `"stage": 2` and`ddim_steps: 1`.
```python# 1. Build the condition channels for each SAR image, once:# ppb = FAST_PPB(sar, P=3, W=10, h=0.5)# canny = cv2.Canny(ppb.astype('uint8'), 50, 150, L2gradient=True)# written to <root>/val/SAR-PPB/<name> and <root>/val/SAR-canny/<name>,# alongside <root>/val/SAR/<name> and <root>/val/EO/<name>.
# 2. Run phase 'val' with a config whose path.resume_state is the checkpoint# PREFIX -- no '_gen.pth' suffix -- and place gen.pth as <prefix>_gen.pth:# "stage": 2, "ddim_steps": 1,# "model": {"beta_schedule": {"val": {"n_timestep": 1, "ddim": 1, ...}}},# "datasets": {"val": {"data_len": -1, "r_resolution": 256}}# python main.py -c <val.json> -p val -enable_wandb "" --seed 1```
Sampling is genuinely one network evaluation per image, which is the point ofthe method.
As on the DDPM card, the RGB loader is the one thing you must sort out: upstreamhard-codes a grayscale EO target and a two-channel condition, and with threechannels its `ddim_sample()` slices the condition and concatenates mismatchedshapes. We patched `SAR2EODataset.__getitem__` in memory to return`HR = EO[0:3]`, `LR = SAR[0:3]`, `SR = cat(PPB[0:1], Canny[0:1], SAR[0:1])` andthen ran the repository's `main.py` verbatim.
## Read before using this checkpoint
* **This is not an oracle.** Worth stating, because a one-step generator invites the question: the sampler's `condition_x` is the `[PPB, Canny, SAR]` stack, and the ground truth never enters it. The cell also passes our leak audit on both datasets.* **Stage 2 needs the *real* vision-aided CLIP discriminator.** Stage 1 has `lambda_gan = 0` and can import a stub; stage 2 cannot. If a constant-output stub shadows the real `vision_aided_loss` package, stage 2 trains against a constant GAN loss and **silently is not the authors' method**. Assert on `vision_aided_loss.__file__` before starting a run.* **SoftPool.** The code imports the SoftPool CUDA extension unconditionally. We used a pure-PyTorch drop-in with identical maths (`softpool(x) = avgpool(x·eˣ) / avgpool(eˣ)`) and identical autograd, which needs no build step.* **The checkpoint loads with `strict=False`.** A mismatched configuration **loads nothing and raises no error**. Verify the `Loading pretrained model for G [...]` log line and look at the first output.* **`-p val` writes next to the checkpoint and then renames** the sample directory to `<prefix>_S<ssim>_P<psnr>_l2<l2>_Lp<lpips>`. That rename raises if the target already exists — after the whole inference has been paid for.* **`-enable_wandb ""` is mandatory**; the flag defaults to the truthy string `'false'`.* One change we made to the repository: `core/logger.py` no longer unconditionally overwrites `CUDA_VISIBLE_DEVICES` from the config's `gpu_ids`, which on a shared machine remapped every job onto another user's device. It is a scheduling fix and does not affect the model.
## Licence — stated factually ⚠ no upstream licence exists
**The upstream code base publishes no licence.**[`DeepSARRS/E3Diff`](https://github.com/DeepSARRS/E3Diff) has no LICENSE,LICENCE, COPYING or NOTICE file at the repository root or at any depth; **1 ofits 58 tracked files** is licence-shaped, and it is `SoftPool/LICENSE.txt`, theMIT licence of a **vendored third-party dependency** (`Copyright (c) 2020Alexandros Stergiou`, reproduced here as `licenses/LICENSE-SoftPool-MIT.txt`) —not a grant covering E3Diff. Its README has no licence section, and the GitHubAPI reports no declared licence, with the `/license` endpoint returning 404.Checked 2026-08-28.
Under default copyright that means **all rights are reserved by the authors andno express permission to redistribute derived work has been granted** to us orto you. We publish this checkpoint anyway, so that the benchmark is reproducibleend to end, and we state the position plainly rather than implying a permissionthat does not exist. If you intend to redistribute this checkpoint or build onit, assess that for yourself, and consider asking the authors directly.
**Lineage.** E3Diff's README credits SR3(`Janspiry/Image-Super-Resolution-via-Iterative-Refinement`, Apache-2.0),`GaParmar/img2img-turbo` (MIT) and `alexandrosstergiou/SoftPool` (MIT). Thoselicences cover the borrowed parts only, not the authors' own two-stagecontribution. We ship only the SoftPool text, because it is the only one of thethree that is vendored in the tree we trained from.
Please cite: Qin, Zou, Li and Zhang, *Efficient End-to-End Diffusion Model forOne-Step SAR-to-Optical Translation*, IEEE Geoscience and Remote SensingLetters, [doi:10.1109/LGRS.2024.3506566](https://doi.org/10.1109/LGRS.2024.3506566).The full record of what we checked, per method, is in`licenses/NO-UPSTREAM-LICENSE.md` at the root of this repository.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162# HI-Diff — QXS-SAROPT
**Hierarchical Integration Diffusion Model for Realistic Image Deblurring**,Chen, Zhang, Liu, Kong and Yuan, *NeurIPS 2023*([arXiv:2305.12966](https://arxiv.org/abs/2305.12966)). Upstream code:[`zhengchen1999/HI-Diff`](https://github.com/zhengchen1999/HI-Diff) at commit`b3bfd167997e27f8edd57681cf70e5031a0e35f2`.
This is the two-stage latent-prior restoration transformer we retrainedourselves on QXS-SAROPT (SAR as the degraded input, EO as the target), and it isthe checkpoint behind the HI-Diff row of the ReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `S1_net_g_latest.pth` | 101,401,457 | stage-1 restoration transformer — for reproducing stage-2 *training*, not for inference || `S1_net_le_latest.pth` | 2,357,509 | stage-1 latent encoder, `in_chans` **6** (it sees LQ ‖ GT) — **not usable at test time** || `S2_net_d_latest.pth` | 10,530,491 | **the 8-step latent denoiser** — needed at inference || `S2_net_g_latest.pth` | 101,401,457 | **the final restoration transformer** — needed at inference || `S2_net_le_dm_latest.pth` | 2,247,061 | **the stage-2 latent encoder**, `in_chans` 3 (LQ only) — needed at inference |
**Only the three `S2_*` files are needed to run this model.** The repository'sown test configuration loads exactly `pretrain_network_g`,`pretrain_network_le_dm` and `pretrain_network_d`, and nothing else. The two`S1_*` files are shipped so that stage-2 *training* can be reproduced: stage 1learns a latent prior from the LQ **and** the ground truth together, which is whyits encoder takes 6 input channels and cannot be used at deployment.
Architecture: the transformer is Restormer-shaped — `dim` 48, blocks[3, 5, 6, 6], 4 refinement blocks, heads [1, 2, 4, 8], FFN expansion 2.66,`embed_dim` 64, `group` 4. The latent denoiser runs **8 timesteps** on thecompressed prior (`linear_start` 0.1, `linear_end` 0.99) — the diffusion hereacts on a small latent prior, not on the image.
## Training budget we used
| | ||---|---|| **generator updates released** | **25,000 (stage 1) + 25,000 (stage 2) = 50,000** || batch size / patch | 8 @ 256 px || optimizer | AdamW, lr 2e-4, weight decay 1e-4, β (0.9, 0.999), gradient clipping on || schedule | `CosineAnnealingRestartCyclicLR`, periods [8,000 / 17,000], η_min [2e-4, 1e-6] || loss | L1 || progressive training | **disabled** || test resolution | tested at native 256 px |
The upstream recipe is 300,000 + 300,000 iterations with a progressivepatch/batch schedule from 128 to 384 px. We disabled the progressive schedule(a single fixed 256 px group) and matched the budget to the rest of thisbenchmark's diffusion band at 50,000 total updates. That is a substantialreduction from the authors' recipe and is stated here so nobody reads this rowas HI-Diff at full budget.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 324.3 | 0.539 | 0.692 | 0.457 | 17.10 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
The three networks must be assembled by hand; the repository's own `test.py`with a `HI_Diff_S2` option file is the path of least resistance.
```yaml# options/test/<your>.yml -- the three paths below are the three S2_ filesmodel_type: HI_Diff_S2network_g: {type: Transformer, inp_channels: 3, out_channels: 3, dim: 48, num_blocks: [3,5,6,6], num_refinement_blocks: 4, heads: [1,2,4,8], ffn_expansion_factor: 2.66, bias: False, LayerNorm_type: WithBias, dual_pixel_task: False, embed_dim: 64, group: 4}network_le_dm: {type: latent_encoder_gelu, in_chans: 3, embed_dim: 64, block_num: 6, group: 4, stage: 2, patch_expansion: 0.5, channel_expansion: 4}network_d: {type: denoising, in_channel: 256, out_channel: 256, inner_channel: 512, block_num: 4, group: 4, patch_expansion: 0.5, channel_expansion: 2}diffusion_schedule: {apply_ldm: False, schedule: linear, timesteps: 8, linear_start: 0.1, linear_end: 0.99}path: pretrain_network_g: S2_net_g_latest.pth pretrain_network_le_dm: S2_net_le_dm_latest.pth pretrain_network_d: S2_net_d_latest.pth param_key_g: params```
```bashpython test.py -opt options/test/<your>.yml```
The SAR input is read with `cv2.IMREAD_COLOR`, so a single-channel SAR image isreplicated to three channels automatically — that is what training saw. Atinference `le_dm` produces the prior from the degraded input alone, `net_d`denoises that prior over 8 steps, and `net_g` is conditioned on it.
## Read before using this checkpoint
* **The `S1_*` files are not an inference path.** `S1_net_le_latest.pth` has `in_chans: 6` because stage 1 encodes LQ concatenated with the ground truth. Wiring it into a test run would make the model an oracle. Use the `S2_*` trio.* **These are the `latest` checkpoints — iteration 25,000 — not a best-validation selection.** That is deliberate and benchmark-wide: every other method here publishes its last checkpoint, so selecting on validation for this one would be an asymmetry in its favour. Do not repoint at a best-val file and then compare against this table.* **Retraining is destructive.** The upstream launcher path is not idempotent: the training configs set `resume_state: ~`, no auto-resume flag is passed, and basicsr's `mkdir_and_rename` archives a finished experiment directory and starts from scratch. Re-running a training script over a finished experiment destroys it.* **`torch.load` needs `weights_only=False`** under PyTorch ≥ 2.6; we made that change in two places in the repository (`hi_diff/utils/base_model.py` and `train.py`). Both are compatibility fixes.* **How to read this row's numbers.** HI-Diff takes the best PSNR and SSIM of any method in this benchmark on both datasets, while sitting at or near the worst FID, DISTS and LPIPS. That combination is the signature of regression-to-the-mean: a blurred, low-variance prediction minimises squared error and is perceptually poor. Reporting its PSNR without its FID would badly misrepresent it — and so would the reverse.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `zhengchen1999/HI-Diff` ships a LICENSE file, reproduced verbatim hereas `licenses/LICENSE-hidiff.txt`: the **Apache License 2.0**, appendix copyrightline `Copyright 2023 HI-Diff Authors`.
**Redistribution of these weights is permitted.** Apache-2.0 §4 obligationsapply: ship the licence, keep the notices, and **state that you modified thefiles**. We did modify them — the two `torch.load(..., weights_only=False)`changes noted above, plus our own option files — and this sentence is thatstatement. Upstream ships no NOTICE file, so there is none to carry. Apache-2.0§6 withholds trademark rights.
HI-Diff itself builds on BasicSR, Restormer and DiffIR, which its READMEcredits; those projects' own licences cover their code.
Attribution: *trained with `zhengchen1999/HI-Diff`, Copyright 2023 HI-DiffAuthors, licensed under the Apache License 2.0; our training and testconfigurations modify the upstream configuration, and two source files weremodified for PyTorch ≥ 2.6 compatibility. HI-Diff builds on BasicSR, Restormerand DiffIR. Full text in `licenses/LICENSE-hidiff.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142# pix2pixHD — QXS-SAROPT
**High-Resolution Image Synthesis and Semantic Manipulation with ConditionalGANs**, Wang, Liu, Zhu, Tao, Kautz and Catanzaro, *CVPR 2018*([arXiv:1711.11585](https://arxiv.org/abs/1711.11585)). Upstream code:[`NVIDIA/pix2pixHD`](https://github.com/NVIDIA/pix2pixHD) at commit`14b3b3c7fff413086e3b58df52096f16b6891172`.
This is the coarse-to-fine paired GAN we retrained ourselves on QXS-SAROPT, andit is the checkpoint behind the pix2pixHD row of the ReFlowSET comparisontable.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G.pth` | 729,795,505 | the global generator, and the only file inference needs |
`net_G.pth` is the **`global` generator** (`GlobalGenerator`):`n_downsample_global` 4, `n_blocks_global` 9 residual blocks, `ngf = 64`,instance normalisation, 3 in / 3 out. The run was configured with`n_local_enhancers 1`, but at `netG=global` the local enhancer is neverconstructed and is not in this file — this is the single-scale generator.
The run used `--label_nc 0 --no_instance`, i.e. the "label" input is a realimage (the SAR chip) rather than a segmentation map, and no instance-edgechannel is concatenated. The two discriminators (`num_D` 2) are not released.
## Training budget we used
| | ||---|---|| **generator updates released** | **120,000** || batch size | 16 || epochs (`niter` + `niter_decay`) | 60 + 60 || iterations per epoch | 1,000 (16,001 training pairs; this loader floor-rounds, unlike the junyanz loaders which round up) || optimizer | Adam, lr 2e-4, β₁ 0.5, linear decay over the second half || adversarial loss | LSGAN, multi-scale discriminator (`num_D` 2, `n_layers_D` 3) || feature-matching loss | λ_feat 10 || perceptual loss | VGG loss enabled || augmentation | horizontal flip || input | 256 px (`resize_and_crop`, `loadSize` 256, `fineSize` 256) |
The floor-vs-ceiling detail is not pedantry: pix2pixHD and SPADE drop the lastpartial batch while the junyanz-family loaders do not, so the same "epochs"figure yields slightly different update counts across the table. The updatecounts above are what actually ran.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 85.7 | 0.298 | 0.573 | 0.358 | 16.13 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
`GlobalGenerator` can be constructed directly, without the repository's optionmachinery:
```pythonimport numpy as np, torch, torch.nn as nnfrom PIL import Imagefrom models.networks import GlobalGenerator # from the NVIDIA/pix2pixHD repo
G = GlobalGenerator(3, 3, 64, 4, 9, nn.InstanceNorm2d)G.load_state_dict(torch.load('net_G.pth', map_location='cpu'))G.eval()
sar = Image.open('sar.png').convert('RGB')x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): y = G(x)
eo = ((y[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
Through the repository's own `test.py` the equivalent invocation is`--label_nc 0 --no_instance --which_epoch latest`, and the output lands as`<stem>_synthesized_image.png`.
## Read before using this checkpoint
* **Upstream writes its test outputs as JPEG.** `util/visualizer.py` hard-codes `'%s_%s.jpg'`. We changed that one line to `.png` before scoring, because every other method in this benchmark writes PNG and JPEG re-compression would have biased FID and LPIPS for this row alone. **If you clone upstream unmodified and evaluate, your numbers will not match ours**, and the gap is an artefact of the file format, not of the model.* Three further changes we made to the repository are pure Python-3.12 / modern-library compatibility and do not affect the weights: `transforms.Scale` → `transforms.Resize`; `fractions.gcd` → `math.gcd` with integer division; and a guarded `import scipy.misc` (needed only for `--tf_log`, which we never pass).* Normalisation is `[-1, 1]`.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `NVIDIA/pix2pixHD` ships `LICENSE.txt`, reproduced verbatim here as`licenses/LICENSE-p2phd.txt`. It contains two notices:
* `Copyright (C) 2019 NVIDIA Corporation. Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu. BSD License. All rights reserved.` — two conditions and a disclaimer;* the bundled `pytorch-CycleGAN-and-pix2pix` notice, `Copyright (c) 2017, Jun-Yan Zhu and Taesung Park`, because pix2pixHD's code borrows heavily from it.
**Redistribution of these weights is permitted** with both notices reproduced.Despite NVIDIA's non-commercial licensing of some of its other releases, thisone carries **no non-commercial clause and no share-alike clause** — we checkedthe file and the README, and the README has no licence section at all, so`LICENSE.txt` is the entire grant.
Attribution: *trained with `NVIDIA/pix2pixHD`. Copyright (C) 2019 NVIDIACorporation — Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu. BSD License, all rightsreserved; includes the bundled pytorch-CycleGAN-and-pix2pix notice (Copyright(c) 2017, Jun-Yan Zhu and Taesung Park). Full text in`licenses/LICENSE-p2phd.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141# pix2pix — QXS-SAROPT
**Image-to-Image Translation with Conditional Adversarial Networks**, Isola, Zhu,Zhou and Efros, *CVPR 2017* ([arXiv:1611.07004](https://arxiv.org/abs/1611.07004)).Upstream code:[`junyanz/pytorch-CycleGAN-and-pix2pix`](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix)at commit `2a7afba2895d52556dd5dfe07e8555ef657ced6f`.
This is the paired conditional GAN we retrained ourselves on QXS-SAROPT, and itis the checkpoint behind the pix2pix row of the ReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G.pth` | 217,728,293 | the generator, and the only file inference needs |
`net_G.pth` is a **`unet_256` generator**: a U-Net with batch normalisation,`ngf = 64`, 3 input channels and 3 output channels, saved from a single-GPU runso the state-dict keys are bare (no `module.` prefix). It maps **SAR → EO**:the training set was built as side-by-side `A|B` tiles with SAR on the left, andthe run used `--direction AtoB`.
The discriminator is not part of this release — upstream's `test.py` constructsonly the generator, so `net_G.pth` is sufficient to reproduce every image wescored.
## Training budget we used
| | ||---|---|| **generator updates released** | **120,120** || batch size | 16 || epochs (constant LR + linear decay) | 60 + 60 || iterations per epoch | 1,001 (16,001 training pairs, the loader does not drop the last batch) || optimizer | Adam, lr 2e-4, β₁ 0.5, linear decay to 0 over the second half || adversarial loss | vanilla GAN; discriminator `basic` (70×70 PatchGAN, `n_layers_D` 3) || reconstruction loss | L1, weight 100 || augmentation | horizontal flip || input | 256 px, no resize (the chips are already 256 px) |
We quote budgets in **optimizer updates**, never in epochs: the two datasetsdiffer by more than 10× in size, so "200 epochs" means something completelydifferent on each and would silently favour one of them.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 174.6 | 0.373 | 0.665 | 0.203 | 12.33 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
The snippet uses the upstream repository's own `define_G`, so clone`junyanz/pytorch-CycleGAN-and-pix2pix` at the commit above and run this from itsroot. No patch is needed for this method — our only change to that repository wasan import fix in the dataset-preparation helper, which does not affect the model.
```pythonimport numpy as np, torchfrom PIL import Imagefrom models.networks import define_G # from the junyanz repo
G = define_G(3, 3, 64, 'unet_256', 'batch', use_dropout=False, init_type='normal', init_gain=0.02, gpu_ids=[])sd = torch.load('net_G.pth', map_location='cpu')if hasattr(sd, '_metadata'): del sd._metadata # upstream strips this tooG.load_state_dict(sd)G.eval()
# SAR input -> RGB -> [-1, 1]. QXS-SAROPT SAR is single-channel; .convert('RGB')# replicates it to three channels, which is what training saw.sar = Image.open('sar.png').convert('RGB')x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): y = G(x)
eo = ((y[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
The image this produces is `<stem>_fake_B.png` in upstream's own `test.py`output tree, which is exactly what we scored.
## Read before using this checkpoint
* **`define_G` must be called with `gpu_ids=[]`.** Our checkpoints were saved from single-GPU runs and have bare keys; building the network with a non-empty `gpu_ids` wraps it in `DataParallel` and the load then fails on a `module.` prefix mismatch.* **The normalisation is `[-1, 1]`, not `[0, 1]`.** Feeding `[0, 1]` produces a plausible-looking but systematically wrong image.* This row is a **paired** method and was trained on aligned SAR/EO pairs. It passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `junyanz/pytorch-CycleGAN-and-pix2pix` ships a LICENSE file, reproducedverbatim in this repository as `licenses/LICENSE-pix2pix.txt`. It is **not asingle SPDX licence** but three stacked notices, and the whole file is whattravels with these weights:
* CycleGAN — `Copyright (c) 2017, Jun-Yan Zhu and Taesung Park`, two conditions and a disclaimer (BSD-2-Clause in form);* pix2pix — `Copyright (c) 2016, Phillip Isola and Jun-Yan Zhu`, two conditions;* DCGAN — `Copyright (c) 2015, Facebook, Inc.`, three conditions including a no-endorsement clause (BSD-3-Clause).
**Redistribution of these weights is permitted** with that notice reproduced.There is no non-commercial and no share-alike clause. The DCGAN section'sno-endorsement clause means Facebook's name must not be used to promote thisrelease.
Attribution: *trained with `junyanz/pytorch-CycleGAN-and-pix2pix`. Copyright (c)2017, Jun-Yan Zhu and Taesung Park (CycleGAN); Copyright (c) 2016, Phillip Isolaand Jun-Yan Zhu (pix2pix); Copyright (c) 2015, Facebook, Inc. (DCGAN). All rightsreserved. Redistributed under the BSD terms reproduced in`licenses/LICENSE-pix2pix.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144# ResShift — QXS-SAROPT
**ResShift: Efficient Diffusion Model for Image Super-Resolution by ResidualShifting**, Yue, Wang and Loy, *NeurIPS 2023*([arXiv:2307.12348](https://arxiv.org/abs/2307.12348)). Upstream code:[`zsyOAOA/ResShift`](https://github.com/zsyOAOA/ResShift) at commit`bb03b7d21614cace01787e097c8a6ab6b945227d`.
This is the residual-shifting latent diffusion model we retrained ourselves onQXS-SAROPT, run as a **same-size** mapping (`sf = 1`: SAR in, EO out, noupscaling), and it is the checkpoint behind the ResShift row of the ReFlowSETcomparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `ema_model.pth` | 478,392,663 | EMA weights of the denoising UNet at iteration 50,000 |
`ema_model.pth` is the EMA (rate 0.999) of a **`models.unet.UNetModelSwin`**:latent resolution 64, `model_channels` 160, `channel_mult` [1, 2, 2, 4],`num_res_blocks` [2, 2, 2, 2], attention at [64, 32, 16, 8], 32 channels perhead, Swin blocks of depth 2 with `swin_embed_dim` 192 and window size 8,`cond_lq = True`, `lq_size = 256`.
**This is a latent-space model and this file is not sufficient to run it.** Itadditionally needs the external CompVis **vq-f4** autoencoder(`ldm.models.autoencoder.VQModelTorch`, 221,364,711 bytes), which is **not**redistributed here.
## Training budget we used
| | ||---|---|| **generator updates released** | **50,000** || batch size | 16 (micro-batch 8, i.e. 2 gradient-accumulation steps per update) || optimizer | Adam, lr 5e-5 → 2e-5 cosine, 2,000-step warmup, no weight decay || EMA | rate 0.999 || diffusion | **4 steps**, exponential noise schedule (power 0.3), `etas_end` 0.99, `min_noise_level` 0.2, κ = 2.0, `predict_type` xstart, `sf` 1 || loss weights | latent MSE 1.0, pixel LPIPS (AlexNet) 4.0, pixel MSE 0.0 || precision | AMP on || training crops | random 256 px, normalised with mean 0.5 / std 0.5 || seed | 123456 |
ResShift is a **4-step** sampler by construction; that is the method, not ashortcut we took.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 140.2 | 0.334 | 0.607 | 0.217 | 14.20 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
Upstream's `inference_resshift.py` is a super-resolution CLI keyed to theauthors' own released tasks and does not accept a SAR→EO configuration. We wrotea small driver against the repository's `ResShiftSampler`; the equivalent is:
```pythonfrom omegaconf import OmegaConffrom sampler import ResShiftSampler # from the zsyOAOA/ResShift repo
cfg = OmegaConf.load('<your>_sar2eo_256.yaml') # sf 1, steps 4, predict_type xstartcfg.model.ckpt_path = 'ema_model.pth'cfg.autoencoder.ckpt_path = '<path to>/autoencoder_vq_f4.pth' # NOT shipped here
sampler = ResShiftSampler(cfg, sf=1, chop_size=256, chop_stride=256, chop_bs=1, use_amp=True, seed=12345, padding_offset=None)sampler.inference('<dir of SAR images>', '<output dir>', bs=16, noise_repeat=False)```
At 256 px no tiling happens. Outputs keep the input file stems.
## Read before using this checkpoint
* **The external vq-f4 autoencoder is mandatory and is not in this repository.** Without it the model cannot be constructed, let alone run. It is CompVis latent-diffusion material under its own (MIT) licence.* **Upstream's own inference CLI will not drive these weights.** It is written around the authors' released super-resolution tasks. Use the sampler directly, as above.* **xFormers must be disabled.** On the accelerator we trained on, the installed xFormers build has no usable kernel for these shapes (attention head dimension 512 exceeds its limit, and fp32 is unsupported), so we set `XFORMERS_IS_AVAILBLE = False` in three files (`ldm/modules/attention.py`, `ldm/modules/diffusionmodules/model.py`, `models/unet.py`). If your hardware differs, this is a performance switch, not a correctness one.* **One numerical guard in the image logger.** fp16 diffused latents decoded through the fp32 VQGAN produce NaN/Inf at early iterations and crashed training *inside the logging path*. We added a `nan_to_num` + `clamp` before `make_grid`. It is logging-only; the loss path is untouched. (A separate `nan_to_num` on the LPIPS loss is upstream's, not ours.)* **There is no auto-resume.** A crash mid-run needs a manual relaunch pointing at the last saved checkpoint.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually ⚠ non-commercial
Upstream `zsyOAOA/ResShift` ships a LICENSE file, reproduced verbatim here as`licenses/LICENSE-resshift.txt`: the **S-Lab License 1.0**,`Copyright 2022 S-Lab`.
**This licence is non-commercial.** Its opening clause reads *"Redistributionand use **for non-commercial purpose** in source and binary forms, with orwithout modification, are permitted provided that the following conditions aremet"*, and it adds that commercial use requires contacting the contributors. TheREADME repeats it: *"This project is licensed under NTU S-Lab License 1.0.Redistribution and use should follow this license."*
So: **redistribution of these weights is permitted for non-commercial purposesonly**, in binary form, with the copyright notice, the conditions and thedisclaimer reproduced — which is what `licenses/LICENSE-resshift.txt` is for.Clause 3 is a **no-endorsement** clause: neither S-Lab's name nor itscontributors' names may be used to endorse or promote this release.
Attribution: *trained with `zsyOAOA/ResShift`, Copyright 2022 S-Lab, **S-LabLicense 1.0 — redistribution and use for non-commercial purposes only**; forcommercial use, contact the contributors. Requires the CompVis vq-f4autoencoder (MIT), not redistributed here. Neither S-Lab's name nor itscontributors' names may be used to endorse this release. Full text in`licenses/LICENSE-resshift.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156# SD2.1 fine-tune only — QXS-SAROPT
The **"SD2.1 fine-tune only"** ablation row of the ReFlowSET comparison table:Stable Diffusion 2.1-base fine-tuned for SAR-to-EO translation with a plain MSEepsilon loss and **no confidence head**.
> **This is not a stock SD 2.1 UNet and it will not load into a stock SD 2.1> pipeline.** It is C-DiffSET **stage 1**: the input convolution is widened to> 8 channels so the SAR latent can be concatenated to the noisy EO latent. Only> the output side is unmodified.
Venue: there is no separate paper for this row. The backbone is StableDiffusion 2.1-base (latent diffusion, Rombach et al., CVPR 2022); the traineris the stage-1 trainer of[`KAIST-VICLab/C-DiffSET`](https://github.com/KAIST-VICLab/C-DiffSET)(*IEEE TCSVT* 2026, [doi:10.1109/TCSVT.2026.3701447](https://doi.org/10.1109/TCSVT.2026.3701447)).
## What is in this folder
A single `UNet2DConditionModel` (865,922,244 parameters, fp32, 686 tensors):
* **`conv_in` 4 -> 8 channels**, exactly as in the C-DiffSET folder — the input is `torch.cat([sar_latent, noisy_eo_latent], dim=1)`, **SAR first**. In this trained checkpoint the two halves have diverged (mean |w| 0.01443 on channels 0-3 vs 0.02727 on channels 4-7).* **`conv_out` unchanged at 4 channels.** No variance head, no confidence map. The stage-1 trainer explicitly overrides the channel surgery to a no-op, and the whole 4-channel prediction goes to the scheduler.
That 5-vs-4 output channel count is the only architectural difference from the`cdiffset` folder in this repository; the parameter counts differ by exactly2,881 (one 320x3x3 filter plus one bias).
## Training budget we used
| | ||---|---|| optimizer updates released | **40,000** (fixed-step snapshot `checkpoint-40000`) || updates the run was configured for | 50,000 || initialised from | the SD 2.1-base UNet with the duplicated-and-halved 8-channel `conv_in` || batch size / resolution | 64 @ 256 px || epochs the 40,000 updates work out to | ~160 (16,001 training pairs, 250 updates/epoch) || optimizer | AdamW, lr 3e-5, weight decay 0.01, cosine schedule, 100-step warmup || precision | fp32 (no mixed precision) || seed | 2024 || loss | plain MSE on the epsilon prediction || prompt | the fixed string `"electro-optical image"` || augmentation | horizontal flip, vertical flip, 90-degree rotation || test-time sampler | **DDIM, 50 steps**, fp32, one image at a time |
Same two caveats as the C-DiffSET folder: the snapshot is taken at update 40,000of a cosine schedule laid out for 50,000, so the learning rate had not finisheddecaying; and it is a fixed-step snapshot, not the repository'svalidation-selected `best/`. For this stage the fixed-step choice is also thebetter one on the merits — validation LPIPS bottoms out near update 41,000 andthen degrades toward 50,000.
Data: 256 px, no crop and no resize (the chips are already 256 px). SAR chips come from the `sar_256_oc_0.2` directory of QXS-SAROPT; the EO target is the same stem under `opt_256_oc_0.2`.
## Base model
This checkpoint is a derivative of **Stable Diffusion 2.1-base**. Because theoriginal `stabilityai/stable-diffusion-2-1-base` repository is no longeravailable on the Hub, our training and every snippet below load the communitymirror [`Manojb/stable-diffusion-2-1-base`](https://huggingface.co/Manojb/stable-diffusion-2-1-base).That is what we actually trained against — verified in the trainingconfiguration files, the launch scripts and the training logs, none of whichever reference `stabilityai/...`. The frozen VAE, CLIP text encoder, tokenizerand scheduler all come from that repo. A different SD 2.1-base mirror isexpected to work but has not been verified by us.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | KID↓ | DISTS↓ | LPIPS↓ | PSNR↑ | SSIM↑ ||---|---|---|---|---|---|| 19.1 | 0.0042 | 0.257 | 0.561 | 15.40 | 0.348 |
These are our own re-evaluation numbers, not numbers copied from any paper.LPIPS is **LPIPS-VGG on inputs mapped to [-1, 1]** (the `normalize=False`convention); the alternative [0, 1] convention gives a systematically differentnumber and the two must never be mixed. PSNR/SSIM are per-image torchmetricswith `data_range=1`; FID is `pytorch-fid` against the size-matched ground truth.
## Load it and translate one SAR PNG
```pythonimport numpy as npimport torchfrom PIL import Imagefrom diffusers import UNet2DConditionModel, AutoencoderKL, DDIMSchedulerfrom transformers import CLIPTextModel, CLIPTokenizer
REPO = "JeonghyeokDo/ReFlowSET" # comparison cells live under baselines/BASE = "Manojb/stable-diffusion-2-1-base" # frozen VAE / text encoder / schedulerDEV, DT = "cuda", torch.float32
unet = UNet2DConditionModel.from_pretrained( REPO, subfolder="baselines/qxs-saropt/sd21ft", torch_dtype=DT).to(DEV).eval()vae = AutoencoderKL.from_pretrained(BASE, subfolder="vae", torch_dtype=DT).to(DEV).eval()tok = CLIPTokenizer.from_pretrained(BASE, subfolder="tokenizer")txt = CLIPTextModel.from_pretrained(BASE, subfolder="text_encoder", torch_dtype=DT).to(DEV).eval()sch = DDIMScheduler.from_pretrained(BASE, subfolder="scheduler")sch.set_timesteps(50, device=DEV)
# The fixed training prompt, tokenized exactly as in training (no padding).ids = tok("electro-optical image", padding="do_not_pad", max_length=tok.model_max_length, truncation=True, return_tensors="pt").input_ids.to(DEV)with torch.no_grad(): embed = txt(ids)[0]
# SAR input: 256x256 PNG -> RGB -> [-1, 1]. Do not resize; crop if needed.sar = Image.open("sar.png").convert("RGB")x = torch.from_numpy(np.array(sar)).permute(2, 0, 1)[None]x = (x.to(DEV, DT) / 255.0) * 2 - 1
with torch.no_grad(): sar_lat = vae.encode(x).latent_dist.mean * vae.config.scaling_factor # .mean, not .sample() eo_lat = torch.randn_like(sar_lat) for t in sch.timesteps: out = unet(torch.cat([sar_lat, eo_lat], 1), # SAR first, then the noisy EO latent t, encoder_hidden_states=embed).sample eo_lat = sch.step(out, t, eo_lat).prev_sample # all 4 channels; no variance head eo = vae.decode(eo_lat / vae.config.scaling_factor).sample eo = (eo * 0.5 + 0.5).clamp(0, 1)[0].cpu()
Image.fromarray((eo.permute(1, 2, 0).numpy() * 255).round().astype(np.uint8)).save("eo.png")```
The two things that silently produce a plausible-but-wrong image if you getthem backwards: the concatenation order is **SAR first**, and the VAE must beread as `latent_dist.mean`, not `.sample()`.
## Licence status — stated factually
* **Training code:** MIT, `Copyright (c) 2026 KAIST VICLab` (the stage-1 trainer of [`KAIST-VICLab/C-DiffSET`](https://github.com/KAIST-VICLab/C-DiffSET)). The row is named after Stable Diffusion, but no stabilityai code was used and no stabilityai repository was loaded.* **These weights:** a fine-tune of Stable Diffusion 2.1-base, hence a *Derivative of the Model* under the **CreativeML Open RAIL++-M** licence (`openrail++`). The **Attachment A use restrictions travel with these weights** and must be passed on to anyone you redistribute to. Full text, including Attachment A, ships in this repository as `LICENSE-WEIGHTS.md`.
Attribution: *fine-tuned from Stable Diffusion 2.1-base (obtained as`Manojb/stable-diffusion-2-1-base`, a re-upload of`stabilityai/stable-diffusion-2-1-base`) using the stage-1 trainer of`KAIST-VICLab/C-DiffSET`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint retrained by us on QXS-SAROPT; it is not ReFlowSET itself. Everycomparison method in the release was retrained by us on the same splits at thesame resolution, so the rows are directly comparable to each other.123456789101112131415161718192021222324252627282930313233343536373839404142434445{ "_class_name": "UNet2DConditionModel", "_diffusers_version": "0.10.0.dev0", "act_fn": "silu", "attention_head_dim": [ 5, 10, 20, 20 ], "block_out_channels": [ 320, 640, 1280, 1280 ], "center_input_sample": false, "cross_attention_dim": 1024, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "dual_cross_attention": false, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 8, "layers_per_block": 2, "mid_block_scale_factor": 1, "norm_eps": 1e-05, "norm_num_groups": 32, "num_class_embeds": null, "only_cross_attention": false, "out_channels": 4, "sample_size": 64, "up_block_types": [ "UpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D" ], "use_linear_projection": true}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176# SPADE — QXS-SAROPT
**Semantic Image Synthesis with Spatially-Adaptive Normalization**, Park, Liu,Wang and Zhu, *CVPR 2019* ([arXiv:1903.07291](https://arxiv.org/abs/1903.07291)).Upstream code: [`NVlabs/SPADE`](https://github.com/NVlabs/SPADE) at commit`fecacc920c1367a038995c45a39c15f6521ca64f`.
This is the spatially-adaptive-normalisation generator we retrained ourselves onQXS-SAROPT, and it is the checkpoint behind the SPADE row of the ReFlowSETcomparison table.
**This checkpoint will not load into a clean clone of `NVlabs/SPADE`.** Read thenext two sections before trying.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G.pth` | 368,775,707 | the SPADE generator, and the only file inference needs |
`net_G.pth` is a **`SPADEGenerator`**: `ngf = 64`,`norm_G = spectralspadesyncbatch3x3`, `num_upsampling_layers = normal`,`use_vae = False` (no style encoder — the generator is deterministic given theinput), and **`semantic_nc = 3`**.
That `semantic_nc = 3` is the whole story of this cell. SPADE is a *semanticimage synthesis* model: upstream one-hot-encodes its "label" input into`label_nc` channels. A SAR chip is a real image, not a segmentation map, so werun with `--label_nc 0 --no_instance`, which upstream treats as an errorcondition. Stock SPADE therefore never constructs a generator with a 3-channelspatially-adaptive input and cannot load this file. The two discriminators(`num_D` 2) are not released.
## Training budget we used
| | ||---|---|| **generator updates released** | **120,000** || batch size | 16 || epochs (`niter` + `niter_decay`) | 60 + 60 || iterations per epoch | 1,000 (16,001 training pairs; this loader drops the last partial batch) || optimizer | Adam, lr 2e-4 with TTUR (`no_TTUR` off, so G runs at lr/2 and D at 2·lr), β₁ 0.0, β₂ 0.9 || adversarial loss | hinge GAN, multi-scale discriminator (`num_D` 2, `n_layers_D` 4) || feature-matching loss | λ_feat 10 || perceptual loss | VGG loss, λ_vgg 10 || initialisation | Xavier || augmentation | horizontal flip || input | 256 px (`resize_and_crop`, `load_size` 256, `crop_size` 256) |
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 90.7 | 0.292 | 0.599 | 0.320 | 14.53 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
**You need the image-to-image adaptation described below**, applied to theupstream repository, before this will run. With that in place, the generator canbe constructed directly:
```pythonimport numpy as np, torchfrom argparse import Namespacefrom PIL import Imagefrom models.networks.generator import SPADEGenerator # from the NVlabs/SPADE repo
opt = Namespace(semantic_nc=3, label_nc=0, no_instance=True, ngf=64, num_upsampling_layers='normal', norm_G='spectralspadesyncbatch3x3', crop_size=256, aspect_ratio=1.0, use_vae=False)G = SPADEGenerator(opt)G.load_state_dict(torch.load('net_G.pth', map_location='cpu'))G.eval()
sar = Image.open('sar.png').convert('RGB')x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): y = G(seg=x, z=None) # the SAR image goes in the 'seg' slot
eo = ((y[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
Through the repository's own `test.py`, the invocation is`--dataset_mode custom --label_nc 0 --no_instance --no_pairing_check` with theSAR directory as `--label_dir`. Note that the paired loader also demands an`--image_dir` even at test time, so a SAR-only run needs either a dummy EOdirectory or the direct generator call above.
## Read before using this checkpoint
**The five changes that make this cell exist.** These are a functionaladaptation, not compatibility fixes, and a reproducer must apply all of them:
1. `data/pix2pix_dataset.py` — when `label_nc == 0`, load the "label" through the *image* transform (`.convert('RGB')`, normalised to `[-1, 1]`) instead of nearest-neighbour resampling, ×255 and the `==255 → label_nc` remap. The SAR PNG is a real image.2. `models/pix2pix_model.py` — an early return in `preprocess_input()`: when `label_nc == 0`, skip the `.long()` cast and the `scatter_` one-hot encoding and pass the float image straight through as `input_semantics`. One-hot encoding a normalised float image is undefined.3. `options/base_options.py` — when `label_nc == 0`, force `opt.semantic_nc = 3 + (0 if no_instance else 1)`. Upstream computes `semantic_nc = label_nc + …`, i.e. 0 or 1, and would build a generator with a one-channel spatially-adaptive input.4. `models/networks/discriminator.py` — the discriminator input width becomes `(label_nc if label_nc > 0 else 3) + output_nc`, for the same reason on the discriminator side.5. `util/visualizer.py` — `tensor2label` is given `n_label=0` when `label_nc == 0` so it falls through to `tensor2im` instead of colour-mapping a real image as a label map; and `import scipy.misc` is guarded, since it was removed in SciPy ≥ 1.12.
Changes 1–4 change what the network *is*. **Without them this file does notload.**
* Normalisation is `[-1, 1]`.* `norm_G` uses synchronised batch normalisation; on a single device this behaves as ordinary batch norm, and `.eval()` is required.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually ⚠ non-commercial and share-alike
Upstream `NVlabs/SPADE` ships `LICENSE.md`, reproduced verbatim here as`licenses/LICENSE-spade.txt`. It is the full legal code of**Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International(CC BY-NC-SA 4.0)**. The copyright holder is named in the README rather than inthe licence file: *"Copyright (C) 2019 NVIDIA Corporation. All rights reserved.… The code is released for academic research use only. For commercial use orbusiness inquiries, please contact researchinquiries@nvidia.com."*
**This is the most restrictive licence in this repository, and two of its termstravel with this checkpoint:**
* **NonCommercial.** You may not use this checkpoint for commercial advantage or monetary compensation.* **ShareAlike.** If a trained checkpoint is Adapted Material — and we treat it as such — then any licence you apply when you pass it on must be a Creative Commons licence with the same elements, this version or later, or a BY-NC-SA compatible licence. **This cell is therefore distributed under CC BY-NC-SA 4.0**; it cannot sit under a permissive repository-wide weight licence, and neither can anything you derive from it.* The licence also states that patent and trademark rights are not licensed.* NVIDIA's academic-use-only statement in the README is an additional assertion beyond the CC text.
Attribution: *trained with `NVlabs/SPADE`. Copyright (C) 2019 NVIDIACorporation, all rights reserved. Licensed under CC BY-NC-SA 4.0; NVIDIAreleases the code for academic research use only (commercial enquiries:researchinquiries@nvidia.com). This checkpoint is therefore distributed underCC BY-NC-SA 4.0 — non-commercial, share-alike. Full text in`licenses/LICENSE-spade.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200# StegoGAN — QXS-SAROPT
**StegoGAN: Leveraging Steganography for Non-Bijective Image-to-ImageTranslation**, Wu, Chen, Mermet, Hurni, Schindler, Gonthier and Landrieu,*CVPR 2024*. Upstream code:[`sian-wusidi/StegoGAN`](https://github.com/sian-wusidi/StegoGAN) (the officialCVPR 2024 repository) at commit `cad61997c0f82793444f60f81298142b80cdf3c1`.
This is the mismatch-aware unpaired GAN we retrained ourselves on QXS-SAROPT,and it is the checkpoint behind the StegoGAN row of the ReFlowSET comparisontable. **Two things on this page are load-bearing: there is an oracle output youmust not use, and this cell fails our input-copy audit.**
We applied **no patches** to this repository. It is stock upstream at thatcommit.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G_A.pth` | 50,254,749 | **SAR → EO** (`resnet_9blocks_maskv1`) — the generator that produces the reported row || `net_G_B.pth` | 52,615,525 | EO → SAR (`resnet_9blocks_maskv3`), which also returns the mismatch mask; used to close the cycle in training, and **not needed for a prediction** |
Both generators are ResNet-style with instance normalisation, `ngf = 64`, builtwith `--resnet_layer 8 --fusionblock`. **Those two are architecture flags, nottraining options**: build the network without them and the state dict will notload.
`net_G_A` takes an **optional second argument**. That option is the whole reasonthis card has a warning section — see below.
## Training budget we used
| | ||---|---|| **data iterations released** | **120,030** || generator optimizer steps | 240,060 — see the note below || batch size | 4 || epochs (constant LR + linear decay) | 15 + 15 || iterations per epoch | 4,001 (16,001 training images, last batch not dropped) || optimizer | Adam, lr 2e-4, β₁ 0.5, linear decay to 0 over the second half || adversarial loss | LSGAN; discriminator `basic` (70×70 PatchGAN) || cycle losses | λ_A 10, λ_B 10 || identity loss | λ_identity 0.5 || consistency / regularisation | λ_consistency 1.0, λ_reg 0.3 || augmentation | horizontal flip || input | 256 px, no resize |
**Why two numbers.** StegoGAN's training step calls `optimizer_G.step()`**twice** off a single backward pass, so its optimizer-step count is exactlydouble its data-iteration count. We quote StegoGAN budgets in *data iterations*throughout this benchmark and note the 2× explicitly. Do not re-derive one cellthe other way — the family stops being comparable with itself.
## Measured on the QXS-SAROPT test set (n = 3,999, 256 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 106.8 | 0.384 | 0.658 | 0.254 | 12.96 |
Evaluated on the official split's 3,999 test chips at their native 256 px.No subsampling: every metric on this page is measured over all 3,999 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
Clone `sian-wusidi/StegoGAN` at the commit above and run this from its root.Check `define_G`'s signature in that repository first: StegoGAN adds`resnet_layer` and `fusionblock` keyword arguments that the junyanz original doesnot have.
```pythonimport numpy as np, torchfrom PIL import Imagefrom models.networks import define_G # from the StegoGAN repo
G_A = define_G(3, 3, 64, 'resnet_9blocks_maskv1', 'instance', use_dropout=False, init_type='normal', init_gain=0.02, gpu_ids=[], resnet_layer=8, fusionblock=True)G_A.load_state_dict(torch.load('net_G_A.pth', map_location='cpu'))G_A.eval()
sar = Image.open('sar.png').convert('RGB')x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): fake_B_clean = G_A(x) # ONE argument. Passing a second makes it an oracle.
eo = ((fake_B_clean[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
Through the repository's own `test.py` (`--model stego_gan --no_dropout--resnet_layer 8 --fusionblock`), outputs are written one directory per visual;**`fake_B_clean/` is the row on this page.**
## ⚠ `fake_B` is an oracle. `fake_B_clean` is the prediction.
The model computes two outputs:
```fake_B_clean = netG_A(real_A) # SAR onlyfake_B = netG_A(real_A, latent_real_B.detach()) # + a feature map of the GROUND TRUTH```
`latent_real_B` comes from `netG_B(real_B)` — the *target* EO image. `fake_B` istherefore conditioned on the answer and **cannot be produced at deployment**.Only `fake_B_clean` is a prediction, and every number on this page is`fake_B_clean`.
This is not hypothetical. Earlier in our own benchmarking the oracle was scored as"StegoGAN" for two days on a different dataset and topped every column at23.19 dB, against a true deployable value of 12.74 dB. **Any published StegoGANnumber must state which of the two it is.**
## ⚠ This cell fails the input-copy audit
We audit every cell for **identity collapse**: a model that has learned to passits input through rather than translate it. The test compares the mean absolutedistance from the generated image to the SAR **input** against the distance tothe EO **target**; a ratio below 1.0 means the output is closer to the input itwas given than to the answer it was asked for.
| quantity | value ||---|---|| mean \|generated − ground truth\| | 46.908 || mean \|generated − SAR input\| | 43.087 || **ratio** (SAR distance ÷ GT distance) | **0.919** — below 1.0 || verdict | **COLLAPSED** || cross-pair separation | 0.976 (cohort median 1.160) — no oracle behaviour |
**Read the metrics on this page with that in mind.** They are reported unchangedbecause they are what the released implementation does at its own publishedprotocol, and a benchmark that quietly substitutes a better-behaved variant isnot reporting the method. But they should not be read as translation quality.The separation figure is the companion check for the *opposite* failure: it isthe mean distance from a generated image to **other** images' ground truthdivided by the distance to its **own**, so a value well above the cohort medianwould indicate that ground-truth information had leaked into the generation.This cell sits at or below the median, so there is no leak — the problem here isinput-copying, and only input-copying.
## Read before using this checkpoint
* **`--resnet_layer 8` and `--fusionblock` must match training.** They change the architecture; omit them and the load fails.* **`test.py` rejects `--display_id`.** That flag is declared only in the train options. Passing it to `test.py` aborts with an unrecognised argument — and in a shell `&&` chain the cell then reports success with an empty output directory. This silently destroyed several of our own test passes once.* Build with `gpu_ids=[]`; the checkpoints have bare keys.* Normalisation is `[-1, 1]`.* StegoGAN is **unpaired**.
## Licence — stated factually ⚠ no upstream licence exists
**The upstream code base publishes no licence.**[`sian-wusidi/StegoGAN`](https://github.com/sian-wusidi/StegoGAN) — the officialCVPR 2024 repository — has no LICENSE, LICENCE, COPYING or NOTICE file at anydepth; **0 of its 52 tracked files** at the pinned commit are licence-shaped; itsREADME has no licence section; and the GitHub API reports no declared licence,with the `/license` endpoint returning 404. Checked 2026-08-28.
Under default copyright that means **all rights are reserved by the authors andno express permission to redistribute derived work has been granted** to us orto you. We publish this checkpoint anyway, so that the benchmark is reproducibleend to end, and we state the position plainly rather than implying a permissionthat does not exist. If you intend to redistribute this checkpoint or build onit, assess that for yourself, and consider asking the authors directly.
**What is known about the lineage.** StegoGAN's README thanks`junyanz/pytorch-CycleGAN-and-pix2pix`, and the parts of the tree that areunmodified CycleGAN carry that project's BSD notice, reproduced here as`licenses/LICENSE-cyclegan.txt`. **That notice does not extend to StegoGAN's owncontributions** — the mismatch-mask generators, the fusion block and theconsistency and regularisation losses, which are exactly what makes`net_G_A.pth` what it is.
Please cite: Wu, Chen, Mermet, Hurni, Schindler, Gonthier and Landrieu,*StegoGAN: Leveraging Steganography for Non-Bijective Image-to-ImageTranslation*, CVPR 2024.The full record of what we checked, per method, is in`licenses/NO-UPSTREAM-LICENSE.md` at the root of this repository.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on QXS-SAROPT; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138# BBDM — SAR2Opt
**BBDM: Image-to-Image Translation with Brownian Bridge Diffusion Models**, Li,Xue, Liu and Lai, *CVPR 2023*([arXiv:2205.07680](https://arxiv.org/abs/2205.07680)). Upstream code:[`xuekt98/BBDM`](https://github.com/xuekt98/BBDM) at commit`02c3b13c9f9dfab0853e32123100680a0640c4ed`.
This is the latent Brownian-bridge diffusion model we retrained ourselves onSAR2Opt, and it is the checkpoint behind the BBDM row of the ReFlowSETcomparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `last_model.pth` | 2,118,317,140 | the whole trained system — see below |
`last_model.pth` is a pickled dictionary, not a bare state dict. It holds:
* `['model']` — the full `LatentBrownianBridgeModel` state dict: the denoising UNet **and**, embedded inside it, the frozen vq-f4 VQGAN submodule;* `['ema']` — the EMA shadow weights. **Sampling uses these**, not `['model']`; the runner calls `apply_ema()` before generating;* `['step']` and `['epoch']`.
UNet: latent resolution 128×128, `model_channels` 128, `num_res_blocks` 2,attention at resolutions 32/16/8, `channel_mult` (1, 4, 8), 8 heads,64 channels per head, scale-shift normalisation, resblock up/downsampling.
The denoising UNet has `condition_key: nocond` — there is no separateconditioning branch, because in BBDM the SAR image *is* one endpoint of theBrownian bridge and the EO image is the other. The translation is the bridge,not a conditioner.
## Training budget we used
| | ||---|---|| **generator updates released** | **50,137** || batch size / resolution | 8 @ 512 px || iterations per epoch | 181 || epochs | 280 configured, capped by the step limit || optimizer | Adam, lr 1e-4, β₁ 0.9, no weight decay; `ReduceLROnPlateau` (factor 0.5, patience 3,000, min lr 5e-7) || EMA | decay 0.995, started at step 30,000, updated every 8 steps || bridge | `mt_type` linear, objective `grad`, L1 loss, T = 1,000, `max_var` 1.0 || sampler (test) | 200 skip-sampled steps, η = 1.0, `clip_denoised` off || latent space | CompVis **vq-f4** VQGAN, frozen (`embed_dim` 3, `n_embed` 8192) || horizontal flip | enabled (horizontal) |
The 50,137 rather than a round 50,000 is not a typo: the runner stops at the first epoch boundary past the step cap.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 143.1 | 0.290 | 0.590 | 0.276 | 15.29 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
There is no smaller entry point than the repository's own runner, because themodel is constructed with a VQGAN whose weights are loaded from a path in theconfig **even though the same weights are already inside `last_model.pth`**.You must have the CompVis latent-diffusion **vq-f4** checkpoint(`model.ckpt`, 756,175,527 bytes) on disk and pointed at by`model.VQGAN.params.ckpt_path`, or construction fails before any of this runs.
```bash# from the BBDM repository root, with a config whose data.dataset_config# points at your SAR / EO directories and whose VQGAN ckpt_path exists:python main.py -c configs/<your>-LBBDM-f4.yaml --gpu_ids 0 \ -r <output dir> --sample_to_eval --resume_model last_model.pth```
`--resume_model` sets `model.model_load_path`; the runner loads it with`torch.load(..., weights_only=False)`, restores the EMA shadow and applies itbefore sampling.
Outputs land in`<output dir>/<dataset_name>/LBBDM-f4/sample_to_eval/`,in three sibling directories: **`200/` holds the generated EO** (the name is the`sample_step` count), `condition/` holds the SAR inputs and `ground_truth/` holdsthe targets. Score `200/`.
## Read before using this checkpoint
* **Sampling must use the EMA weights.** `['model']` and `['ema']` are both in the file and they are different networks. The reported numbers are the EMA.* **You need the external vq-f4 VQGAN.** It is not redistributed here — it is CompVis latent-diffusion material with its own (MIT) licence, and the config requires it at construction time regardless.* **`torch.load` needs `weights_only=False`.** PyTorch �� 2.6 flipped that default; these are pickled Lightning-style checkpoints. We made that change in four places in the repository (`model/VQGAN/vqgan.py`, `runners/BaseRunner.py` twice, `runners/.../BBDMRunner.py`) and also removed a `verbose=True` kwarg from `ReduceLROnPlateau` that PyTorch 2.x no longer accepts. All four are compatibility fixes; none changes the maths.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `xuekt98/BBDM` ships a LICENSE file, reproduced verbatim here as`licenses/LICENSE-bbdm.txt`: the **MIT licence**, `Copyright (c) 2023 xuekt98`.
**Redistribution of these weights is permitted.** No non-commercial clause, noshare-alike clause.
One dependency note that is attribution, not restriction: this checkpoint cannotbe run without the CompVis latent-diffusion **vq-f4** VQGAN, which is MIT and is**not** redistributed here.
Attribution: *trained with `xuekt98/BBDM` (MIT, Copyright (c) 2023 xuekt98).Requires the CompVis latent-diffusion vq-f4 VQGAN (MIT,https://github.com/CompVis/latent-diffusion), which is not redistributed here.Full text in `licenses/LICENSE-bbdm.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155# cBBDM — SAR2Opt
**Conditional Brownian Bridge Diffusion Model for VHR SAR to Optical ImageTranslation**, Kim and Chung, *IEEE Geoscience and Remote Sensing Letters*, 2025([arXiv:2408.07947](https://arxiv.org/abs/2408.07947); the venue and year aretaken from the authors' own citation block — the repository records no DOI).Upstream code:[`egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical`](https://github.com/egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical)at commit `8ce15934f4d4e3f01efe70d11e2d9b9e0859210c`, a fork of[`xuekt98/BBDM`](https://github.com/xuekt98/BBDM).
This is the conditional Brownian-bridge latent diffusion model we retrainedourselves on SAR2Opt, and it is the checkpoint behind the cBBDM row of theReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `last_model.pth` | 2,118,345,622 | the whole trained system — see below |
`last_model.pth` is a pickled dictionary, not a bare state dict. It holds:
* `['model']` — the full `LatentBrownianBridgeModel` state dict: the denoising UNet **and**, embedded inside it, the frozen vq-f4 VQGAN submodule;* `['ema']` — the EMA shadow weights. **Sampling uses these**, not `['model']`; the runner calls `apply_ema()` before generating;* `['step']` and `['epoch']`.
UNet: latent resolution 128×128, `model_channels` 128, `num_res_blocks` 2,attention at resolutions 32/16/8, `channel_mult` (1, 4, 8), 8 heads,64 channels per head, scale-shift normalisation, resblock up/downsampling.
The denoising UNet differs from plain BBDM in exactly two ways, and they arethe method: **`in_channels` is 6, not 3**, and **`condition_key` is`SpatialRescaler`** — a small trained module that rescales the SAR latent andconcatenates it to the bridge state at every step, so the SAR conditioning isexplicit rather than implicit in the bridge endpoints. The SpatialRescaler istrained (it is in the model's parameter list) and is inside this file.
## Training budget we used
| | ||---|---|| **generator updates released** | **50,137** || batch size / resolution | 8 @ 512 px || iterations per epoch | 181 || epochs | 280 configured, capped by the step limit || optimizer | Adam, lr 1e-4, β₁ 0.9, no weight decay; `ReduceLROnPlateau` (factor 0.5, patience 3,000, min lr 5e-7) || EMA | decay 0.995, started at step 30,000, updated every 8 steps || bridge | `mt_type` linear, objective `grad`, L1 loss, T = 1,000, `max_var` 1.0 || sampler (test) | 200 skip-sampled steps, η = 1.0, `clip_denoised` off || latent space | CompVis **vq-f4** VQGAN, frozen (`embed_dim` 3, `n_embed` 8192) || horizontal flip | enabled (horizontal) |
The 50,137 rather than a round 50,000 is not a typo: the runner stops at the first epoch boundary past the step cap.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 222.3 | 0.377 | 0.571 | 0.361 | 17.05 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
There is no smaller entry point than the repository's own runner, because themodel is constructed with a VQGAN whose weights are loaded from a path in theconfig **even though the same weights are already inside `last_model.pth`**.You must have the CompVis latent-diffusion **vq-f4** checkpoint(`model.ckpt`, 756,175,527 bytes) on disk and pointed at by`model.VQGAN.params.ckpt_path`, or construction fails before any of this runs.
```bash# from the cBBDM repository root, with a config whose data.dataset_config# points at your SAR / EO directories and whose VQGAN ckpt_path exists:python main.py -c configs/<your>-cBBDM-f4.yaml --gpu_ids 0 \ -r <output dir> --sample_to_eval --resume_model last_model.pth```
`--resume_model` sets `model.model_load_path`; the runner loads it with`torch.load(..., weights_only=False)`, restores the EMA shadow and applies itbefore sampling.
Outputs land in`<output dir>/<dataset_name>/cBBDM-f4/sample_to_eval/`,in three sibling directories: **`200/` holds the generated EO** (the name is the`sample_step` count), `condition/` holds the SAR inputs and `ground_truth/` holdsthe targets. Score `200/`.
## Read before using this checkpoint
* **Sampling must use the EMA weights.** `['model']` and `['ema']` are both in the file and they are different networks. The reported numbers are the EMA.* **You need the external vq-f4 VQGAN.** It is not redistributed here — it is CompVis latent-diffusion material with its own (MIT) licence, and the config requires it at construction time regardless.* **`torch.load` needs `weights_only=False`.** PyTorch ≥ 2.6 flipped that default; these are pickled Lightning-style checkpoints. We made that change in four places in the repository (`model/VQGAN/vqgan.py`, `runners/BaseRunner.py` twice, `runners/.../BBDMRunner.py`) and also removed a `verbose=True` kwarg from `ReduceLROnPlateau` that PyTorch 2.x no longer accepts. All four are compatibility fixes; none changes the maths.* **A performance patch we applied, and when.** This fork regressed the DataLoader worker count from upstream BBDM's 8 to 0, which dominated wall-clock time (one 32-pair batch: 6.5 s serial versus 1.1 s across 8 threads). We restored `num_workers=8`. **Both cells published here were trained *before* that change, i.e. with 0 workers** — same data, same order, same step count, only slower. The numbers on this page are unaffected either way: worker count cannot change which samples the model sees.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical` ships a LICENSE file,reproduced verbatim here as `licenses/LICENSE-cbbdm.txt`: the **MIT licence**,`Copyright (c) 2025 egshkim`. Its README adds: *"The original source code islicensed under the MIT License, and this repository continues to comply with itsterms"* — the original being `xuekt98/BBDM`, also MIT(`licenses/LICENSE-bbdm.txt`).
**Redistribution of these weights is permitted.** No non-commercial clause, noshare-alike clause.
One dependency note that is attribution, not restriction: this checkpoint cannotbe run without the CompVis latent-diffusion **vq-f4** VQGAN, which is MIT and is**not** redistributed here.
Attribution: *trained with `egshkim/ConditionalBBDM-for-VHR-SAR-to-Optical`(MIT, Copyright (c) 2025 egshkim), a fork of `xuekt98/BBDM` (MIT, Copyright (c)2023 xuekt98). Requires the CompVis vq-f4 VQGAN (MIT,https://github.com/CompVis/latent-diffusion), not redistributed here. Full textsin `licenses/LICENSE-cbbdm.txt` and `licenses/LICENSE-bbdm.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166# C-DiffSET — SAR2Opt
**C-DiffSET: Leveraging Latent Diffusion for SAR-to-EO Image Translation withConfidence-Guided Reliable Object Generation**, Do, Lee, Lee and Kim,*IEEE Transactions on Circuits and Systems for Video Technology*, 2026([doi:10.1109/TCSVT.2026.3701447](https://doi.org/10.1109/TCSVT.2026.3701447),[arXiv:2411.10788](https://arxiv.org/abs/2411.10788)). Upstream code:[`KAIST-VICLab/C-DiffSET`](https://github.com/KAIST-VICLab/C-DiffSET).
This is the **stage-2 (confidence-guided) UNet** we retrained ourselves onSAR2Opt, and it is the checkpoint behind the C-DiffSET row of the ReFlowSETcomparison table.
## What is in this folder
A single `UNet2DConditionModel` (865,925,125 parameters, fp32, 686 tensors) withtwo channel modifications relative to stock SD 2.1-base:
* **`conv_in` 4 -> 8 channels.** The UNet is conditioned by channel concatenation in latent space, **SAR first**: `torch.cat([sar_latent, noisy_eo_latent], dim=1)`. The extra half was initialised by duplicating the pretrained kernel and halving it; in this trained checkpoint the two halves have clearly diverged (mean |w| 0.01517 on channels 0-3 vs 0.02702 on channels 4-7).* **`conv_out` 4 -> 5 channels.** Channels 0-3 are the usual epsilon prediction; channel 4 is a **raw spatial variance** used by the confidence-guided loss. It was zero-initialised and is no longer zero (mean |w| 0.03187), i.e. the head really trained. To turn it into a variance: `var = clamp(softplus(raw + c) + 1e-6, 1e-6, 10)` where the offset `c = log(exp(1 - 1e-6) - 1)` is the inverse softplus of the initial variance, and confidence is `1 / var`. **The scheduler must only ever see channels 0-3.**
There is no VAE, no text encoder and no scheduler here — take those from thebase model (below).
## Training budget we used
| | ||---|---|| optimizer updates released | **40,000** (fixed-step snapshot `checkpoint-40000`) || updates the run was configured for | 50,000 || initialised from | our own stage-1 checkpoint (the `sd21ft` folder's run, at its final 50,000-update state) || batch size / resolution | 16 @ 512 px || epochs the 40,000 updates work out to | ~444 (1,450 training pairs, 90 updates/epoch) || optimizer | AdamW, lr 3e-5, weight decay 0.01, cosine schedule, 100-step warmup || precision | fp32 (no mixed precision) || seed | 2024 || prediction type | epsilon, with the confidence-guided (Gaussian-NLL) loss || prompt | the fixed string `"electro-optical image"` || augmentation | horizontal flip, vertical flip, 90-degree rotation || test-time sampler | **DDIM, 50 steps**, fp32, one image at a time |
The budget is quoted in **optimizer updates**, not epochs, because the twodatasets have very different training-set sizes. Two things a readerreproducing this needs to know: the released snapshot is taken at update 40,000of a cosine schedule that was laid out for 50,000, so the learning rate had**not** finished decaying at that point; and we publish the fixed-step snapshotrather than the repository's validation-selected `best/`, because every othermethod in our comparison publishes its last checkpoint and selecting onvalidation PSNR would have been an asymmetry in C-DiffSET's favour.
Data: 512 px. The source images are 600 px and are **never resized**: training takes a random 512 crop, evaluation takes the centre 512 crop (offset 44). The EO/SAR pairing follows the official SAR2Opt layout (`trainB`/`testB` are EO, `trainA`/`testA` are SAR).
## Base model
This checkpoint is a derivative of **Stable Diffusion 2.1-base**. Because theoriginal `stabilityai/stable-diffusion-2-1-base` repository is no longeravailable on the Hub, our training and every snippet below load the communitymirror [`Manojb/stable-diffusion-2-1-base`](https://huggingface.co/Manojb/stable-diffusion-2-1-base).That is what we actually trained against — verified in the trainingconfiguration files, the launch scripts and the training logs, none of whichever reference `stabilityai/...`. The frozen VAE, CLIP text encoder, tokenizerand scheduler all come from that repo. A different SD 2.1-base mirror isexpected to work but has not been verified by us.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | KID↓ | DISTS↓ | LPIPS↓ | PSNR↑ | SSIM↑ ||---|---|---|---|---|---|| 78.1 | 0.0139 | 0.214 | 0.529 | 16.81 | 0.314 |
These are our own re-evaluation numbers, not numbers copied from any paper.LPIPS is **LPIPS-VGG on inputs mapped to [-1, 1]** (the `normalize=False`convention); the alternative [0, 1] convention gives a systematically differentnumber and the two must never be mixed. PSNR/SSIM are per-image torchmetricswith `data_range=1`; FID is `pytorch-fid` against the size-matched ground truth.
> **DISTS on this cell was re-measured.** This cell's prediction dump was regenerated after the only extended-metric pass that scored it, and that pass resumes on the *number* of images rather than their content, so its stored DISTS went stale. A full re-measurement of the current dump at n=627 gives the value printed above; the harness was validated on a cell that is not stale, whose DISTS it reproduces to 6e-6. PSNR, SSIM, FID and LPIPS come from the headline pass, which rescores every cell on every run.
## Load it and translate one SAR PNG
```pythonimport numpy as npimport torchfrom PIL import Imagefrom diffusers import UNet2DConditionModel, AutoencoderKL, DDIMSchedulerfrom transformers import CLIPTextModel, CLIPTokenizer
REPO = "JeonghyeokDo/ReFlowSET" # comparison cells live under baselines/BASE = "Manojb/stable-diffusion-2-1-base" # frozen VAE / text encoder / schedulerDEV, DT = "cuda", torch.float32
unet = UNet2DConditionModel.from_pretrained( REPO, subfolder="baselines/sar2opt/cdiffset", torch_dtype=DT).to(DEV).eval()vae = AutoencoderKL.from_pretrained(BASE, subfolder="vae", torch_dtype=DT).to(DEV).eval()tok = CLIPTokenizer.from_pretrained(BASE, subfolder="tokenizer")txt = CLIPTextModel.from_pretrained(BASE, subfolder="text_encoder", torch_dtype=DT).to(DEV).eval()sch = DDIMScheduler.from_pretrained(BASE, subfolder="scheduler")sch.set_timesteps(50, device=DEV)
# The fixed training prompt, tokenized exactly as in training (no padding).ids = tok("electro-optical image", padding="do_not_pad", max_length=tok.model_max_length, truncation=True, return_tensors="pt").input_ids.to(DEV)with torch.no_grad(): embed = txt(ids)[0]
# SAR input: 512x512 PNG -> RGB -> [-1, 1]. Do not resize; crop if needed.sar = Image.open("sar.png").convert("RGB")x = torch.from_numpy(np.array(sar)).permute(2, 0, 1)[None]x = (x.to(DEV, DT) / 255.0) * 2 - 1
with torch.no_grad(): sar_lat = vae.encode(x).latent_dist.mean * vae.config.scaling_factor # .mean, not .sample() eo_lat = torch.randn_like(sar_lat) for t in sch.timesteps: out = unet(torch.cat([sar_lat, eo_lat], 1), # SAR first, then the noisy EO latent t, encoder_hidden_states=embed).sample # channels 0-3 are epsilon; channel 4 is the raw variance and never # goes to the scheduler. eo_lat = sch.step(out[:, :4], t, eo_lat).prev_sample eo = vae.decode(eo_lat / vae.config.scaling_factor).sample eo = (eo * 0.5 + 0.5).clamp(0, 1)[0].cpu()
Image.fromarray((eo.permute(1, 2, 0).numpy() * 255).round().astype(np.uint8)).save("eo.png")```
The three things that silently produce a plausible-but-wrong image if you getthem backwards: the concatenation order is **SAR first**, only `out[:, :4]`reaches the scheduler, and the VAE must be read as `latent_dist.mean`, not`.sample()`.
## Licence status — stated factually
* **Training code:** MIT, `Copyright (c) 2026 KAIST VICLab` ([`KAIST-VICLab/C-DiffSET`](https://github.com/KAIST-VICLab/C-DiffSET) ships a LICENSE file).* **These weights:** they are a fine-tune of Stable Diffusion 2.1-base and are therefore a *Derivative of the Model* under the **CreativeML Open RAIL++-M** licence. The base repository we loaded declares `openrail++`. The **Attachment A use restrictions travel with these weights** — they bind you, and you must pass them on to anyone you redistribute to. The full text, including Attachment A, ships in this repository as `LICENSE-WEIGHTS.md`.
Attribution: *fine-tuned from Stable Diffusion 2.1-base (obtained as`Manojb/stable-diffusion-2-1-base`, a re-upload of`stabilityai/stable-diffusion-2-1-base`) with the training code of`KAIST-VICLab/C-DiffSET`. Do, Lee, Lee and Kim, "C-DiffSET", IEEE TCSVT 2026,doi:10.1109/TCSVT.2026.3701447.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint retrained by us on SAR2Opt; it is not ReFlowSET itself. Everycomparison method in the release was retrained by us on the same splits at thesame resolution, so the rows are directly comparable to each other.123456789101112131415161718192021222324252627282930313233343536373839404142434445{ "_class_name": "UNet2DConditionModel", "_diffusers_version": "0.10.0.dev0", "act_fn": "silu", "attention_head_dim": [ 5, 10, 20, 20 ], "block_out_channels": [ 320, 640, 1280, 1280 ], "center_input_sample": false, "cross_attention_dim": 1024, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "dual_cross_attention": false, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 8, "layers_per_block": 2, "mid_block_scale_factor": 1, "norm_eps": 1e-05, "norm_num_groups": 32, "num_class_embeds": null, "only_cross_attention": false, "out_channels": 5, "sample_size": 64, "up_block_types": [ "UpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D" ], "use_linear_projection": true}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175# Conditional Diffusion — SAR2Opt
**Conditional Diffusion for SAR to Optical Image Translation**, Bai, Pu and Xu,*IEEE Geoscience and Remote Sensing Letters*, 2023([doi:10.1109/LGRS.2023.3337143](https://doi.org/10.1109/LGRS.2023.3337143); theyear is the one in the authors' own citation block — a table that labels thisrow with a later issue year is referring to the same paper).
Upstream code:[`Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation`](https://github.com/Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation),a modified copy of [`openai/guided-diffusion`](https://github.com/openai/guided-diffusion).**The exact upstream commit is not recoverable** — see the licence section.
This is the pixel-space conditional diffusion model we retrained ourselves onSAR2Opt, and it is the checkpoint behind the Conditional Diffusion row of theReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `ema_final.pt` | 662,459,343 | EMA (decay 0.9999) of the UNet at update 50,000 — a **bare state dict**, no wrapper key |
`ema_final.pt` is the EMA of a **164.3 M-parameter guided-diffusion UNet**:`num_channels` 128, `num_res_blocks` 3, `learn_sigma` **False**, attention atresolutions 16 and 8. It is a plain `state_dict` — load it directly, with no`['model']` or `['ema']` indirection.
The QXS-SAROPT and SAR2Opt files differ in size (657,495,287 vs 662,459,343bytes) purely because of the 256 px versus 512 px positional and attentionbuffers; the parameter count is otherwise the same.
**Conditioning.** The SAR image is concatenated to the noisy state **noise-free**at every reverse step and at training time — that is the paper's claim, and thecode does exactly that.
## Training budget we used
| | ||---|---|| **generator updates released** | **50,000** || batch size / resolution | 6 @ 512 px || optimizer | Adam, **constant** lr 1e-4 with `--lr_anneal_steps 50000` (linear decay to zero, which is also the only stop mechanism in the released code) || EMA | decay 0.9999 || diffusion | T = 2,000, linear β schedule, eps-prediction, `learn_sigma` False || sampler (test) | **respaced DDPM, 250 steps**, `clip_denoised` on || augmentation | none — the released code has none || input | deterministic centre 512 crops of the 600 px tiles |
**The paper and the released code disagree about the learning-rate schedule.**The paper describes warmup plus cosine; the released code implements neither. Weran the code.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 211.8 | 0.415 | 0.686 | 0.248 | 12.48 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
```pythonimport torchfrom guided_diffusion.script_util import (create_model_and_diffusion, model_and_diffusion_defaults)
d = model_and_diffusion_defaults()d.update(image_size=512, num_channels=128, num_res_blocks=3, learn_sigma=False, diffusion_steps=2000, noise_schedule='linear', timestep_respacing='250')model, diffusion = create_model_and_diffusion(**d)model.load_state_dict(torch.load('ema_final.pt', map_location='cpu'))model.cuda().eval()
# sar: (1, 3, 512, 512) float tensor in [-1, 1]sample = diffusion.p_sample_loop(model, (1, 3, 512, 512), clip_denoised=True, model_kwargs={}, noise=None, condition=sar)```
The repository imports `blobfile` and `mpi4py` unconditionally; a single-processrun on a local filesystem needs either those packages or small local stand-ins on`PYTHONPATH`.
**Never pass `use_ddim=True`.** See below.
## Read before using this checkpoint
* **DDIM is broken upstream, and that is not a choice we made.** `p_sample_loop(..., condition=None, ...)` accepts and threads the SAR condition; `ddim_sample_loop(...)` has **no `condition` parameter at all**, so passing `--use_ddim True` raises `TypeError`. Sampling is respaced DDPM with 250 steps, which is also what the authors' own `sample.sh` uses.* **A correctness bug in the released sampler, which we fixed.** Upstream paired each SAR image with an EO image by **unsorted `os.listdir` position** — i.e. by filesystem order. Any number produced with the unpatched sampler is measured against effectively arbitrary ground truth. We sort both listings. If you reproduce this row from a clean upstream checkout, apply that fix or your metrics are meaningless.* **Three further changes we made**, all commented in place: the distributed-init helper no longer overwrites `CUDA_VISIBLE_DEVICES` (upstream pins rank % 8, which on a shared machine hijacks another user's device); the noise tensor for a partial last batch is shaped from the batch rather than from the `--batch_size` flag; and the sampler takes explicit input/output directories and builds its resize transform at run time, because the module-level transform hard-codes 256 px and would silently downsize the 512 px cell.* **The training loader requires integer filenames.** It sorts with `int(stem)`, so any non-numeric stem raises `ValueError`. Feed it an integer-named adapter directory and keep a manifest to map back to the real stems.* **Do not let the released 512 px path resize.** The fork's `center_crop_arr` *resizes* 600 → 512. We wrote deterministic centre-512 crops instead, to keep a crop-not-resize protocol across the whole benchmark.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually ⚠ no upstream licence exists
**The upstream code base publishes no licence.**[`Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation`](https://github.com/Coordi777/Conditional-Diffusion-for-SAR-to-Optical-Image-Translation)has no LICENSE, LICENCE, COPYING or NOTICE file anywhere in the tree we trainedfrom, no licence section in its README, and the GitHub API reports no declaredlicence, with the `/license` endpoint returning 404. Checked 2026-08-28.
Under default copyright that means **all rights are reserved by the authors andno express permission to redistribute derived work has been granted** to us orto you. We publish this checkpoint anyway and state the position plainly. Assessredistribution for yourself; consider asking the authors.
**A second gap, which is about reproducibility rather than licensing.** Ourvendored copy of this repository carries no version control and records noupstream URL inside its tree, so **the exact commit these weights were trainedfrom cannot be recovered**. A "clone upstream, then apply our patch" recipe istherefore not possible for this row.
**Lineage.** The README states the repository is based on`openai/guided-diffusion` with modifications, and the tree is visibly that codebase — OpenAI provenance comments survive in `guided_diffusion/logger.py` and`guided_diffusion/unet.py`. `openai/guided-diffusion` is **MIT**; the unmodifiedguided-diffusion parts carry that licence, which does **not** extend to theauthors' modifications. We do not ship the guided-diffusion licence text herebecause it is not vendored in the tree we trained from — take it from thatrepository if you need it, and make sure the copyright line you carry isOpenAI's rather than another project's MIT file.
**We modified the code further**, and say so as a matter of discipline ratherthan because any licence compels it: the four changes listed in the sectionabove, of which the sorted-listing fix is a correctness fix.
Please cite: Bai, Pu and Xu, *Conditional Diffusion for SAR to Optical ImageTranslation*, IEEE Geoscience and Remote Sensing Letters,[doi:10.1109/LGRS.2023.3337143](https://doi.org/10.1109/LGRS.2023.3337143).The full record of what we checked, per method, is in`licenses/NO-UPSTREAM-LICENSE.md` at the root of this repository.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128# ControlNet — SAR2Opt
**Adding Conditional Control to Text-to-Image Diffusion Models**, Zhang, Rao andAgrawala, *ICCV* 2023. The SAR image is the control signal and the baseStable Diffusion 2.1-base UNet stays frozen.
> **How our row was produced, precisely.** We trained with the> `examples/controlnet/train_controlnet.py` script from> [`huggingface/diffusers`](https://github.com/huggingface/diffusers)> (Apache-2.0, Copyright 2025 The HuggingFace Inc. team), initialising the> adapter with `ControlNetModel.from_unet` on SD 2.1-base. **No code from> `lllyasviel/ControlNet` was used.** The method is theirs; the implementation> is the diffusers one.
## What is in this folder
A complete diffusers `ControlNetModel` folder — `config.json` plus`diffusion_pytorch_model.safetensors` (364,228,240 parameters, fp32, 340tensors). It is the encoder half of the UNet plus the zero-convolutions and theconditioning embedder; it has no `up_blocks` and no `conv_out`, so **it cannotgenerate anything on its own** and must be paired with the base pipeline.
The conditioning input is 3-channel RGB (`conditioning_channels: 3`) withembedder widths `[16, 32, 96, 256]`; the SAR PNG is opened as RGB, so the threechannels are identical.
## Training budget we used
| | ||---|---|| optimizer updates | **50,000** || batch size / resolution | 8 @ 512 px || epochs the 50,000 updates work out to | ~276 (1,450 training pairs, 181 updates/epoch) || optimizer | AdamW, lr 1e-5, **constant** schedule (the script's default) || precision | bf16 mixed precision — the saved tensors are the fp32 master weights || seed | 42 || trainable parameters | the adapter only; the SD 2.1-base UNet, VAE and text encoder stayed frozen || prompt | the fixed string `"electro-optical image"` for every pair || augmentation | **none** — the diffusers trainer applies only `Resize(res)` + `CenterCrop(res)`, both no-ops at our input size, and no flips or rotations || test-time sampler | **UniPCMultistepScheduler, 50 steps, guidance scale 7.5**, bf16 |
Unlike the two UNet folders in this repository, this is **not** an SD 2.1fine-tune: the base weights were never updated, which is why only the 364 Madapter ships.
Reproduction note: our inference script creates **one** `torch.Generator`seeded 42 and reuses it across the whole test set in batches of 8,so a single image regenerated on its own will not be bit-identical to our dumpeven at the same seed. The conditioning image isthe SAR PNG opened as RGB and bilinearly resized to 512x512 (a no-op at ourevaluation resolution, since the SAR inputs are already 512 px).
Data: 512 px. The 600 px source images were pre-cropped to a deterministic **centre** 512 crop (offset 44) for both training and evaluation, and are **never resized**. So, unlike the C-DiffSET rows in this repository, this row trained on a fixed crop rather than a random one. The EO/SAR pairing follows the official SAR2Opt layout (`trainB`/`testB` are EO, `trainA`/`testA` are SAR).
## Base model
This checkpoint is a derivative of **Stable Diffusion 2.1-base**. Because theoriginal `stabilityai/stable-diffusion-2-1-base` repository is no longeravailable on the Hub, our training and every snippet below load the communitymirror [`Manojb/stable-diffusion-2-1-base`](https://huggingface.co/Manojb/stable-diffusion-2-1-base).That is what we actually trained against — verified in the trainingconfiguration files, the launch scripts and the training logs, none of whichever reference `stabilityai/...`. The frozen VAE, CLIP text encoder, tokenizerand scheduler all come from that repo. A different SD 2.1-base mirror isexpected to work but has not been verified by us.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | KID↓ | DISTS↓ | LPIPS↓ | PSNR↑ | SSIM↑ ||---|---|---|---|---|---|| 140.5 | 0.0480 | 0.350 | 0.643 | 11.73 | 0.217 |
These are our own re-evaluation numbers, not numbers copied from any paper.LPIPS is **LPIPS-VGG on inputs mapped to [-1, 1]** (the `normalize=False`convention); the alternative [0, 1] convention gives a systematically differentnumber and the two must never be mixed. PSNR/SSIM are per-image torchmetricswith `data_range=1`; FID is `pytorch-fid` against the size-matched ground truth.{}
## Load it and translate one SAR PNG
```pythonimport torchfrom PIL import Imagefrom diffusers import (ControlNetModel, StableDiffusionControlNetPipeline, UniPCMultistepScheduler)
REPO = "JeonghyeokDo/ReFlowSET" # comparison cells live under baselines/BASE = "Manojb/stable-diffusion-2-1-base"
controlnet = ControlNetModel.from_pretrained( REPO, subfolder="baselines/sar2opt/controlnet", torch_dtype=torch.bfloat16)pipe = StableDiffusionControlNetPipeline.from_pretrained( BASE, controlnet=controlnet, torch_dtype=torch.bfloat16, safety_checker=None).to("cuda")pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config)
sar = Image.open("sar.png").convert("RGB").resize((512, 512), Image.BILINEAR)eo = pipe("electro-optical image", image=sar, height=512, width=512, num_inference_steps=50, guidance_scale=7.5, generator=torch.Generator("cuda").manual_seed(42)).images[0]eo.save("eo.png")```
## Licence status — stated factually
* **Training code:** Apache-2.0. The trainer is `examples/controlnet/train_controlnet.py` from [`huggingface/diffusers`](https://github.com/huggingface/diffusers), `Copyright 2025 The HuggingFace Inc. team`; the Apache-2.0 grant is in the file header. Our copy of that script is four loose files rather than a full clone, so it carries no separate repository LICENSE file — the header is the grant.* **Method credit:** ControlNet (Zhang et al., ICCV 2023), [`lllyasviel/ControlNet`](https://github.com/lllyasviel/ControlNet), Apache-2.0. **No code from that repository was used in this row.*** **These weights:** initialised from Stable Diffusion 2.1-base via `ControlNetModel.from_unet`, so they are an SD 2.1 derivative under the **CreativeML Open RAIL++-M** licence (`openrail++`). The **Attachment A use restrictions travel with these weights**. Full text, including Attachment A, ships in this repository as `LICENSE-WEIGHTS.md`.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint retrained by us on SAR2Opt; it is not ReFlowSET itself. Everycomparison method in the release was retrained by us on the same splits at thesame resolution, so the rows are directly comparable to each other.1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556{ "_class_name": "ControlNetModel", "_diffusers_version": "0.37.1", "act_fn": "silu", "addition_embed_type": null, "addition_embed_type_num_heads": 64, "addition_time_embed_dim": null, "attention_head_dim": [ 5, 10, 20, 20 ], "block_out_channels": [ 320, 640, 1280, 1280 ], "class_embed_type": null, "conditioning_channels": 3, "conditioning_embedding_out_channels": [ 16, 32, 96, 256 ], "controlnet_conditioning_channel_order": "rgb", "cross_attention_dim": 1024, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "encoder_hid_dim": null, "encoder_hid_dim_type": null, "flip_sin_to_cos": true, "freq_shift": 0, "global_pool_conditions": false, "in_channels": 4, "layers_per_block": 2, "mid_block_scale_factor": 1, "mid_block_type": "UNetMidBlock2DCrossAttn", "norm_eps": 1e-05, "norm_num_groups": 32, "num_attention_heads": null, "num_class_embeds": null, "only_cross_attention": false, "projection_class_embeddings_input_dim": null, "resnet_time_scale_shift": "default", "transformer_layers_per_block": 1, "upcast_attention": false, "use_linear_projection": true}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172# CycleGAN — SAR2Opt
**Unpaired Image-to-Image Translation using Cycle-Consistent AdversarialNetworks**, Zhu, Park, Isola and Efros, *ICCV 2017*([arXiv:1703.10593](https://arxiv.org/abs/1703.10593)). Upstream code:[`junyanz/pytorch-CycleGAN-and-pix2pix`](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix)at commit `2a7afba2895d52556dd5dfe07e8555ef657ced6f`.
This is the unpaired cycle-consistent GAN we retrained ourselves on SAR2Opt,and it is the checkpoint behind the CycleGAN row of the ReFlowSET comparisontable. **It fails our input-copy audit — see the section below before you useor quote it.**
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G_A.pth` | 45,533,133 | **SAR → EO** — this is the translation direction the table reports || `net_G_B.pth` | 45,533,133 | EO → SAR, the reverse generator that closes the cycle; not used to produce any reported number |
Both are **`resnet_9blocks` generators** with instance normalisation,`ngf = 64`, 3 in / 3 out, dropout disabled. The direction assignment is not aconvention we chose: upstream's unaligned loader binds `A_paths` to the`trainA` / `testA` directory, which holds the SAR side, and the model computes`fake_B = netG_A(real_A)`. So **`net_G_A` is the SAR → EO generator**.
`net_G_B` is shipped because it is half of the trained system and someonereproducing the cycle needs it; it is not needed to reproduce our numbers. Thetwo discriminators are not released.
## Training budget we used
| | ||---|---|| **generator updates released** | **72,600** || batch size | 4 || epochs (constant LR + linear decay) | 100 + 100 || iterations per epoch | 363 (1,450 training images, the loader does not drop the last batch) || optimizer | Adam, lr 2e-4, β₁ 0.5, linear decay to 0 over the second half || adversarial loss | LSGAN; discriminator `basic` (70×70 PatchGAN) || cycle losses | λ_A 10, λ_B 10 || identity loss | λ_identity 0.5 || augmentation | horizontal flip || input | random 512 crops of the 600 px tiles |
Budgets are quoted in **optimizer updates**, never epochs. This is the singlemost important comparability rule for the unpaired methods in this benchmark:"100 + 100 epochs" is 72,600 updates on 1,450 images and 400,000+ on16,001, a difference that reads as budget-matched and is not.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 143.5 | 0.330 | 0.650 | 0.178 | 12.90 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
Clone `junyanz/pytorch-CycleGAN-and-pix2pix` at the commit above and run thisfrom its root. The model code is stock — we applied no patch to it.
```pythonimport numpy as np, torchfrom PIL import Imagefrom models.networks import define_G # from the junyanz repo
G_A = define_G(3, 3, 64, 'resnet_9blocks', 'instance', use_dropout=False, init_type='normal', init_gain=0.02, gpu_ids=[])sd = torch.load('net_G_A.pth', map_location='cpu')if hasattr(sd, '_metadata'): del sd._metadataG_A.load_state_dict(sd)G_A.eval()
sar = Image.open('sar.png').convert('RGB')sar = sar.crop(((600-512)//2, (600-512)//2, (600+512)//2, (600+512)//2))x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): y = G_A(x) # this is fake_B
eo = ((y[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
Upstream also supports a SAR-only run without this snippet:`test.py --model test --dataset_mode single --no_dropout --model_suffix _A`,which loads `latest_net_G_A.pth` directly.
## ⚠ This cell fails the input-copy audit
We audit every cell for **identity collapse**: a model that has learned to passits input through rather than translate it. The test compares the mean absolutedistance from the generated image to the SAR **input** against the distance tothe EO **target**; a ratio below 1.0 means the output is closer to the input itwas given than to the answer it was asked for.
| quantity | value ||---|---|| mean \|generated − ground truth\| | 50.812 || mean \|generated − SAR input\| | 40.415 || **ratio** (SAR distance ÷ GT distance) | **0.795** — below 1.0 || verdict | **COLLAPSED** || cross-pair separation | 0.885 (cohort median 1.088) — no oracle behaviour |
**Read the metrics on this page with that in mind.** They are reported unchangedbecause they are what the released implementation does at its own publishedprotocol, and a benchmark that quietly substitutes a better-behaved variant isnot reporting the method. But they should not be read as translation quality.The separation figure is the companion check for the *opposite* failure: it isthe mean distance from a generated image to **other** images' ground truthdivided by the distance to its **own**, so a value well above the cohort medianwould indicate that ground-truth information had leaked into the generation.This cell sits at or below the median, so there is no leak — the problem here isinput-copying, and only input-copying.
This is not a budget artefact on this dataset: a diagnostic control run of the same code at roughly 2.2× the budget still collapses (ratio 0.767). That control is not published here.
## Read before using this checkpoint
* **`net_G_A` is SAR → EO.** Loading `net_G_B` and expecting an EO image gives you the reverse mapping and a confusing result.* Build the network with `gpu_ids=[]` — the checkpoints have bare keys and a non-empty `gpu_ids` introduces a `module.` prefix the load will reject.* Normalisation is `[-1, 1]`.* CycleGAN is **unpaired**: it never saw a SAR/EO correspondence during training, only the two marginal distributions.
## Licence — stated factually
Same upstream, same LICENSE file as pix2pix; reproduced verbatim here as`licenses/LICENSE-cyclegan.txt` (byte-identical to `licenses/LICENSE-pix2pix.txt`— one file covers both methods upstream). It is three stacked notices:
* CycleGAN — `Copyright (c) 2017, Jun-Yan Zhu and Taesung Park` (BSD-2-Clause in form);* pix2pix — `Copyright (c) 2016, Phillip Isola and Jun-Yan Zhu`;* DCGAN — `Copyright (c) 2015, Facebook, Inc.` (BSD-3-Clause, with a no-endorsement clause).
**Redistribution of these weights is permitted** with the notice reproduced. Nonon-commercial and no share-alike clause. Do not use Facebook's name to promotethis release.
Attribution: *trained with `junyanz/pytorch-CycleGAN-and-pix2pix`. Copyright (c)2017, Jun-Yan Zhu and Taesung Park (CycleGAN); Copyright (c) 2016, Phillip Isolaand Jun-Yan Zhu (pix2pix); Copyright (c) 2015, Facebook, Inc. (DCGAN). All rightsreserved. Redistributed under the BSD terms reproduced in`licenses/LICENSE-cyclegan.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176# DDPM (SR3-class) — SAR2Opt
The **SR3 method class** — an eps-prediction conditional DDPM that conditions onthe source image — as introduced in *Image Super-Resolution via IterativeRefinement*, Saharia, Ho, Chan, Salimans, Fleet and Norouzi,*IEEE TPAMI 2022* ([arXiv:2104.07636](https://arxiv.org/abs/2104.07636)).
**Read this before citing the row: the code is not the SR3 authors'.** No codefrom any SR3 release was used. This cell is[`DeepSARRS/E3Diff`](https://github.com/DeepSARRS/E3Diff) at commit`38601093ab8f8e4b478144621f20890b100a3b74`, run in its **stage-1**configuration (`"stage": 1`), which is an SR3-class conditional DDPM. Weretrained it ourselves on SAR2Opt and it is the checkpoint behind the DDPMrow of the ReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `gen.pth` | 768,426,944 | the `sr3` UNet at iteration 250,000 — the whole model |
`gen.pth` is E3Diff's **`sr3` UNet**: `inner_channel` 64,`channel_multiplier` [1, 2, 4, 8, 16], `res_blocks` 1, `norm_groups` 16, **noattention** (`attn_res` is empty), 3 input channels, 3 output channels and a3-channel condition.
The condition is **not the raw SAR image alone**. It is a three-channel stack`[PPB, Canny, SAR]`:
* channel 0 — the SAR image after **FAST_PPB** speckle filtering (Deledalle 2009, P = 3, W = 10, h = 0.5), a GPU port of E3Diff's own `FAST_PPB.m`;* channel 1 — `cv2.Canny(ppb_uint8, 50, 150, L2gradient=True)` on that filtered image;* channel 2 — the raw SAR image.
**This row cannot be run from a SAR PNG alone**: the PPB and Canny images mustbe computed first.
## Training budget we used
| | ||---|---|| **generator updates released** | **250,000** || batch size / resolution | 4 @ 512 px || optimizer | Adam, lr 5e-5, constant (`MultiStepLR` with no milestones) || EMA | decay 0.9999, started at step 5,000, updated every step || diffusion (train) | T = 1,000, linear β from 1e-6 to 1e-2 || sampler (test) | **DDIM, 50 steps** || loss | plain eps-prediction MSE — the stage-2 auxiliary losses are all zero here (`lpips_w` 0, `fft_w` 0, `lambda_gan` 0) || augmentation | flips, 90° rotations, and a random brightness jitter applied to the SAR/PPB pair only (upstream's own `transform_augment`) |
Both datasets get the same 250,000 updates; the batch differs so that thepixels-per-update budget matches (16 × 256² = 4 × 512²).
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 122.5 | 0.295 | 0.610 | 0.313 | 13.65 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
This model cannot be driven from a bare SAR file: it needs the PPB and Cannycondition channels, and the E3Diff loader looks them up by filename. Build thecondition first, then run the repository's own entry point.
```python# 1. Build the condition channels for each SAR image, once.import cv2, numpy as np# ppb = FAST_PPB(sar, P=3, W=10, h=0.5) # Deledalle 2009; E3Diff ships FAST_PPB.m# canny = cv2.Canny(ppb.astype(np.uint8), 50, 150, L2gradient=True)# Write ppb and canny under <root>/val/SAR-PPB/<name> and <root>/val/SAR-canny/<name>,# alongside <root>/val/SAR/<name> and <root>/val/EO/<name>. Names must match exactly.
# 2. Run the repository, phase 'val', with a config whose# path.resume_state is the checkpoint PREFIX -- no '_gen.pth' suffix:# "path": {"resume_state": "<dir>/I250000_E<epoch>"} # place gen.pth as I250000_E<epoch>_gen.pth# "stage": 1,# "model": {"beta_schedule": {"val": {"n_timestep": 50, "ddim": 1, ...}}},# "datasets": {"val": {"data_len": -1, "r_resolution": 512}}# python main.py -c <val.json> -p val -enable_wandb "" --seed 1```
Two mechanical details that will otherwise cost you a full inference pass:
* the RGB loader. Upstream's `SAR2EODataset` hard-codes a **grayscale** EO target and a two-channel `[PPB, Canny]` condition. SAR2Opt's optical side is RGB, and with three channels upstream's `ddim_sample()` slices the condition to `condition_x[:, :3]` and concatenates it with 3-channel predictions, which raises on the first validation image. We ran through a small wrapper that patches `SAR2EODataset.__getitem__` **in memory** — returning `HR = EO[0:3]`, `LR = SAR[0:3]`, `SR = cat(PPB[0:1], Canny[0:1], SAR[0:1])` — and then executes the repository's `main.py` verbatim, so no upstream file is touched and every flag behaves the same. Reproduce that patch or write your own three-channel loader;* `-enable_wandb ""` is mandatory. The flag defaults to the string `'false'`, which is truthy.
## Read before using this checkpoint
* **The checkpoint loads with `strict=False`.** `model/model.py` calls `load_state_dict(..., strict=False)`, so a configuration that does not match the file **loads nothing and raises no error** — you get a fully random model and a plausible-looking run. Verify the `Loading pretrained model for G [...]` line in the log and eyeball the first output.* **`-p val` writes next to the checkpoint and then renames.** Images land in `<resume_state>/sample/`, and at the end the directory is renamed to `<resume_state>_S<ssim>_P<psnr>_l2<l2>_Lp<lpips>`. That rename **raises if the target already exists** — after the entire inference has been paid for. Guard for an existing `<prefix>_S*/sample` before starting.* **SoftPool.** The E3Diff code imports the SoftPool CUDA extension unconditionally. We used a pure-PyTorch drop-in with identical maths (`softpool(x) = avgpool(x·eˣ) / avgpool(eˣ)`) and identical autograd, which needs no build step. Either build the extension or write the equivalent.* **A known tone offset, inherited deliberately.** On another dataset in the wider campaign this exact configuration produced generations that were, on average, tens of gray levels brighter than the ground truth, at a substantial cost in PSNR. We did **not** correct it per dataset, because comparability across the row was judged worth more than per-cell tuning. Read this row's PSNR with that in mind.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually ⚠ no upstream licence exists
**The upstream code base publishes no licence.**[`DeepSARRS/E3Diff`](https://github.com/DeepSARRS/E3Diff), whose stage-1configuration this row is, has no LICENSE, LICENCE, COPYING or NOTICE file atany depth in its tree; only 1 of its 58 tracked files is licence-shaped and thatone is `SoftPool/LICENSE.txt`, the MIT licence of a **vendored third-partydependency** (`Copyright (c) 2020 Alexandros Stergiou`, reproduced here as`licenses/LICENSE-SoftPool-MIT.txt`) — not a grant for E3Diff. Its README has nolicence section, and the GitHub API reports no declared licence, with the`/license` endpoint returning 404. Checked 2026-08-28.
Under default copyright that means **all rights are reserved by the authors andno express permission to redistribute derived work has been granted** to us orto you. We publish this checkpoint anyway, so that the benchmark is reproducibleend to end, and we state the position plainly rather than implying a permissionthat does not exist. If you intend to redistribute this checkpoint or build onit, assess that for yourself, and consider asking the authors directly.
The code base credits SR3(`Janspiry/Image-Super-Resolution-via-Iterative-Refinement`, Apache-2.0),`GaParmar/img2img-turbo` (MIT) and `alexandrosstergiou/SoftPool` (MIT). Thoselicences cover the borrowed parts, not the authors' own contribution.
Please cite the SR3 paper for the method class, and E3Diff for the code thatproduced these weights: Qin, Zou, Li and Zhang, *Efficient End-to-End DiffusionModel for One-Step SAR-to-Optical Translation*, IEEE Geoscience and RemoteSensing Letters, [doi:10.1109/LGRS.2024.3506566](https://doi.org/10.1109/LGRS.2024.3506566).The full record of what we checked, per method, is in`licenses/NO-UPSTREAM-LICENSE.md` at the root of this repository.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179# E3Diff — SAR2Opt
**Efficient End-to-End Diffusion Model for One-Step SAR-to-OpticalTranslation**, Qin, Zou, Li and Zhang, *IEEE Geoscience and Remote SensingLetters*, 2024([doi:10.1109/LGRS.2024.3506566](https://doi.org/10.1109/LGRS.2024.3506566); theyear is the one in the authors' own citation block — a table that labels this rowwith a later issue year is referring to the same paper). Upstream code:[`DeepSARRS/E3Diff`](https://github.com/DeepSARRS/E3Diff) at commit`38601093ab8f8e4b478144621f20890b100a3b74`.
This is the authors' two-stage method, **retrained by us end to end** onSAR2Opt, and it is the checkpoint behind the E3Diff row of the ReFlowSETcomparison table.
**These are our weights, not the authors' released checkpoint.** The authors'own weights exist for a different dataset and are not what this row measures.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `gen.pth` | 768,426,944 | the `sr3` UNet after stage 2, at absolute iteration 310,000 |
Architecturally this is **the same network as the DDPM (SR3-class) row** in thisrepository — E3Diff's two stages share one UNet. What differs is the training:
* **stage 1** (250,000 updates) is the eps-prediction conditional DDPM. Its checkpoint is the `ddpm/` folder in this repository.* **stage 2** (60,000 further updates, absolute iteration 310,000) fine-tunes that same network into a **one-step generator**: the sampler is run *with gradients* from pure noise for `ddim_steps = 1`, and the loss is taken directly on pixels.
UNet: `inner_channel` 64, `channel_multiplier` [1, 2, 4, 8, 16], `res_blocks` 1,`norm_groups` 16, no attention, 3 in / 3 out, 3-channel condition.
The condition is the same three-channel `[PPB, Canny, SAR]` stack described onthe DDPM card: FAST_PPB speckle filtering (Deledalle 2009, P = 3, W = 10,h = 0.5), `cv2.Canny(ppb, 50, 150, L2gradient=True)`, and the raw SAR image.**This row cannot be run from a SAR PNG alone.**
## Training budget we used
| | ||---|---|| **generator updates released** | **250,000 (stage 1, inherited) + 60,000 (stage 2) = 310,000 absolute** || batch size / resolution | 4 @ 512 px || optimizer | Adam, lr 5e-5 || stage-2 sampler during training | DDIM, **1 step**, run with gradients from pure noise || stage-2 losses | L1 on pixels, + LPIPS (weight 5), + focal-frequency (weight 10), + a vision-aided CLIP GAN (λ_gan 0.5) || stage-1 losses | plain eps-prediction MSE (all auxiliary weights zero) || sampler (test) | **DDIM, 1 step** || EMA | decay 0.9999 (stage 1) || augmentation | flips, 90° rotations, and a random brightness jitter on the SAR/PPB pair (upstream's `transform_augment`) |
The stage-2 budget is 24 % of the stage-1 budget, which follows the authors' ownratio (they resume at 640,000 and run to 800,000). Note that `n_iter` in thiscode base is an **absolute** step count continuing stage 1, not a stage-2budget — a config that reads 310,000 buys 60,000 new iterations.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 104.7 | 0.232 | 0.529 | 0.249 | 16.09 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
Same entry point and same mechanics as the DDPM row, with `"stage": 2` and`ddim_steps: 1`.
```python# 1. Build the condition channels for each SAR image, once:# ppb = FAST_PPB(sar, P=3, W=10, h=0.5)# canny = cv2.Canny(ppb.astype('uint8'), 50, 150, L2gradient=True)# written to <root>/val/SAR-PPB/<name> and <root>/val/SAR-canny/<name>,# alongside <root>/val/SAR/<name> and <root>/val/EO/<name>.
# 2. Run phase 'val' with a config whose path.resume_state is the checkpoint# PREFIX -- no '_gen.pth' suffix -- and place gen.pth as <prefix>_gen.pth:# "stage": 2, "ddim_steps": 1,# "model": {"beta_schedule": {"val": {"n_timestep": 1, "ddim": 1, ...}}},# "datasets": {"val": {"data_len": -1, "r_resolution": 512}}# python main.py -c <val.json> -p val -enable_wandb "" --seed 1```
Sampling is genuinely one network evaluation per image, which is the point ofthe method.
As on the DDPM card, the RGB loader is the one thing you must sort out: upstreamhard-codes a grayscale EO target and a two-channel condition, and with threechannels its `ddim_sample()` slices the condition and concatenates mismatchedshapes. We patched `SAR2EODataset.__getitem__` in memory to return`HR = EO[0:3]`, `LR = SAR[0:3]`, `SR = cat(PPB[0:1], Canny[0:1], SAR[0:1])` andthen ran the repository's `main.py` verbatim.
## Read before using this checkpoint
* **This is not an oracle.** Worth stating, because a one-step generator invites the question: the sampler's `condition_x` is the `[PPB, Canny, SAR]` stack, and the ground truth never enters it. The cell also passes our leak audit on both datasets.* **Stage 2 needs the *real* vision-aided CLIP discriminator.** Stage 1 has `lambda_gan = 0` and can import a stub; stage 2 cannot. If a constant-output stub shadows the real `vision_aided_loss` package, stage 2 trains against a constant GAN loss and **silently is not the authors' method**. Assert on `vision_aided_loss.__file__` before starting a run.* **SoftPool.** The code imports the SoftPool CUDA extension unconditionally. We used a pure-PyTorch drop-in with identical maths (`softpool(x) = avgpool(x·eˣ) / avgpool(eˣ)`) and identical autograd, which needs no build step.* **The checkpoint loads with `strict=False`.** A mismatched configuration **loads nothing and raises no error**. Verify the `Loading pretrained model for G [...]` log line and look at the first output.* **`-p val` writes next to the checkpoint and then renames** the sample directory to `<prefix>_S<ssim>_P<psnr>_l2<l2>_Lp<lpips>`. That rename raises if the target already exists — after the whole inference has been paid for.* **`-enable_wandb ""` is mandatory**; the flag defaults to the truthy string `'false'`.* One change we made to the repository: `core/logger.py` no longer unconditionally overwrites `CUDA_VISIBLE_DEVICES` from the config's `gpu_ids`, which on a shared machine remapped every job onto another user's device. It is a scheduling fix and does not affect the model.
## Licence — stated factually ⚠ no upstream licence exists
**The upstream code base publishes no licence.**[`DeepSARRS/E3Diff`](https://github.com/DeepSARRS/E3Diff) has no LICENSE,LICENCE, COPYING or NOTICE file at the repository root or at any depth; **1 ofits 58 tracked files** is licence-shaped, and it is `SoftPool/LICENSE.txt`, theMIT licence of a **vendored third-party dependency** (`Copyright (c) 2020Alexandros Stergiou`, reproduced here as `licenses/LICENSE-SoftPool-MIT.txt`) —not a grant covering E3Diff. Its README has no licence section, and the GitHubAPI reports no declared licence, with the `/license` endpoint returning 404.Checked 2026-08-28.
Under default copyright that means **all rights are reserved by the authors andno express permission to redistribute derived work has been granted** to us orto you. We publish this checkpoint anyway, so that the benchmark is reproducibleend to end, and we state the position plainly rather than implying a permissionthat does not exist. If you intend to redistribute this checkpoint or build onit, assess that for yourself, and consider asking the authors directly.
**Lineage.** E3Diff's README credits SR3(`Janspiry/Image-Super-Resolution-via-Iterative-Refinement`, Apache-2.0),`GaParmar/img2img-turbo` (MIT) and `alexandrosstergiou/SoftPool` (MIT). Thoselicences cover the borrowed parts only, not the authors' own two-stagecontribution. We ship only the SoftPool text, because it is the only one of thethree that is vendored in the tree we trained from.
Please cite: Qin, Zou, Li and Zhang, *Efficient End-to-End Diffusion Model forOne-Step SAR-to-Optical Translation*, IEEE Geoscience and Remote SensingLetters, [doi:10.1109/LGRS.2024.3506566](https://doi.org/10.1109/LGRS.2024.3506566).The full record of what we checked, per method, is in`licenses/NO-UPSTREAM-LICENSE.md` at the root of this repository.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164# HI-Diff — SAR2Opt
**Hierarchical Integration Diffusion Model for Realistic Image Deblurring**,Chen, Zhang, Liu, Kong and Yuan, *NeurIPS 2023*([arXiv:2305.12966](https://arxiv.org/abs/2305.12966)). Upstream code:[`zhengchen1999/HI-Diff`](https://github.com/zhengchen1999/HI-Diff) at commit`b3bfd167997e27f8edd57681cf70e5031a0e35f2`.
This is the two-stage latent-prior restoration transformer we retrainedourselves on SAR2Opt (SAR as the degraded input, EO as the target), and it isthe checkpoint behind the HI-Diff row of the ReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `S1_net_g_latest.pth` | 101,401,457 | stage-1 restoration transformer — for reproducing stage-2 *training*, not for inference || `S1_net_le_latest.pth` | 2,357,509 | stage-1 latent encoder, `in_chans` **6** (it sees LQ ‖ GT) — **not usable at test time** || `S2_net_d_latest.pth` | 10,530,491 | **the 8-step latent denoiser** — needed at inference || `S2_net_g_latest.pth` | 101,401,457 | **the final restoration transformer** — needed at inference || `S2_net_le_dm_latest.pth` | 2,247,061 | **the stage-2 latent encoder**, `in_chans` 3 (LQ only) — needed at inference |
**Only the three `S2_*` files are needed to run this model.** The repository'sown test configuration loads exactly `pretrain_network_g`,`pretrain_network_le_dm` and `pretrain_network_d`, and nothing else. The two`S1_*` files are shipped so that stage-2 *training* can be reproduced: stage 1learns a latent prior from the LQ **and** the ground truth together, which is whyits encoder takes 6 input channels and cannot be used at deployment.
Architecture: the transformer is Restormer-shaped — `dim` 48, blocks[3, 5, 6, 6], 4 refinement blocks, heads [1, 2, 4, 8], FFN expansion 2.66,`embed_dim` 64, `group` 4. The latent denoiser runs **8 timesteps** on thecompressed prior (`linear_start` 0.1, `linear_end` 0.99) — the diffusion hereacts on a small latent prior, not on the image.
## Training budget we used
| | ||---|---|| **generator updates released** | **25,000 (stage 1) + 25,000 (stage 2) = 50,000** || batch size / patch | 8 @ 256 px || optimizer | AdamW, lr 2e-4, weight decay 1e-4, β (0.9, 0.999), gradient clipping on || schedule | `CosineAnnealingRestartCyclicLR`, periods [8,000 / 17,000], η_min [2e-4, 1e-6] || loss | L1 || progressive training | **disabled** || test resolution | trained on random 256 px crops and **tested at 512 px** — the network is fully convolutional, so the test resolution is not the training resolution for this cell |
The upstream recipe is 300,000 + 300,000 iterations with a progressivepatch/batch schedule from 128 to 384 px. We disabled the progressive schedule(a single fixed 256 px group) and matched the budget to the rest of thisbenchmark's diffusion band at 50,000 total updates. That is a substantialreduction from the authors' recipe and is stated here so nobody reads this rowas HI-Diff at full budget.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 319.8 | 0.473 | 0.692 | 0.384 | 17.36 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
The three networks must be assembled by hand; the repository's own `test.py`with a `HI_Diff_S2` option file is the path of least resistance.
```yaml# options/test/<your>.yml -- the three paths below are the three S2_ filesmodel_type: HI_Diff_S2network_g: {type: Transformer, inp_channels: 3, out_channels: 3, dim: 48, num_blocks: [3,5,6,6], num_refinement_blocks: 4, heads: [1,2,4,8], ffn_expansion_factor: 2.66, bias: False, LayerNorm_type: WithBias, dual_pixel_task: False, embed_dim: 64, group: 4}network_le_dm: {type: latent_encoder_gelu, in_chans: 3, embed_dim: 64, block_num: 6, group: 4, stage: 2, patch_expansion: 0.5, channel_expansion: 4}network_d: {type: denoising, in_channel: 256, out_channel: 256, inner_channel: 512, block_num: 4, group: 4, patch_expansion: 0.5, channel_expansion: 2}diffusion_schedule: {apply_ldm: False, schedule: linear, timesteps: 8, linear_start: 0.1, linear_end: 0.99}path: pretrain_network_g: S2_net_g_latest.pth pretrain_network_le_dm: S2_net_le_dm_latest.pth pretrain_network_d: S2_net_d_latest.pth param_key_g: params```
```bashpython test.py -opt options/test/<your>.yml```
The SAR input is read with `cv2.IMREAD_COLOR`, so a single-channel SAR image isreplicated to three channels automatically — that is what training saw. Atinference `le_dm` produces the prior from the degraded input alone, `net_d`denoises that prior over 8 steps, and `net_g` is conditioned on it.
## Read before using this checkpoint
* **The `S1_*` files are not an inference path.** `S1_net_le_latest.pth` has `in_chans: 6` because stage 1 encodes LQ concatenated with the ground truth. Wiring it into a test run would make the model an oracle. Use the `S2_*` trio.* **These are the `latest` checkpoints — iteration 25,000 — not a best-validation selection.** That is deliberate and benchmark-wide: every other method here publishes its last checkpoint, so selecting on validation for this one would be an asymmetry in its favour. Do not repoint at a best-val file and then compare against this table.* **Retraining is destructive.** The upstream launcher path is not idempotent: the training configs set `resume_state: ~`, no auto-resume flag is passed, and basicsr's `mkdir_and_rename` archives a finished experiment directory and starts from scratch. Re-running a training script over a finished experiment destroys it.* **`torch.load` needs `weights_only=False`** under PyTorch ≥ 2.6; we made that change in two places in the repository (`hi_diff/utils/base_model.py` and `train.py`). Both are compatibility fixes.* **How to read this row's numbers.** HI-Diff takes the best PSNR and SSIM of any method in this benchmark on both datasets, while sitting at or near the worst FID, DISTS and LPIPS. That combination is the signature of regression-to-the-mean: a blurred, low-variance prediction minimises squared error and is perceptually poor. Reporting its PSNR without its FID would badly misrepresent it — and so would the reverse.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `zhengchen1999/HI-Diff` ships a LICENSE file, reproduced verbatim hereas `licenses/LICENSE-hidiff.txt`: the **Apache License 2.0**, appendix copyrightline `Copyright 2023 HI-Diff Authors`.
**Redistribution of these weights is permitted.** Apache-2.0 §4 obligationsapply: ship the licence, keep the notices, and **state that you modified thefiles**. We did modify them — the two `torch.load(..., weights_only=False)`changes noted above, plus our own option files — and this sentence is thatstatement. Upstream ships no NOTICE file, so there is none to carry. Apache-2.0§6 withholds trademark rights.
HI-Diff itself builds on BasicSR, Restormer and DiffIR, which its READMEcredits; those projects' own licences cover their code.
Attribution: *trained with `zhengchen1999/HI-Diff`, Copyright 2023 HI-DiffAuthors, licensed under the Apache License 2.0; our training and testconfigurations modify the upstream configuration, and two source files weremodified for PyTorch ≥ 2.6 compatibility. HI-Diff builds on BasicSR, Restormerand DiffIR. Full text in `licenses/LICENSE-hidiff.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145# pix2pixHD — SAR2Opt
**High-Resolution Image Synthesis and Semantic Manipulation with ConditionalGANs**, Wang, Liu, Zhu, Tao, Kautz and Catanzaro, *CVPR 2018*([arXiv:1711.11585](https://arxiv.org/abs/1711.11585)). Upstream code:[`NVIDIA/pix2pixHD`](https://github.com/NVIDIA/pix2pixHD) at commit`14b3b3c7fff413086e3b58df52096f16b6891172`.
This is the coarse-to-fine paired GAN we retrained ourselves on SAR2Opt, andit is the checkpoint behind the pix2pixHD row of the ReFlowSET comparisontable.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G.pth` | 729,795,505 | the global generator, and the only file inference needs |
`net_G.pth` is the **`global` generator** (`GlobalGenerator`):`n_downsample_global` 4, `n_blocks_global` 9 residual blocks, `ngf = 64`,instance normalisation, 3 in / 3 out. The run was configured with`n_local_enhancers 1`, but at `netG=global` the local enhancer is neverconstructed and is not in this file — this is the single-scale generator.
The run used `--label_nc 0 --no_instance`, i.e. the "label" input is a realimage (the SAR chip) rather than a segmentation map, and no instance-edgechannel is concatenated. The two discriminators (`num_D` 2) are not released.
## Training budget we used
| | ||---|---|| **generator updates released** | **36,200** || batch size | 8 || epochs (`niter` + `niter_decay`) | 100 + 100 || iterations per epoch | 181 (1,450 training pairs; this loader floor-rounds, unlike the junyanz loaders which round up) || optimizer | Adam, lr 2e-4, β₁ 0.5, linear decay over the second half || adversarial loss | LSGAN, multi-scale discriminator (`num_D` 2, `n_layers_D` 3) || feature-matching loss | λ_feat 10 || perceptual loss | VGG loss enabled || augmentation | horizontal flip || input | random 512 crops of the 600 px tiles (`crop`, `loadSize` 600, `fineSize` 512) |
The floor-vs-ceiling detail is not pedantry: pix2pixHD and SPADE drop the lastpartial batch while the junyanz-family loaders do not, so the same "epochs"figure yields slightly different update counts across the table. The updatecounts above are what actually ran.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 146.3 | 0.283 | 0.567 | 0.268 | 15.95 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
`GlobalGenerator` can be constructed directly, without the repository's optionmachinery:
```pythonimport numpy as np, torch, torch.nn as nnfrom PIL import Imagefrom models.networks import GlobalGenerator # from the NVIDIA/pix2pixHD repo
G = GlobalGenerator(3, 3, 64, 4, 9, nn.InstanceNorm2d)G.load_state_dict(torch.load('net_G.pth', map_location='cpu'))G.eval()
sar = Image.open('sar.png').convert('RGB')sar = sar.crop(((600-512)//2, (600-512)//2, (600+512)//2, (600+512)//2))x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): y = G(x)
eo = ((y[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
Through the repository's own `test.py` the equivalent invocation is`--label_nc 0 --no_instance --which_epoch latest`, and the output lands as`<stem>_synthesized_image.png`.
## Read before using this checkpoint
* **Upstream writes its test outputs as JPEG.** `util/visualizer.py` hard-codes `'%s_%s.jpg'`. We changed that one line to `.png` before scoring, because every other method in this benchmark writes PNG and JPEG re-compression would have biased FID and LPIPS for this row alone. **If you clone upstream unmodified and evaluate, your numbers will not match ours**, and the gap is an artefact of the file format, not of the model.* Three further changes we made to the repository are pure Python-3.12 / modern-library compatibility and do not affect the weights: `transforms.Scale` → `transforms.Resize`; `fractions.gcd` → `math.gcd` with integer division; and a guarded `import scipy.misc` (needed only for `--tf_log`, which we never pass).* Normalisation is `[-1, 1]`.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `NVIDIA/pix2pixHD` ships `LICENSE.txt`, reproduced verbatim here as`licenses/LICENSE-p2phd.txt`. It contains two notices:
* `Copyright (C) 2019 NVIDIA Corporation. Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu. BSD License. All rights reserved.` — two conditions and a disclaimer;* the bundled `pytorch-CycleGAN-and-pix2pix` notice, `Copyright (c) 2017, Jun-Yan Zhu and Taesung Park`, because pix2pixHD's code borrows heavily from it.
**Redistribution of these weights is permitted** with both notices reproduced.Despite NVIDIA's non-commercial licensing of some of its other releases, thisone carries **no non-commercial clause and no share-alike clause** — we checkedthe file and the README, and the README has no licence section at all, so`LICENSE.txt` is the entire grant.
Attribution: *trained with `NVIDIA/pix2pixHD`. Copyright (C) 2019 NVIDIACorporation — Ting-Chun Wang, Ming-Yu Liu, Jun-Yan Zhu. BSD License, all rightsreserved; includes the bundled pytorch-CycleGAN-and-pix2pix notice (Copyright(c) 2017, Jun-Yan Zhu and Taesung Park). Full text in`licenses/LICENSE-p2phd.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144# pix2pix — SAR2Opt
**Image-to-Image Translation with Conditional Adversarial Networks**, Isola, Zhu,Zhou and Efros, *CVPR 2017* ([arXiv:1611.07004](https://arxiv.org/abs/1611.07004)).Upstream code:[`junyanz/pytorch-CycleGAN-and-pix2pix`](https://github.com/junyanz/pytorch-CycleGAN-and-pix2pix)at commit `2a7afba2895d52556dd5dfe07e8555ef657ced6f`.
This is the paired conditional GAN we retrained ourselves on SAR2Opt, and itis the checkpoint behind the pix2pix row of the ReFlowSET comparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G.pth` | 217,728,293 | the generator, and the only file inference needs |
`net_G.pth` is a **`unet_256` generator**: a U-Net with batch normalisation,`ngf = 64`, 3 input channels and 3 output channels, saved from a single-GPU runso the state-dict keys are bare (no `module.` prefix). It maps **SAR → EO**:the training set was built as side-by-side `A|B` tiles with SAR on the left, andthe run used `--direction AtoB`.
The discriminator is not part of this release — upstream's `test.py` constructsonly the generator, so `net_G.pth` is sufficient to reproduce every image wescored.
## Training budget we used
| | ||---|---|| **generator updates released** | **36,400** || batch size | 8 || epochs (constant LR + linear decay) | 100 + 100 || iterations per epoch | 182 (1,450 training pairs, the loader does not drop the last batch) || optimizer | Adam, lr 2e-4, β₁ 0.5, linear decay to 0 over the second half || adversarial loss | vanilla GAN; discriminator `basic` (70×70 PatchGAN, `n_layers_D` 3) || reconstruction loss | L1, weight 100 || augmentation | horizontal flip || input | random 512 crops of the 600 px tiles (`resize_and_crop`, `load_size` 600, `crop_size` 512) |
We quote budgets in **optimizer updates**, never in epochs: the two datasetsdiffer by more than 10× in size, so "200 epochs" means something completelydifferent on each and would silently favour one of them.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 261.9 | 0.347 | 0.657 | 0.199 | 13.39 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
The snippet uses the upstream repository's own `define_G`, so clone`junyanz/pytorch-CycleGAN-and-pix2pix` at the commit above and run this from itsroot. No patch is needed for this method — our only change to that repository wasan import fix in the dataset-preparation helper, which does not affect the model.
```pythonimport numpy as np, torchfrom PIL import Imagefrom models.networks import define_G # from the junyanz repo
G = define_G(3, 3, 64, 'unet_256', 'batch', use_dropout=False, init_type='normal', init_gain=0.02, gpu_ids=[])sd = torch.load('net_G.pth', map_location='cpu')if hasattr(sd, '_metadata'): del sd._metadata # upstream strips this tooG.load_state_dict(sd)G.eval()
# SAR input -> RGB -> [-1, 1]. SAR2Opt SAR is single-channel; .convert('RGB')# replicates it to three channels, which is what training saw.sar = Image.open('sar.png').convert('RGB')sar = sar.crop(((600-512)//2, (600-512)//2, (600+512)//2, (600+512)//2))x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): y = G(x)
eo = ((y[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
The image this produces is `<stem>_fake_B.png` in upstream's own `test.py`output tree, which is exactly what we scored.
## Read before using this checkpoint
* **`define_G` must be called with `gpu_ids=[]`.** Our checkpoints were saved from single-GPU runs and have bare keys; building the network with a non-empty `gpu_ids` wraps it in `DataParallel` and the load then fails on a `module.` prefix mismatch.* **The normalisation is `[-1, 1]`, not `[0, 1]`.** Feeding `[0, 1]` produces a plausible-looking but systematically wrong image.* This row is a **paired** method and was trained on aligned SAR/EO pairs. It passes the identity-collapse audit on both datasets.
## Licence — stated factually
Upstream `junyanz/pytorch-CycleGAN-and-pix2pix` ships a LICENSE file, reproducedverbatim in this repository as `licenses/LICENSE-pix2pix.txt`. It is **not asingle SPDX licence** but three stacked notices, and the whole file is whattravels with these weights:
* CycleGAN — `Copyright (c) 2017, Jun-Yan Zhu and Taesung Park`, two conditions and a disclaimer (BSD-2-Clause in form);* pix2pix — `Copyright (c) 2016, Phillip Isola and Jun-Yan Zhu`, two conditions;* DCGAN — `Copyright (c) 2015, Facebook, Inc.`, three conditions including a no-endorsement clause (BSD-3-Clause).
**Redistribution of these weights is permitted** with that notice reproduced.There is no non-commercial and no share-alike clause. The DCGAN section'sno-endorsement clause means Facebook's name must not be used to promote thisrelease.
Attribution: *trained with `junyanz/pytorch-CycleGAN-and-pix2pix`. Copyright (c)2017, Jun-Yan Zhu and Taesung Park (CycleGAN); Copyright (c) 2016, Phillip Isolaand Jun-Yan Zhu (pix2pix); Copyright (c) 2015, Facebook, Inc. (DCGAN). All rightsreserved. Redistributed under the BSD terms reproduced in`licenses/LICENSE-pix2pix.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146# ResShift — SAR2Opt
**ResShift: Efficient Diffusion Model for Image Super-Resolution by ResidualShifting**, Yue, Wang and Loy, *NeurIPS 2023*([arXiv:2307.12348](https://arxiv.org/abs/2307.12348)). Upstream code:[`zsyOAOA/ResShift`](https://github.com/zsyOAOA/ResShift) at commit`bb03b7d21614cace01787e097c8a6ab6b945227d`.
This is the residual-shifting latent diffusion model we retrained ourselves onSAR2Opt, run as a **same-size** mapping (`sf = 1`: SAR in, EO out, noupscaling), and it is the checkpoint behind the ResShift row of the ReFlowSETcomparison table.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `ema_model.pth` | 478,392,663 | EMA weights of the denoising UNet at iteration 50,000 |
`ema_model.pth` is the EMA (rate 0.999) of a **`models.unet.UNetModelSwin`**:latent resolution 64, `model_channels` 160, `channel_mult` [1, 2, 2, 4],`num_res_blocks` [2, 2, 2, 2], attention at [64, 32, 16, 8], 32 channels perhead, Swin blocks of depth 2 with `swin_embed_dim` 192 and window size 8,`cond_lq = True`, `lq_size = 256`.
**This is a latent-space model and this file is not sufficient to run it.** Itadditionally needs the external CompVis **vq-f4** autoencoder(`ldm.models.autoencoder.VQModelTorch`, 221,364,711 bytes), which is **not**redistributed here.
## Training budget we used
| | ||---|---|| **generator updates released** | **50,000** || batch size | 16 (micro-batch 8, i.e. 2 gradient-accumulation steps per update) || optimizer | Adam, lr 5e-5 → 2e-5 cosine, 2,000-step warmup, no weight decay || EMA | rate 0.999 || diffusion | **4 steps**, exponential noise schedule (power 0.3), `etas_end` 0.99, `min_noise_level` 0.2, κ = 2.0, `predict_type` xstart, `sf` 1 || loss weights | latent MSE 1.0, pixel LPIPS (AlexNet) 4.0, pixel MSE 0.0 || precision | AMP on || training crops | random 256 px, normalised with mean 0.5 / std 0.5 || seed | 123456 |
ResShift is a **4-step** sampler by construction; that is the method, not ashortcut we took.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 141.7 | 0.304 | 0.597 | 0.177 | 14.31 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
Upstream's `inference_resshift.py` is a super-resolution CLI keyed to theauthors' own released tasks and does not accept a SAR→EO configuration. We wrotea small driver against the repository's `ResShiftSampler`; the equivalent is:
```pythonfrom omegaconf import OmegaConffrom sampler import ResShiftSampler # from the zsyOAOA/ResShift repo
cfg = OmegaConf.load('<your>_sar2eo_256.yaml') # sf 1, steps 4, predict_type xstartcfg.model.ckpt_path = 'ema_model.pth'cfg.autoencoder.ckpt_path = '<path to>/autoencoder_vq_f4.pth' # NOT shipped here
sampler = ResShiftSampler(cfg, sf=1, chop_size=256, chop_stride=256, chop_bs=1, use_amp=True, seed=12345, padding_offset=None)sampler.inference('<dir of SAR images>', '<output dir>', bs=8, noise_repeat=False)```
At 512 px each input is processed as four clean 256 px tiles (`chop_size = chop_stride = lq_size = 256`, so the tiles do not overlap). Outputs keep the input file stems.
## Read before using this checkpoint
* **The external vq-f4 autoencoder is mandatory and is not in this repository.** Without it the model cannot be constructed, let alone run. It is CompVis latent-diffusion material under its own (MIT) licence.* **Upstream's own inference CLI will not drive these weights.** It is written around the authors' released super-resolution tasks. Use the sampler directly, as above.* **xFormers must be disabled.** On the accelerator we trained on, the installed xFormers build has no usable kernel for these shapes (attention head dimension 512 exceeds its limit, and fp32 is unsupported), so we set `XFORMERS_IS_AVAILBLE = False` in three files (`ldm/modules/attention.py`, `ldm/modules/diffusionmodules/model.py`, `models/unet.py`). If your hardware differs, this is a performance switch, not a correctness one.* **One numerical guard in the image logger.** fp16 diffused latents decoded through the fp32 VQGAN produce NaN/Inf at early iterations and crashed training *inside the logging path*. We added a `nan_to_num` + `clamp` before `make_grid`. It is logging-only; the loss path is untouched. (A separate `nan_to_num` on the LPIPS loss is upstream's, not ours.)* **There is no auto-resume.** A crash mid-run needs a manual relaunch pointing at the last saved checkpoint.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually ⚠ non-commercial
Upstream `zsyOAOA/ResShift` ships a LICENSE file, reproduced verbatim here as`licenses/LICENSE-resshift.txt`: the **S-Lab License 1.0**,`Copyright 2022 S-Lab`.
**This licence is non-commercial.** Its opening clause reads *"Redistributionand use **for non-commercial purpose** in source and binary forms, with orwithout modification, are permitted provided that the following conditions aremet"*, and it adds that commercial use requires contacting the contributors. TheREADME repeats it: *"This project is licensed under NTU S-Lab License 1.0.Redistribution and use should follow this license."*
So: **redistribution of these weights is permitted for non-commercial purposesonly**, in binary form, with the copyright notice, the conditions and thedisclaimer reproduced — which is what `licenses/LICENSE-resshift.txt` is for.Clause 3 is a **no-endorsement** clause: neither S-Lab's name nor itscontributors' names may be used to endorse or promote this release.
Attribution: *trained with `zsyOAOA/ResShift`, Copyright 2022 S-Lab, **S-LabLicense 1.0 — redistribution and use for non-commercial purposes only**; forcommercial use, contact the contributors. Requires the CompVis vq-f4autoencoder (MIT), not redistributed here. Neither S-Lab's name nor itscontributors' names may be used to endorse this release. Full text in`licenses/LICENSE-resshift.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158# SD2.1 fine-tune only — SAR2Opt
The **"SD2.1 fine-tune only"** ablation row of the ReFlowSET comparison table:Stable Diffusion 2.1-base fine-tuned for SAR-to-EO translation with a plain MSEepsilon loss and **no confidence head**.
> **This is not a stock SD 2.1 UNet and it will not load into a stock SD 2.1> pipeline.** It is C-DiffSET **stage 1**: the input convolution is widened to> 8 channels so the SAR latent can be concatenated to the noisy EO latent. Only> the output side is unmodified.
Venue: there is no separate paper for this row. The backbone is StableDiffusion 2.1-base (latent diffusion, Rombach et al., CVPR 2022); the traineris the stage-1 trainer of[`KAIST-VICLab/C-DiffSET`](https://github.com/KAIST-VICLab/C-DiffSET)(*IEEE TCSVT* 2026, [doi:10.1109/TCSVT.2026.3701447](https://doi.org/10.1109/TCSVT.2026.3701447)).
## What is in this folder
A single `UNet2DConditionModel` (865,922,244 parameters, fp32, 686 tensors):
* **`conv_in` 4 -> 8 channels**, exactly as in the C-DiffSET folder — the input is `torch.cat([sar_latent, noisy_eo_latent], dim=1)`, **SAR first**. In this trained checkpoint the two halves have diverged (mean |w| 0.01545 on channels 0-3 vs 0.02596 on channels 4-7).* **`conv_out` unchanged at 4 channels.** No variance head, no confidence map. The stage-1 trainer explicitly overrides the channel surgery to a no-op, and the whole 4-channel prediction goes to the scheduler.
That 5-vs-4 output channel count is the only architectural difference from the`cdiffset` folder in this repository; the parameter counts differ by exactly2,881 (one 320x3x3 filter plus one bias).
## Training budget we used
| | ||---|---|| optimizer updates released | **40,000** (fixed-step snapshot `checkpoint-40000`) || updates the run was configured for | 50,000 || initialised from | the SD 2.1-base UNet with the duplicated-and-halved 8-channel `conv_in` || batch size / resolution | 16 @ 512 px || epochs the 40,000 updates work out to | ~444 (1,450 training pairs, 90 updates/epoch) || optimizer | AdamW, lr 3e-5, weight decay 0.01, cosine schedule, 100-step warmup || precision | fp32 (no mixed precision) || seed | 2024 || loss | plain MSE on the epsilon prediction || prompt | the fixed string `"electro-optical image"` || augmentation | horizontal flip, vertical flip, 90-degree rotation || test-time sampler | **DDIM, 50 steps**, fp32, one image at a time |
Same two caveats as the C-DiffSET folder: the snapshot is taken at update 40,000of a cosine schedule laid out for 50,000, so the learning rate had not finisheddecaying; and it is a fixed-step snapshot, not the repository'svalidation-selected `best/`. For this stage the fixed-step choice is also thebetter one on the merits — validation LPIPS bottoms out near update 41,000 andthen degrades toward 50,000.
Data: 512 px. The source images are 600 px and are **never resized**: training takes a random 512 crop, evaluation takes the centre 512 crop (offset 44). The EO/SAR pairing follows the official SAR2Opt layout (`trainB`/`testB` are EO, `trainA`/`testA` are SAR).
## Base model
This checkpoint is a derivative of **Stable Diffusion 2.1-base**. Because theoriginal `stabilityai/stable-diffusion-2-1-base` repository is no longeravailable on the Hub, our training and every snippet below load the communitymirror [`Manojb/stable-diffusion-2-1-base`](https://huggingface.co/Manojb/stable-diffusion-2-1-base).That is what we actually trained against — verified in the trainingconfiguration files, the launch scripts and the training logs, none of whichever reference `stabilityai/...`. The frozen VAE, CLIP text encoder, tokenizerand scheduler all come from that repo. A different SD 2.1-base mirror isexpected to work but has not been verified by us.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | KID↓ | DISTS↓ | LPIPS↓ | PSNR↑ | SSIM↑ ||---|---|---|---|---|---|| 71.8 | 0.0090 | 0.211 | 0.541 | 16.24 | 0.293 |
These are our own re-evaluation numbers, not numbers copied from any paper.LPIPS is **LPIPS-VGG on inputs mapped to [-1, 1]** (the `normalize=False`convention); the alternative [0, 1] convention gives a systematically differentnumber and the two must never be mixed. PSNR/SSIM are per-image torchmetricswith `data_range=1`; FID is `pytorch-fid` against the size-matched ground truth.
> **DISTS on this cell was re-measured.** This cell's prediction dump was regenerated after the only extended-metric pass that scored it, and that pass resumes on the *number* of images rather than their content, so its stored DISTS went stale. A full re-measurement of the current dump at n=627 gives the value printed above; the harness was validated on a cell that is not stale, whose DISTS it reproduces to 6e-6. PSNR, SSIM, FID and LPIPS come from the headline pass, which rescores every cell on every run.
## Load it and translate one SAR PNG
```pythonimport numpy as npimport torchfrom PIL import Imagefrom diffusers import UNet2DConditionModel, AutoencoderKL, DDIMSchedulerfrom transformers import CLIPTextModel, CLIPTokenizer
REPO = "JeonghyeokDo/ReFlowSET" # comparison cells live under baselines/BASE = "Manojb/stable-diffusion-2-1-base" # frozen VAE / text encoder / schedulerDEV, DT = "cuda", torch.float32
unet = UNet2DConditionModel.from_pretrained( REPO, subfolder="baselines/sar2opt/sd21ft", torch_dtype=DT).to(DEV).eval()vae = AutoencoderKL.from_pretrained(BASE, subfolder="vae", torch_dtype=DT).to(DEV).eval()tok = CLIPTokenizer.from_pretrained(BASE, subfolder="tokenizer")txt = CLIPTextModel.from_pretrained(BASE, subfolder="text_encoder", torch_dtype=DT).to(DEV).eval()sch = DDIMScheduler.from_pretrained(BASE, subfolder="scheduler")sch.set_timesteps(50, device=DEV)
# The fixed training prompt, tokenized exactly as in training (no padding).ids = tok("electro-optical image", padding="do_not_pad", max_length=tok.model_max_length, truncation=True, return_tensors="pt").input_ids.to(DEV)with torch.no_grad(): embed = txt(ids)[0]
# SAR input: 512x512 PNG -> RGB -> [-1, 1]. Do not resize; crop if needed.sar = Image.open("sar.png").convert("RGB")x = torch.from_numpy(np.array(sar)).permute(2, 0, 1)[None]x = (x.to(DEV, DT) / 255.0) * 2 - 1
with torch.no_grad(): sar_lat = vae.encode(x).latent_dist.mean * vae.config.scaling_factor # .mean, not .sample() eo_lat = torch.randn_like(sar_lat) for t in sch.timesteps: out = unet(torch.cat([sar_lat, eo_lat], 1), # SAR first, then the noisy EO latent t, encoder_hidden_states=embed).sample eo_lat = sch.step(out, t, eo_lat).prev_sample # all 4 channels; no variance head eo = vae.decode(eo_lat / vae.config.scaling_factor).sample eo = (eo * 0.5 + 0.5).clamp(0, 1)[0].cpu()
Image.fromarray((eo.permute(1, 2, 0).numpy() * 255).round().astype(np.uint8)).save("eo.png")```
The two things that silently produce a plausible-but-wrong image if you getthem backwards: the concatenation order is **SAR first**, and the VAE must beread as `latent_dist.mean`, not `.sample()`.
## Licence status — stated factually
* **Training code:** MIT, `Copyright (c) 2026 KAIST VICLab` (the stage-1 trainer of [`KAIST-VICLab/C-DiffSET`](https://github.com/KAIST-VICLab/C-DiffSET)). The row is named after Stable Diffusion, but no stabilityai code was used and no stabilityai repository was loaded.* **These weights:** a fine-tune of Stable Diffusion 2.1-base, hence a *Derivative of the Model* under the **CreativeML Open RAIL++-M** licence (`openrail++`). The **Attachment A use restrictions travel with these weights** and must be passed on to anyone you redistribute to. Full text, including Attachment A, ships in this repository as `LICENSE-WEIGHTS.md`.
Attribution: *fine-tuned from Stable Diffusion 2.1-base (obtained as`Manojb/stable-diffusion-2-1-base`, a re-upload of`stabilityai/stable-diffusion-2-1-base`) using the stage-1 trainer of`KAIST-VICLab/C-DiffSET`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint retrained by us on SAR2Opt; it is not ReFlowSET itself. Everycomparison method in the release was retrained by us on the same splits at thesame resolution, so the rows are directly comparable to each other.123456789101112131415161718192021222324252627282930313233343536373839404142434445{ "_class_name": "UNet2DConditionModel", "_diffusers_version": "0.10.0.dev0", "act_fn": "silu", "attention_head_dim": [ 5, 10, 20, 20 ], "block_out_channels": [ 320, 640, 1280, 1280 ], "center_input_sample": false, "cross_attention_dim": 1024, "down_block_types": [ "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "CrossAttnDownBlock2D", "DownBlock2D" ], "downsample_padding": 1, "dual_cross_attention": false, "flip_sin_to_cos": true, "freq_shift": 0, "in_channels": 8, "layers_per_block": 2, "mid_block_scale_factor": 1, "norm_eps": 1e-05, "norm_num_groups": 32, "num_class_embeds": null, "only_cross_attention": false, "out_channels": 4, "sample_size": 64, "up_block_types": [ "UpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D", "CrossAttnUpBlock2D" ], "use_linear_projection": true}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179# SPADE — SAR2Opt
**Semantic Image Synthesis with Spatially-Adaptive Normalization**, Park, Liu,Wang and Zhu, *CVPR 2019* ([arXiv:1903.07291](https://arxiv.org/abs/1903.07291)).Upstream code: [`NVlabs/SPADE`](https://github.com/NVlabs/SPADE) at commit`fecacc920c1367a038995c45a39c15f6521ca64f`.
This is the spatially-adaptive-normalisation generator we retrained ourselves onSAR2Opt, and it is the checkpoint behind the SPADE row of the ReFlowSETcomparison table.
**This checkpoint will not load into a clean clone of `NVlabs/SPADE`.** Read thenext two sections before trying.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G.pth` | 368,775,707 | the SPADE generator, and the only file inference needs |
`net_G.pth` is a **`SPADEGenerator`**: `ngf = 64`,`norm_G = spectralspadesyncbatch3x3`, `num_upsampling_layers = normal`,`use_vae = False` (no style encoder — the generator is deterministic given theinput), and **`semantic_nc = 3`**.
That `semantic_nc = 3` is the whole story of this cell. SPADE is a *semanticimage synthesis* model: upstream one-hot-encodes its "label" input into`label_nc` channels. A SAR chip is a real image, not a segmentation map, so werun with `--label_nc 0 --no_instance`, which upstream treats as an errorcondition. Stock SPADE therefore never constructs a generator with a 3-channelspatially-adaptive input and cannot load this file. The two discriminators(`num_D` 2) are not released.
## Training budget we used
| | ||---|---|| **generator updates released** | **36,200** || batch size | 8 || epochs (`niter` + `niter_decay`) | 100 + 100 || iterations per epoch | 181 (1,450 training pairs; this loader drops the last partial batch) || optimizer | Adam, lr 2e-4 with TTUR (`no_TTUR` off, so G runs at lr/2 and D at 2·lr), β₁ 0.0, β₂ 0.9 || adversarial loss | hinge GAN, multi-scale discriminator (`num_D` 2, `n_layers_D` 4) || feature-matching loss | λ_feat 10 || perceptual loss | VGG loss, λ_vgg 10 || initialisation | Xavier || augmentation | horizontal flip || input | random 512 crops of the 600 px tiles (`crop`, `load_size` 600, `crop_size` 512) |
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 142.5 | 0.265 | 0.597 | 0.234 | 14.47 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
**You need the image-to-image adaptation described below**, applied to theupstream repository, before this will run. With that in place, the generator canbe constructed directly:
```pythonimport numpy as np, torchfrom argparse import Namespacefrom PIL import Imagefrom models.networks.generator import SPADEGenerator # from the NVlabs/SPADE repo
opt = Namespace(semantic_nc=3, label_nc=0, no_instance=True, ngf=64, num_upsampling_layers='normal', norm_G='spectralspadesyncbatch3x3', crop_size=512, aspect_ratio=1.0, use_vae=False)G = SPADEGenerator(opt)G.load_state_dict(torch.load('net_G.pth', map_location='cpu'))G.eval()
sar = Image.open('sar.png').convert('RGB')sar = sar.crop(((600-512)//2, (600-512)//2, (600+512)//2, (600+512)//2))x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): y = G(seg=x, z=None) # the SAR image goes in the 'seg' slot
eo = ((y[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
Through the repository's own `test.py`, the invocation is`--dataset_mode custom --label_nc 0 --no_instance --no_pairing_check` with theSAR directory as `--label_dir`. Note that the paired loader also demands an`--image_dir` even at test time, so a SAR-only run needs either a dummy EOdirectory or the direct generator call above.
## Read before using this checkpoint
**The five changes that make this cell exist.** These are a functionaladaptation, not compatibility fixes, and a reproducer must apply all of them:
1. `data/pix2pix_dataset.py` — when `label_nc == 0`, load the "label" through the *image* transform (`.convert('RGB')`, normalised to `[-1, 1]`) instead of nearest-neighbour resampling, ×255 and the `==255 → label_nc` remap. The SAR PNG is a real image.2. `models/pix2pix_model.py` — an early return in `preprocess_input()`: when `label_nc == 0`, skip the `.long()` cast and the `scatter_` one-hot encoding and pass the float image straight through as `input_semantics`. One-hot encoding a normalised float image is undefined.3. `options/base_options.py` — when `label_nc == 0`, force `opt.semantic_nc = 3 + (0 if no_instance else 1)`. Upstream computes `semantic_nc = label_nc + …`, i.e. 0 or 1, and would build a generator with a one-channel spatially-adaptive input.4. `models/networks/discriminator.py` — the discriminator input width becomes `(label_nc if label_nc > 0 else 3) + output_nc`, for the same reason on the discriminator side.5. `util/visualizer.py` — `tensor2label` is given `n_label=0` when `label_nc == 0` so it falls through to `tensor2im` instead of colour-mapping a real image as a label map; and `import scipy.misc` is guarded, since it was removed in SciPy ≥ 1.12.
Changes 1–4 change what the network *is*. **Without them this file does notload.**
* Normalisation is `[-1, 1]`.* `norm_G` uses synchronised batch normalisation; on a single device this behaves as ordinary batch norm, and `.eval()` is required.* Passes the identity-collapse audit on both datasets.
## Licence — stated factually ⚠ non-commercial and share-alike
Upstream `NVlabs/SPADE` ships `LICENSE.md`, reproduced verbatim here as`licenses/LICENSE-spade.txt`. It is the full legal code of**Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International(CC BY-NC-SA 4.0)**. The copyright holder is named in the README rather than inthe licence file: *"Copyright (C) 2019 NVIDIA Corporation. All rights reserved.… The code is released for academic research use only. For commercial use orbusiness inquiries, please contact researchinquiries@nvidia.com."*
**This is the most restrictive licence in this repository, and two of its termstravel with this checkpoint:**
* **NonCommercial.** You may not use this checkpoint for commercial advantage or monetary compensation.* **ShareAlike.** If a trained checkpoint is Adapted Material — and we treat it as such — then any licence you apply when you pass it on must be a Creative Commons licence with the same elements, this version or later, or a BY-NC-SA compatible licence. **This cell is therefore distributed under CC BY-NC-SA 4.0**; it cannot sit under a permissive repository-wide weight licence, and neither can anything you derive from it.* The licence also states that patent and trademark rights are not licensed.* NVIDIA's academic-use-only statement in the README is an additional assertion beyond the CC text.
Attribution: *trained with `NVlabs/SPADE`. Copyright (C) 2019 NVIDIACorporation, all rights reserved. Licensed under CC BY-NC-SA 4.0; NVIDIAreleases the code for academic research use only (commercial enquiries:researchinquiries@nvidia.com). This checkpoint is therefore distributed underCC BY-NC-SA 4.0 — non-commercial, share-alike. Full text in`licenses/LICENSE-spade.txt`.*
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205# StegoGAN — SAR2Opt
**StegoGAN: Leveraging Steganography for Non-Bijective Image-to-ImageTranslation**, Wu, Chen, Mermet, Hurni, Schindler, Gonthier and Landrieu,*CVPR 2024*. Upstream code:[`sian-wusidi/StegoGAN`](https://github.com/sian-wusidi/StegoGAN) (the officialCVPR 2024 repository) at commit `cad61997c0f82793444f60f81298142b80cdf3c1`.
This is the mismatch-aware unpaired GAN we retrained ourselves on SAR2Opt,and it is the checkpoint behind the StegoGAN row of the ReFlowSET comparisontable. **Two things on this page are load-bearing: there is an oracle output youmust not use, and this cell fails our input-copy audit.**
We applied **no patches** to this repository. It is stock upstream at thatcommit.
## What is in this folder
| file | bytes | what it is ||---|---|---|| `net_G_A.pth` | 50,254,749 | **SAR → EO** (`resnet_9blocks_maskv1`) — the generator that produces the reported row || `net_G_B.pth` | 52,615,525 | EO → SAR (`resnet_9blocks_maskv3`), which also returns the mismatch mask; used to close the cycle in training, and **not needed for a prediction** |
Both generators are ResNet-style with instance normalisation, `ngf = 64`, builtwith `--resnet_layer 8 --fusionblock`. **Those two are architecture flags, nottraining options**: build the network without them and the state dict will notload.
`net_G_A` takes an **optional second argument**. That option is the whole reasonthis card has a warning section — see below.
## Training budget we used
| | ||---|---|| **data iterations released** | **87,000** || generator optimizer steps | 174,000 — see the note below || batch size | 2 || epochs (constant LR + linear decay) | 60 + 60 || iterations per epoch | 725 (1,450 training images, last batch not dropped) || optimizer | Adam, lr 2e-4, β₁ 0.5, linear decay to 0 over the second half || adversarial loss | LSGAN; discriminator `basic` (70×70 PatchGAN) || cycle losses | λ_A 10, λ_B 10 || identity loss | λ_identity 0.5 || consistency / regularisation | λ_consistency 1.0, λ_reg 0.3 || augmentation | horizontal flip || input | random 512 crops of the 600 px tiles |
**Why two numbers.** StegoGAN's training step calls `optimizer_G.step()`**twice** off a single backward pass, so its optimizer-step count is exactlydouble its data-iteration count. We quote StegoGAN budgets in *data iterations*throughout this benchmark and note the 2× explicitly. Do not re-derive one cellthe other way — the family stops being comparable with itself.
## Measured on the SAR2Opt test set (n = 627, 512 px)
| FID↓ | DISTS↓ | LPIPS↓ | SSIM↑ | PSNR↑ ||---|---|---|---|---|| 150.1 | 0.347 | 0.655 | 0.158 | 12.47 |
Evaluated on the official split's 627 test tiles, centre-cropped to 512 px.The tiles are 600 px natively; this benchmark crops and never resizes, in everymethod's training and in the evaluation. No subsampling: every metric on thispage is measured over all 627 pairs.
These are our own re-evaluation numbers, measured by us on the images thischeckpoint produced. **No number here is copied from any paper.** PSNR and SSIMare per-image torchmetrics with `data_range=1`; LPIPS is **LPIPS-VGG on inputsmapped to [-1, 1]** (the `normalize=False` convention); DISTS is the standardimplementation on the same pairs; FID is `pytorch-fid` against the size-matchedground-truth test set. The LPIPS convention matters: the alternative [0, 1]convention gives a systematically different number and the two must never bemixed, or compared against a paper that used the other one.
## Load it and translate one SAR image
Clone `sian-wusidi/StegoGAN` at the commit above and run this from its root.Check `define_G`'s signature in that repository first: StegoGAN adds`resnet_layer` and `fusionblock` keyword arguments that the junyanz original doesnot have.
```pythonimport numpy as np, torchfrom PIL import Imagefrom models.networks import define_G # from the StegoGAN repo
G_A = define_G(3, 3, 64, 'resnet_9blocks_maskv1', 'instance', use_dropout=False, init_type='normal', init_gain=0.02, gpu_ids=[], resnet_layer=8, fusionblock=True)G_A.load_state_dict(torch.load('net_G_A.pth', map_location='cpu'))G_A.eval()
sar = Image.open('sar.png').convert('RGB')sar = sar.crop(((600-512)//2, (600-512)//2, (600+512)//2, (600+512)//2))x = torch.from_numpy(np.asarray(sar, np.float32) / 127.5 - 1).permute(2, 0, 1)[None]
with torch.no_grad(): fake_B_clean = G_A(x) # ONE argument. Passing a second makes it an oracle.
eo = ((fake_B_clean[0].permute(1, 2, 0).numpy() + 1) * 127.5).clip(0, 255).astype(np.uint8)Image.fromarray(eo).save('eo.png')```
Through the repository's own `test.py` (`--model stego_gan --no_dropout--resnet_layer 8 --fusionblock`), outputs are written one directory per visual;**`fake_B_clean/` is the row on this page.**
## ⚠ `fake_B` is an oracle. `fake_B_clean` is the prediction.
The model computes two outputs:
```fake_B_clean = netG_A(real_A) # SAR onlyfake_B = netG_A(real_A, latent_real_B.detach()) # + a feature map of the GROUND TRUTH```
`latent_real_B` comes from `netG_B(real_B)` — the *target* EO image. `fake_B` istherefore conditioned on the answer and **cannot be produced at deployment**.Only `fake_B_clean` is a prediction, and every number on this page is`fake_B_clean`.
This is not hypothetical. Earlier in our own benchmarking the oracle was scored as"StegoGAN" for two days on a different dataset and topped every column at23.19 dB, against a true deployable value of 12.74 dB. **Any published StegoGANnumber must state which of the two it is.**
## ⚠ This cell fails the input-copy audit
We audit every cell for **identity collapse**: a model that has learned to passits input through rather than translate it. The test compares the mean absolutedistance from the generated image to the SAR **input** against the distance tothe EO **target**; a ratio below 1.0 means the output is closer to the input itwas given than to the answer it was asked for.
| quantity | value ||---|---|| mean \|generated − ground truth\| | 48.694 || mean \|generated − SAR input\| | 36.915 || **ratio** (SAR distance ÷ GT distance) | **0.758** — below 1.0 || verdict | **COLLAPSED** || cross-pair separation | 0.890 (cohort median 1.088) — no oracle behaviour |
**Read the metrics on this page with that in mind.** They are reported unchangedbecause they are what the released implementation does at its own publishedprotocol, and a benchmark that quietly substitutes a better-behaved variant isnot reporting the method. But they should not be read as translation quality.The separation figure is the companion check for the *opposite* failure: it isthe mean distance from a generated image to **other** images' ground truthdivided by the distance to its **own**, so a value well above the cohort medianwould indicate that ground-truth information had leaked into the generation.This cell sits at or below the median, so there is no leak — the problem here isinput-copying, and only input-copying.
A longer control run at roughly 1.85× this budget was also trained as a diagnostic; it collapses harder (ratio 0.697), and it is neither the table's row nor published here.
## Read before using this checkpoint
* **`--resnet_layer 8` and `--fusionblock` must match training.** They change the architecture; omit them and the load fails.* **`test.py` rejects `--display_id`.** That flag is declared only in the train options. Passing it to `test.py` aborts with an unrecognised argument — and in a shell `&&` chain the cell then reports success with an empty output directory. This silently destroyed several of our own test passes once.* Build with `gpu_ids=[]`; the checkpoints have bare keys.* Normalisation is `[-1, 1]`.* StegoGAN is **unpaired**.
## Licence — stated factually ⚠ no upstream licence exists
**The upstream code base publishes no licence.**[`sian-wusidi/StegoGAN`](https://github.com/sian-wusidi/StegoGAN) — the officialCVPR 2024 repository — has no LICENSE, LICENCE, COPYING or NOTICE file at anydepth; **0 of its 52 tracked files** at the pinned commit are licence-shaped; itsREADME has no licence section; and the GitHub API reports no declared licence,with the `/license` endpoint returning 404. Checked 2026-08-28.
Under default copyright that means **all rights are reserved by the authors andno express permission to redistribute derived work has been granted** to us orto you. We publish this checkpoint anyway, so that the benchmark is reproducibleend to end, and we state the position plainly rather than implying a permissionthat does not exist. If you intend to redistribute this checkpoint or build onit, assess that for yourself, and consider asking the authors directly.
**What is known about the lineage.** StegoGAN's README thanks`junyanz/pytorch-CycleGAN-and-pix2pix`, and the parts of the tree that areunmodified CycleGAN carry that project's BSD notice, reproduced here as`licenses/LICENSE-cyclegan.txt`. **That notice does not extend to StegoGAN's owncontributions** — the mismatch-mask generators, the fusion block and theconsistency and regularisation losses, which are exactly what makes`net_G_A.pth` what it is.
Please cite: Wu, Chen, Mermet, Hurni, Schindler, Gonthier and Landrieu,*StegoGAN: Leveraging Steganography for Non-Bijective Image-to-ImageTranslation*, CVPR 2024.The full record of what we checked, per method, is in`licenses/NO-UPSTREAM-LICENSE.md` at the root of this repository.
---
Part of the **ReFlowSET** release. This folder holds one comparison-methodcheckpoint that we retrained ourselves on SAR2Opt; it is not ReFlowSETitself. Every comparison method in this repository was retrained by us on thesame splits at the same resolution and scored through one evaluation pipeline,so the rows are directly comparable to each other — and, for the same reason,**not** directly comparable with the numbers in the methods' own papers.README.md+24-4
baselines/README.mdAdded+313
baselines/licenses/LICENSE-SoftPool-MIT.txtAdded+21
baselines/licenses/LICENSE-bbdm.txtAdded+21
baselines/licenses/LICENSE-cbbdm.txtAdded+21
baselines/licenses/LICENSE-cdiffset.txtAdded+21
baselines/licenses/LICENSE-cyclegan.txtAdded+58
baselines/licenses/LICENSE-hidiff.txtAdded+201
baselines/licenses/LICENSE-p2phd.txtAdded+45
baselines/licenses/LICENSE-pix2pix.txtAdded+58
baselines/licenses/LICENSE-resshift.txtAdded+35
baselines/licenses/LICENSE-sd21ft.txtAdded+21
baselines/licenses/LICENSE-spade.txtAdded+177
baselines/licenses/NO-UPSTREAM-LICENSE.mdAdded+189
baselines/qxs-saropt/bbdm/README.mdAdded+136
baselines/qxs-saropt/cbbdm/README.mdAdded+153
baselines/qxs-saropt/cdiffset/README.mdAdded+164
baselines/qxs-saropt/cdiffset/config.jsonAdded+45
baselines/qxs-saropt/conddiff/README.mdAdded+173
baselines/qxs-saropt/controlnet/README.mdAdded+127
baselines/qxs-saropt/controlnet/config.jsonAdded+56
baselines/qxs-saropt/cyclegan/README.mdAdded+169
baselines/qxs-saropt/ddpm/README.mdAdded+174
baselines/qxs-saropt/e3diff/README.mdAdded+177
baselines/qxs-saropt/hidiff/README.mdAdded+162
baselines/qxs-saropt/p2phd/README.mdAdded+142
baselines/qxs-saropt/pix2pix/README.mdAdded+141
baselines/qxs-saropt/resshift/README.mdAdded+144
baselines/qxs-saropt/sd21ft/README.mdAdded+156
baselines/qxs-saropt/sd21ft/config.jsonAdded+45
baselines/qxs-saropt/spade/README.mdAdded+176
baselines/qxs-saropt/stegogan/README.mdAdded+200
baselines/sar2opt/bbdm/README.mdAdded+138
baselines/sar2opt/cbbdm/README.mdAdded+155
baselines/sar2opt/cdiffset/README.mdAdded+166
baselines/sar2opt/cdiffset/config.jsonAdded+45
baselines/sar2opt/conddiff/README.mdAdded+175
baselines/sar2opt/controlnet/README.mdAdded+128
baselines/sar2opt/controlnet/config.jsonAdded+56
baselines/sar2opt/cyclegan/README.mdAdded+172
baselines/sar2opt/ddpm/README.mdAdded+176
baselines/sar2opt/e3diff/README.mdAdded+179
baselines/sar2opt/hidiff/README.mdAdded+164
baselines/sar2opt/p2phd/README.mdAdded+145
baselines/sar2opt/pix2pix/README.mdAdded+144
baselines/sar2opt/resshift/README.mdAdded+146
baselines/sar2opt/sd21ft/README.mdAdded+158
baselines/sar2opt/sd21ft/config.jsonAdded+45
baselines/sar2opt/spade/README.mdAdded+179
baselines/sar2opt/stegogan/README.mdAdded+205