rishii100 commited on
Commit
e008818
·
verified ·
1 Parent(s): 2f9361e

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +19 -15
README.md CHANGED
@@ -26,27 +26,31 @@ This model is a **Siamese UNet** designed for binary change detection using fuse
26
  The architecture uses dual weight-shared **ResNet-34** encoders to extract multi-modal features from pre-event RGB (EO) and post-event grayscale (SAR) images. Feature differences are fused via skip connections into a UNet decoder.
27
 
28
  - **Encoder:** ResNet-34 (Pre-trained on ImageNet)
29
- - **Weights Format:** Safetensors (Modern, fast, and secure)
30
- - **Loss Function:** Combined Focal Loss + Dice Loss (Optimized for 58:1 class imbalance)
31
  - **Input Resolution:** 256x256
32
 
33
- ## Intended Uses
34
- This model is intended for rapid disaster damage assessment where pre-event optical data and post-event SAR data are available.
35
-
36
- ## Training Results (Validation Set)
37
- - **IoU:** ~27.73%
38
- - **F1 Score:** ~43.42%
39
- - **Precision:** ~35.79%
40
- - **Recall:** ~55.18%
41
 
42
  ## How to Use
43
- The model expects a 3-channel EO image (Pre-event) and a 1-channel SAR image (Post-event) as inputs.
44
 
45
  ```python
 
46
  from safetensors.torch import load_file
47
- # from src.model import SiameseUNet
 
 
 
 
 
 
 
48
 
49
- # model = SiameseUNet()
50
- # weights = load_file("model.safetensors")
51
- # model.load_state_dict(weights)
52
  ```
 
26
  The architecture uses dual weight-shared **ResNet-34** encoders to extract multi-modal features from pre-event RGB (EO) and post-event grayscale (SAR) images. Feature differences are fused via skip connections into a UNet decoder.
27
 
28
  - **Encoder:** ResNet-34 (Pre-trained on ImageNet)
29
+ - **Weights Format:** Safetensors
30
+ - **Loss Function:** Combined Focal Loss + Dice Loss
31
  - **Input Resolution:** 256x256
32
 
33
+ ## Training Results (Final Run)
34
+ - **Best Validation IoU:** 24.74%
35
+ - **Precision:** 26.45%
36
+ - **Recall:** 79.29%
37
+ - **F1 Score:** 39.67%
 
 
 
38
 
39
  ## How to Use
40
+ To use this model, ensure you have the `src/` folder from the [GitHub repository](https://github.com/rishii100/Binary-Change-Detection) in your local directory.
41
 
42
  ```python
43
+ import torch
44
  from safetensors.torch import load_file
45
+ from src.model import SiameseUNet
46
+
47
+ # 1. Initialize architecture
48
+ model = SiameseUNet(pretrained=False)
49
+
50
+ # 2. Load professional weights
51
+ weights = load_file("model.safetensors")
52
+ model.load_state_dict(weights)
53
 
54
+ # 3. Ready for inference
55
+ model.eval()
 
56
  ```