Views
No views yet
Low-Data Supervised Adaptation Outperforms Prompting for Cloud Segmentation Under Domain Shift Harshith Kethavath, Weiming Hu EarthVision Workshop @ CVPR 2026
1from transformers import CLIPSegProcessor, CLIPSegForImageSegmentation
2import torch
3from PIL import Image
4
5processor = CLIPSegProcessor.from_pretrained("uga-gaim/CLIPSeg-CloudSEN12Plus-FFT")
6model = CLIPSegForImageSegmentation.from_pretrained("uga-gaim/CLIPSeg-CloudSEN12Plus-FFT")
7
8image = Image.open("your_sentinel2_image.png")
9prompts = ["clear", "thick cloud", "thin cloud", "cloud shadow"]
10
11inputs = processor(
12 text=prompts,
13 images=[image] * len(prompts),
14 return_tensors="pt",
15 padding=True
16)
17
18with torch.no_grad():
19 outputs = model(**inputs)
20
21logits = outputs.logits # shape: (4, H, W)
22predicted_class = logits.argmax(dim=0) # per-pixel class prediction| Hyperparameter | Value |
|---|---|
| Optimizer | AdamW |
| Learning rate | 5e-5 |
| Weight decay | 0.02 |
| Warmup ratio | 0.06 |
| Epochs | 20 |
| Batch size | 16 |
| Precision | fp16 |
| Class | Zero-Shot (baseline) | This model (FFT 100%) |
|---|---|---|
| Clear | 0.5205 | 0.8540 |
| Thick Cloud | 0.2773 | 0.7875 |
| Thin Cloud | 0.0898 | 0.4702 |
| Cloud Shadow | 0.1325 | 0.5173 |
| mIoU | 0.2550 | 0.6572 |
1@InProceedings{Kethavath_2026_CVPR,
2 author = {Kethavath, Harshith and Hu, Weiming},
3 title = {Low-Data Supervised Adaptation Outperforms Prompting for Cloud Segmentation Under Domain Shift},
4 booktitle = {Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition (CVPR) Workshops},
5 month = {June},
6 year = {2026},
7 pages = {7960-7969}
8}