Views
No views yet
| Directory | Modality | Architecture | Source |
|---|---|---|---|
skysensepp-swinv2-msl-hr | High-res optical | SwinV2 Huge + MSL | skysensepp_release_hr.pth |
skysensepp-vit-msl-s2 | Sentinel-2 | ViT-Large + MSL | skysensepp_release_s2.pth |
skysensepp-vit-msl-s1 | Sentinel-1 | ViT-Large + MSL | skysensepp_release_s1.pth |
skysensepp-fusion-neck | Multi-modal fusion (optional) | TransformerEncoder | fusion.* from skysensepp_release.ckpt |
skysensepp-fewshot-release | Full 1-shot segmentation | HR + S2 + S1 + fusion + VAE + UPerHead | skysensepp_release.ckpt |
trust_remote_code=True).1from transformers import pipeline
2import torch
3
4MODEL = "/path/to/SkySensePlusPlus-transformers/skysensepp-swinv2-msl-hr"
5
6pipe = pipeline(
7 task="image-feature-extraction",
8 model=MODEL,
9 trust_remote_code=True,
10 device="cpu",
11)
12
13hr_img = torch.randn(1, 3, 512, 512)
14annotation = torch.zeros(1, 512, 512, dtype=torch.long) # semantic class indices
15
16features = pipe(hr_img, annotation=annotation)
17print(features["last_hidden_state"].shape) # (1, 2816, 16, 16)1s2_pipe = pipeline(
2 task="image-feature-extraction",
3 model="/path/to/skysensepp-vit-msl-s2",
4 trust_remote_code=True,
5 device="cpu",
6)
7
8s2_img = torch.randn(1, 10, 16, 16)
9s2_anno = torch.zeros(1, 16, 16, dtype=torch.long)
10features = s2_pipe(s2_img, annotation=s2_anno)
11print(features["last_hidden_state"].shape)0 for background/unlabeled regions during zero-shot feature extraction.1fusion_pipe = pipeline(
2 task="skysensepp-fusion",
3 model="/path/to/skysensepp-fusion-neck",
4 trust_remote_code=True,
5 device="cpu",
6)
7
8# Concatenated HR + S2 + S1 stage-3 tokens per spatial location
9hidden_states = torch.randn(256, 3, 2816)
10fused = fusion_pipe(hidden_states)
11
12print(fused["pooler_output"].shape) # (256, 1024)1from transformers import pipeline
2import torch
3
4MODEL = "/path/to/SkySensePlusPlus-transformers/skysensepp-fewshot-release"
5
6pipe = pipeline(
7 task="skysensepp-fewshot",
8 model=MODEL,
9 trust_remote_code=True,
10 device=0, # GPU recommended (~24 GB); CPU OOMs at 1024×512 HR
11)
12
13# Stacked HR (3, 1024, 512), S2/S1 with seq=2, RGB targets (ImageNet-normalized)
14hr = torch.randn(1, 3, 1024, 512)
15s2 = torch.randn(1, 10, 2, 32, 32)
16s1 = torch.randn(1, 2, 2, 32, 32)
17targets = torch.randn(1, 3, 1024, 512) # use real RGB annotation maps in practice
18anno_mask = torch.zeros(1, 8, 4, dtype=torch.long)
19anno_mask[:, 4:, :] = 1 # mask query (bottom) half
20
21result = pipe(hr, s2_img=s2, s1_img=s1, targets=targets, anno_mask=anno_mask)
22print(result["logits"].shape) # (1, 65, 512, 512) — query region only/home/czy/local/projects/SkySensePlusPlus-transformers1conda activate rsgen
2python scripts/convert_checkpoint_to_hf.py \
3 --input-path /path/to/skysensepp_release_hr.pth \
4 --modality hr \
5 --output-dir /path/to/skysensepp-swinv2-msl-hr \
6 --clean-output
7
8# Full few-shot release (~6.8 GB)
9python scripts/convert_checkpoint_to_hf.py \
10 --input-path /path/to/skysensepp_release.ckpt \
11 --modality fewshot \
12 --output-dir /path/to/skysensepp-fewshot-release \
13 --clean-outputrelative_position_index, relative_coords_table). These are deterministically recomputed at init from window geometry — not randomly initialized. Learned CPB weights (cpb_mlp, logit_scale) are loaded.