Image-to-Image
Diffusers
PyTorch
Safetensors
English
StableDiffusionInpaintPipeline
stable-diffusion
image-inpainting
remote-sensing
satellite
vhr
diffusion
geospatial
Instructions to use kaopanboonyuen/KAO-DIFFSAT-VHR-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use kaopanboonyuen/KAO-DIFFSAT-VHR-v1 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("kaopanboonyuen/KAO-DIFFSAT-VHR-v1", torch_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
File size: 6,780 Bytes
f22ac25 3f8be19 f22ac25 3f8be19 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 | ---
license: creativeml-openrail-m
language:
- en
tags:
- stable-diffusion
- image-inpainting
- remote-sensing
- satellite
- vhr
- diffusion
- geospatial
library_name: diffusers
pipeline_tag: image-to-image
---
# ๐ฐ๏ธ KAO-DIFFSAT-VHR-v1
**Diffusion-based Satellite Image Inpainting (VHR) โ Baseline Release**
๐ Project website: https://kaopanboonyuen.github.io/KAO/
---
## ๐ฐ๏ธ Visual Overview
<p align="center">
<img src="img/re_show_01.png" width="100%">
<img src="img/re_show_02.png" width="100%">
</p>
<p align="center">
<b>High-fidelity satellite image reconstruction across diverse scenes (urban, agricultural, coastal).</b>
</p>
---
## ๐ Overview
**KAO-DIFFSAT-VHR-v1** is a satellite-domain adaptation of diffusion-based inpainting, designed for **Very High Resolution (VHR) remote sensing imagery**.
This release serves as a **baseline model** in our IEEE TGRS work:
> *KAO: Kernel-Adaptive Optimization in Diffusion for Satellite Image*
> ๐ **Accepted to IEEE Transactions on Geoscience and Remote Sensing (TGRS)**
> ๐ Presentation at **AOGS 2026, Japan**
โ ๏ธ **Important:**
This model is **NOT the KAO method itself**.
It is a **Stable Diffusionโbased inpainting backbone adapted for satellite imagery**, used as one of the reference baselines in our study.
๐ The full KAO framework (**training-free / prompt-free optimization**) will be released separately.
---
## ๐ง Positioning
| Component | Description |
|----------|------------|
| This Repo | Diffusion baseline for satellite inpainting |
| KAO (Paper) | Optimization-based enhancement (no retraining required) |
| Future Release | KAO-integrated inference (no prompt dependency) |
---
## ๐๏ธ Base Model
This model is built upon:
- Stable Diffusion v2 Inpainting
- Provided via the Hugging Face ecosystem
We adapt the pipeline for **remote sensing characteristics**, including:
- Large spatial structures (roads, rivers, urban layouts)
- Texture consistency across wide regions
- Geometric coherence in aerial perspective
---
## ๐ Key Features
- ๐ฐ๏ธ Satellite-aware inpainting behavior
- ๐ Improved structural consistency for urban layouts
- ๐ฟ Better handling of vegetation and natural textures
- ๐งฉ Compatible with standard diffusion pipelines (Diffusers)
---
## ๐ฌ Results Overview
<p align="center">
<img src="img/re_show_01.png" width="90%">
</p>
**Qualitative comparison across multiple models. KAO demonstrates superior structural reconstruction and texture consistency.**
<p align="center">
<img src="img/re_show_02.png" width="90%">
</p>
**Detailed comparison highlighting fine-grained structures and realistic spatial coherence.**
---
## ๐ฐ๏ธ Full Benchmark Results
<table>
<tr>
<td><img src="img/re_all_01.png"></td>
<td><img src="img/re_all_02.png"></td>
</tr>
<tr>
<td><img src="img/re_all_03.png"></td>
<td><img src="img/re_all_04.png"></td>
</tr>
<tr>
<td><img src="img/re_all_05.png"></td>
<td><img src="img/re_all_06.png"></td>
</tr>
</table>
<p align="center">
<b>Comparison across multiple scenes including urban, agricultural, and occluded environments.</b><br>
KAO consistently preserves spatial structure, enhances texture fidelity, and improves reconstruction realism.
</p>
---
## โ ๏ธ What This Model Is (and Is Not)
### โ
This model:
- A **baseline diffusion model** for satellite inpainting
- Used for **comparative evaluation** in our research
- Suitable for prompt-based reconstruction tasks
### โ This model is NOT:
- The full **KAO algorithm**
- A training-free optimization method
- A prompt-free system
๐ Those capabilities are introduced in our paper and will be released in future versions.
---
## ๐ Usage (Diffusers)
```python
from diffusers import StableDiffusionInpaintPipeline
import torch
pipe = StableDiffusionInpaintPipeline.from_pretrained(
"kaopanboonyuen/KAO-DIFFSAT-VHR-v1",
torch_dtype=torch.float16
).to("cuda")
prompt = "High-resolution satellite image of urban area with missing regions reconstructed"
image = pipe(
prompt=prompt,
image=init_image,
mask_image=mask
).images[0]
````
---
## ๐ฐ๏ธ Prompt Guide (Satellite Domain)
Use prompts that enforce:
* spatial coherence
* structural realism
* geospatial consistency
### ๐น Template
```
High-resolution satellite image of [SCENE],
reconstruct missing regions with realistic [STRUCTURE],
maintain spatial consistency, natural textures, and accurate geometry
```
---
## ๐งช Use Cases
* Cloud removal in satellite imagery
* Infrastructure reconstruction
* Map completion
* Environmental monitoring
* Disaster recovery (flood, wildfire)
---
## โ ๏ธ Limitations
* Prompt-sensitive behavior
* Not optimized for hyperspectral imagery
* High memory footprint (~25GB)
* No explicit geospatial constraints (baseline only)
---
## ๐ฎ Roadmap
* ๐ KAO-DIFFSAT-v2 (KAO-integrated)
* ๐ Prompt-free inference (as proposed in paper)
* ๐ Lightweight and scalable variants
---
## ๐ Citation
### ๐น Base Model
```bibtex
@misc{stabilityai2022sd2,
title = {Stable Diffusion v2},
author = {{Stability AI}},
year = {2022},
howpublished = {\url{https://github.com/Stability-AI/stablediffusion}},
note = {Including inpainting variant}
}
```
### ๐น Our Work (KAO)
```bibtex
@article{panboonyuen2025kao,
title={KAO: Kernel-Adaptive Optimization in Diffusion for Satellite Image},
author={Panboonyuen, Teerapong},
journal={IEEE Transactions on Geoscience and Remote Sensing},
year={2025},
publisher={IEEE}
}
```
---
## ๐ฌ Project Overview
This repository presents **KAO-DIFFSAT-VHR-v1**, a diffusion-based framework for **very high-resolution (VHR) satellite image inpainting**, designed for geospatial restoration and reconstruction tasks.
The model builds upon Stable Diffusion-based inpainting and adapts it for remote sensing imagery.
---
## ๐ Paper
๐ Full paper available on arXiv:
https://arxiv.org/abs/2511.02462
---
## ๐ Project Page
๐ Project website:
https://kaopanboonyuen.github.io/KAO/
---
## ๐ค Acknowledgements
* Stability AI for foundational diffusion models
* Hugging Face for open model hosting
* Remote sensing community for datasets and benchmarks
---
## ๐ Vision
This project aims to advance:
> **Generative AI ร Earth Observation**
toward scalable, reliable, and interpretable satellite intelligence systems.
--- |