Upload README.md with huggingface_hub
Browse files
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
|
| 30 |
-
- **Loss Function:** Combined Focal Loss + Dice Loss
|
| 31 |
- **Input Resolution:** 256x256
|
| 32 |
|
| 33 |
-
##
|
| 34 |
-
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
- **
|
| 38 |
-
- **F1 Score:** ~43.42%
|
| 39 |
-
- **Precision:** ~35.79%
|
| 40 |
-
- **Recall:** ~55.18%
|
| 41 |
|
| 42 |
## How to Use
|
| 43 |
-
|
| 44 |
|
| 45 |
```python
|
|
|
|
| 46 |
from safetensors.torch import load_file
|
| 47 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 48 |
|
| 49 |
-
#
|
| 50 |
-
|
| 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 |
```
|