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
| 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. | |
| --- |