CoolFace
Modelpublic

uga-gaim/CLIPSeg-CloudSEN12Plus-LoRA

sourceHugging Facecc-by-4.0updated 4mo agoView on Hugging Face
1likes13downloads
Model Card

CLIPSeg Fine-tuned for Cloud Segmentation (LoRA, 100% Data)

LoRA-adapted version of CIDAS/clipseg-rd64-refined for cloud segmentation on Sentinel-2 satellite imagery using the CloudSEN12+ dataset. This model is part of the research presented in:

Low-Data Supervised Adaptation Outperforms Prompting for Cloud Segmentation Under Domain Shift Harshith Kethavath, Weiming Hu EarthVision Workshop @ CVPR 2026

All models from this paper: https://huggingface.co/collections/uga-gaim/2026-cloudprompts

Model Description

CLIPSeg is a vision-language segmentation model trained on natural images. This variant uses Low-Rank Adaptation (LoRA) to adapt CLIPSeg to Sentinel-2 satellite imagery for four-class cloud segmentation: clear, thick cloud, thin cloud, and cloud shadow. Compared to full fine-tuning, LoRA trains only a small fraction of parameters (~16MB adapter weights vs. ~603MB full model), making it a lightweight alternative.

  • Developed by: Harshith Kethavath, Weiming Hu
  • Lab: Lab for Geoinformatics and AI Modeling (GAIM), University of Georgia
  • License: CC BY 4.0
  • Base model: CIDAS/clipseg-rd64-refined
  • PEFT method: LoRA (rank 32, α = 64)

How to Get Started

python
from transformers import CLIPSegProcessor, CLIPSegForImageSegmentation
from peft import PeftModel
import torch
from PIL import Image

base_model = CLIPSegForImageSegmentation.from_pretrained("CIDAS/clipseg-rd64-refined")
model = PeftModel.from_pretrained(base_model, "uga-gaim/CLIPSeg-CloudSEN12Plus-LoRA")
processor = CLIPSegProcessor.from_pretrained("uga-gaim/CLIPSeg-CloudSEN12Plus-LoRA")

image = Image.open("your_sentinel2_image.png")
prompts = ["clear", "thick cloud", "thin cloud", "cloud shadow"]

inputs = processor(
    text=prompts,
    images=[image] * len(prompts),
    return_tensors="pt",
    padding=True
)

with torch.no_grad():
    outputs = model(**inputs)

logits = outputs.logits  # shape: (4, H, W)
predicted_class = logits.argmax(dim=0)  # per-pixel class prediction

Training Details

Training Data

Trained on the CloudSEN12+ dataset, the largest expert-labeled cloud segmentation benchmark for Sentinel-2 imagery. 100% of the training split was used (full data setting).

Training Hyperparameters

HyperparameterValue
OptimizerAdamW
Learning rate2e-4
Weight decay0.01
Warmup ratio0.03
Epochs15
Batch size16
LoRA rank (r)32
LoRA alpha (α)64
LoRA dropout0.05
Precisionfp16

Loss Function

Combined segmentation loss: weighted sum of Focal loss, Tversky loss, and Boundary loss.

Evaluation Results

Evaluated on the CloudSEN12+ test split. Per-class IoU:

ClassZero-Shot (baseline)This model (LoRA 100%)
Clear0.52050.8269
Thick Cloud0.27730.7488
Thin Cloud0.08980.3820
Cloud Shadow0.13250.4389
mIoU0.25500.5991

Citation

bibtex
@InProceedings{Kethavath_2026_CVPR,
    author    = {Kethavath, Harshith and Hu, Weiming},
    title     = {Low-Data Supervised Adaptation Outperforms Prompting for Cloud Segmentation Under Domain Shift},
    booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
    month     = {June},
    year      = {2026},
    pages     = {7960-7969}
}