Views
No views yet
| Directory | Modality | Architecture | Source |
|---|---|---|---|
skysense-swinv2-huge-rgb | High-res optical (RGB) | SwinV2 Huge | skysense_model_backbone_hr.pth |
skysense-vit-large-s2 | Sentinel-2 | ViT-Large | skysense_model_backbone_s2.pth |
skysense-vit-large-s1 | Sentinel-1 SAR | ViT-Large | skysense_model_backbone_s1.pth |
trust_remote_code=True).1from transformers import pipeline
2import torch
3
4# HR RGB backbone — input 224×224
5hr_pipe = pipeline(
6 task="image-feature-extraction",
7 model="/path/to/SkySense-transformers/skysense-swinv2-huge-rgb",
8 trust_remote_code=True,
9 device="cpu",
10)
11hr_img = torch.randn(1, 3, 224, 224)
12features = hr_pipe(hr_img)
13print(features["last_hidden_state"].shape) # (1, 2816, 7, 7)
14
15# Sentinel-2 — 10 bands, 64×64
16s2_pipe = pipeline(
17 task="image-feature-extraction",
18 model="/path/to/SkySense-transformers/skysense-vit-large-s2",
19 trust_remote_code=True,
20 device="cpu",
21)
22s2_img = torch.randn(1, 10, 64, 64)
23features = s2_pipe(s2_img)
24print(features["last_hidden_state"].shape) # (1, 1024, 16, 16)
25
26# Sentinel-1 — VV/VH, 64×64
27s1_pipe = pipeline(
28 task="image-feature-extraction",
29 model="/path/to/SkySense-transformers/skysense-vit-large-s1",
30 trust_remote_code=True,
31 device="cpu",
32)
33s1_img = torch.randn(1, 2, 64, 64)
34features = s1_pipe(s1_img)
35print(features["last_hidden_state"].shape)/home/czy/local/projects/SkySense-transformers1conda activate rsgen
2
3python scripts/convert_checkpoint_to_hf.py \
4 --input-path /path/to/skysense_model_backbone_hr.pth \
5 --modality hr \
6 --output-dir /path/to/skysense-swinv2-huge-rgb \
7 --clean-output
8
9python scripts/convert_checkpoint_to_hf.py \
10 --input-path /path/to/skysense_model_backbone_s2.pth \
11 --modality s2 \
12 --output-dir /path/to/skysense-vit-large-s2 \
13 --clean-output
14
15python scripts/convert_checkpoint_to_hf.py \
16 --input-path /path/to/skysense_model_backbone_s1.pth \
17 --modality s1 \
18 --output-dir /path/to/skysense-vit-large-s1 \
19 --clean-outputbackbone_gep.* / backbone_s2.* / backbone_s1.* prefixes.relative_position_index, relative_coords_table) and mask_token. Buffers are deterministically recomputed at init; learned CPB weights are loaded.ln1/ln2 keys remapped to norm1/norm2.ffn.layers.0.0 → ffn.layers.0, ffn.layers.1 → ffn.layers.3.pad_small_map=True so 224×224 inputs work with window size 8 at deep stages.