abalhomaid commited on
Commit
89420f0
·
verified ·
1 Parent(s): 87e0039

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +112 -0
README.md ADDED
@@ -0,0 +1,112 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ language: en
4
+ tags:
5
+ - domain-adaptation
6
+ - disaster-assessment
7
+ - resnet50
8
+ - image-classification
9
+ - unsupervised-domain-adaptation
10
+ datasets:
11
+ - abalhomaid/disaster-damage-assessment
12
+ ---
13
+
14
+ # UDA Disaster Damage Assessment - Model Weights
15
+
16
+ Pre-trained model weights for reproducing the experiments in:
17
+
18
+ > **Unsupervised Domain Adaptation for Rapid Disaster Damage Assessment**
19
+
20
+ These checkpoints reproduce Tables 1-6 in the paper.
21
+
22
+ ## Models Included
23
+
24
+ | Model | Count | Description |
25
+ |-------|-------|-------------|
26
+ | ResNet50 (source-only) | 12 | State dict files for all 12 source-target domain pairs |
27
+ | CDAN | 36 | 12 tasks x 3 seeds (SWD=0) |
28
+ | CORAL | 36 | 12 tasks x 3 seeds (SWD=0) |
29
+ | MMD | 36 | 12 tasks x 3 seeds (SWD=0) |
30
+ | DANN | 36 | 12 tasks x 3 seeds (SWD=0) |
31
+ | AWDAN (best) | 36 | 12 tasks x 3 seeds (best SWD config per task, selected by max F1) |
32
+ | **Total** | **192 files** | **~19.8 GB** |
33
+
34
+ ## Domains
35
+
36
+ | Domain | Code | Event | Images |
37
+ |--------|------|-------|--------|
38
+ | Ecuador Earthquake | E | 2016 | 1,724 |
39
+ | Nepal Earthquake | N | 2015 | 19,102 |
40
+ | Hurricane Matthew | M | 2016 | 333 |
41
+ | Typhoon Ruby | R | 2014 | 833 |
42
+
43
+ All 12 source-to-target combinations (E2M, E2N, E2R, M2E, M2N, M2R, N2E, N2M, N2R, R2E, R2M, R2N) are evaluated with seeds {2, 32, 128}.
44
+
45
+ ## Download
46
+
47
+ ```bash
48
+ pip install huggingface_hub
49
+ huggingface-cli download abalhomaid/disaster-uda-models --local-dir .
50
+ ```
51
+
52
+ This places files into the correct directory structure expected by the evaluation scripts.
53
+
54
+ ## File Structure
55
+
56
+ ```
57
+ models/resnet50/c4/
58
+ {S}_{T}_model_epoch_best_statedict.pth # Source-only baseline (12 files)
59
+
60
+ train_jobs/cdan/logs/{model}/seed_{seed}/
61
+ Damage_{S}2{T}_SWD_{swd}_trade_offs_{to}/
62
+ checkpoints/best.pth # DA model checkpoint
63
+ ```
64
+
65
+ Where `{model}` is one of: `cdan`, `coral`, `mmd`, `dann`.
66
+
67
+ ## Usage
68
+
69
+ Clone the reproduction repository and download the weights:
70
+
71
+ ```bash
72
+ git clone https://github.com/abalhomaid/disaster-assesment.git
73
+ cd disaster-assesment
74
+ git checkout reproducibility
75
+
76
+ # Download model weights
77
+ huggingface-cli download abalhomaid/disaster-uda-models --local-dir .
78
+
79
+ # Set up evaluation environment
80
+ conda env create -f tllib_metric.yaml
81
+ conda activate tllib_metric
82
+ pip install -e .
83
+
84
+ # Evaluate a model (e.g., DANN E->M, seed=32)
85
+ PYTHONPATH="$PWD:$PWD/examples/domain_adaptation/image_classification" \
86
+ python examples/domain_adaptation/image_classification/dann.py \
87
+ data/damage -d Damage -s E -t M -a resnet50 --seed 32 --scratch \
88
+ --log train_jobs/cdan/logs/dann/seed_32/Damage_E2M_SWD_0_trade_offs_1 \
89
+ --phase test
90
+ ```
91
+
92
+ See the [repository README](https://github.com/abalhomaid/disaster-assesment/tree/reproducibility) for full reproduction instructions.
93
+
94
+ ## Expected Results (Table 5 Averages)
95
+
96
+ | Model | Accuracy | Precision | Recall | F1 |
97
+ |-------|----------|-----------|--------|-----|
98
+ | Source-only | 75.2 | 84.1 | 70.0 | 75.6 |
99
+ | CDAN | 81.0 | 83.6 | 83.1 | 83.2 |
100
+ | CORAL | 79.5 | 82.2 | 81.7 | 81.8 |
101
+ | MMD | 81.1 | 83.8 | 83.0 | 83.2 |
102
+ | DANN | 80.6 | 83.9 | 81.9 | 82.7 |
103
+ | **AWDAN** | **81.9** | 83.9 | **85.0** | **84.2** |
104
+
105
+ ## Architecture
106
+
107
+ All models use ResNet50 backbone with 2-class output (damage / no damage), input size 224x224.
108
+
109
+ - **Source-only**: Standard ResNet50 fine-tuned on source domain only
110
+ - **DANN/CDAN**: ResNet50 + domain discriminator (adversarial DA)
111
+ - **CORAL/MMD**: ResNet50 + divergence minimization (domain generalization)
112
+ - **AWDAN**: DANN + Sliced Wasserstein Distance regularization in label space