Burdenthrive commited on
Commit
9ced120
·
verified ·
1 Parent(s): e3bc734

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +57 -3
README.md CHANGED
@@ -1,3 +1,57 @@
1
- ---
2
- license: mit
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: image-segmentation
4
+ library_name: pytorch
5
+ tags:
6
+ - segformer
7
+ - mit-b4
8
+ - transformer
9
+ - segmentation-models-pytorch
10
+ - timm
11
+ - pytorch
12
+ - remote-sensing
13
+ - sentinel-2
14
+ - rgb
15
+ - cloud-detection
16
+ datasets:
17
+ - "isp-uv-es/CloudSEN12Plus"
18
+ ---
19
+
20
+ # Cloud Detection — SegFormer (MiT-B4 encoder, RGB)
21
+
22
+ **Repository:** `Burdenthrive/cloud-detection-segformer-mit-b4`
23
+ **Task:** Multiclass semantic segmentation (4 classes) on **Sentinel‑2 L1C RGB** (3 bands) using **SegFormer** (`segmentation_models_pytorch`) with **MiT‑B4** encoder.
24
+
25
+ This model predicts per‑pixel labels among: **clear**, **thick cloud**, **thin cloud**, **cloud shadow**.
26
+
27
+ ---
28
+
29
+ ## ✨ Highlights
30
+
31
+ - **Input:** Sentinel‑2 L1C RGB tiles/patches (float32, shape `B×3×H×W`, bands **B04‑B03‑B02**).
32
+ - **Backbone:** `mit_b4` (MiT encoder via `segmentation_models_pytorch`).
33
+ - **Output:** Logits `B×4×H×W` (apply softmax + argmax).
34
+ - **Files:** `model.py`, `config.json`, and weights (`model.safetensors` and/or `best_model_mc.pth`).
35
+
36
+ ---
37
+
38
+ ## 📦 Files
39
+
40
+ - `model.py` — defines the `SegFormer` class (wrapper around `smp.Segformer`).
41
+ - `config.json` — hyperparameters and class names:
42
+ ```json
43
+ {
44
+ "task": "image-segmentation",
45
+ "model_name": "segformer-mit-b4",
46
+ "model_kwargs": {
47
+ "encoder_name": "mit_b4",
48
+ "encoder_weights": "imagenet",
49
+ "in_channels": 3,
50
+ "num_classes": 4,
51
+ "freeze_encoder": false
52
+ },
53
+ "classes": ["clear", "thick cloud", "thin cloud", "cloud shadow"],
54
+ "id2label": { "0": "clear", "1": "thick cloud", "2": "thin cloud", "3": "cloud shadow" },
55
+ "label2id": { "clear": 0, "thick cloud": 1, "thin cloud": 2, "cloud shadow": 3 },
56
+ "input_bands": ["B04", "B03", "B02"]
57
+ }