Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,138 @@
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: cc-by-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- image-segmentation
|
| 5 |
+
- image-classification
|
| 6 |
+
- solar-panels
|
| 7 |
+
- photovoltaic
|
| 8 |
+
- remote-sensing
|
| 9 |
+
- aerial-imagery
|
| 10 |
+
- pytorch
|
| 11 |
+
datasets:
|
| 12 |
+
- gabrielkasmi/bdappv
|
| 13 |
---
|
| 14 |
+
|
| 15 |
+
# BDAPPV Models
|
| 16 |
+
|
| 17 |
+
Baseline models for the [BDAPPV dataset](https://huggingface.co/datasets/gabrielkasmi/bdappv) — aerial images of rooftop photovoltaic installations in France and Belgium.
|
| 18 |
+
|
| 19 |
+
**Paper:** [Kasmi et al., Scientific Data, 2023](https://doi.org/10.1038/s41597-023-01951-4)
|
| 20 |
+
|
| 21 |
+
---
|
| 22 |
+
|
| 23 |
+
## Models
|
| 24 |
+
|
| 25 |
+
Two architectures, trained independently on each imagery provider:
|
| 26 |
+
|
| 27 |
+
| File | Task | Architecture | Provider |
|
| 28 |
+
|------|------|-------------|----------|
|
| 29 |
+
| `deeplab_google_best.pth` | Segmentation | DeepLabV3-ResNet101 | Google |
|
| 30 |
+
| `deeplab_ign_best.pth` | Segmentation | DeepLabV3-ResNet101 | IGN |
|
| 31 |
+
| `inception_google_best.pth` | Classification | InceptionV3 | Google |
|
| 32 |
+
| `inception_ign_best.pth` | Classification | InceptionV3 | IGN |
|
| 33 |
+
|
| 34 |
+
---
|
| 35 |
+
|
| 36 |
+
## Benchmark protocol
|
| 37 |
+
|
| 38 |
+
Three evaluation tracks are defined:
|
| 39 |
+
|
| 40 |
+
**Track 1 — Segmentation (single provider)**
|
| 41 |
+
Train and evaluate on the same provider. Report IoU and F1 on the test split.
|
| 42 |
+
|
| 43 |
+
**Track 2 — Classification (single provider)**
|
| 44 |
+
Train and evaluate on the same provider. Report accuracy and F1 on the test split.
|
| 45 |
+
|
| 46 |
+
**Track 3 — Distribution shift (cross-provider)**
|
| 47 |
+
Train on Google, evaluate on IGN test split. This is the primary robustness benchmark. Report IoU.
|
| 48 |
+
|
| 49 |
+
Rules:
|
| 50 |
+
- The test split must not be used for model selection or hyperparameter tuning — validation split only.
|
| 51 |
+
- The spatial holdout by department must not be modified. Re-splitting invalidates comparability with published results.
|
| 52 |
+
- For Track 3, only the Google training split may be used for training.
|
| 53 |
+
|
| 54 |
+
---
|
| 55 |
+
|
| 56 |
+
## Results
|
| 57 |
+
|
| 58 |
+
Models evaluated on the official test split (spatial holdout by French department — see dataset card for details).
|
| 59 |
+
|
| 60 |
+
### Segmentation (DeepLabV3-ResNet101)
|
| 61 |
+
|
| 62 |
+
| Provider | IoU | F1 |
|
| 63 |
+
|----------|-----|----|
|
| 64 |
+
| Google | TBD | TBD |
|
| 65 |
+
| IGN | TBD | TBD |
|
| 66 |
+
|
| 67 |
+
### Classification (InceptionV3)
|
| 68 |
+
|
| 69 |
+
| Provider | Accuracy | F1 |
|
| 70 |
+
|----------|----------|----|
|
| 71 |
+
| Google | TBD | TBD |
|
| 72 |
+
| IGN | TBD | TBD |
|
| 73 |
+
|
| 74 |
+
### Distribution shift benchmark
|
| 75 |
+
|
| 76 |
+
Train on Google, evaluate on IGN — the intended cross-provider protocol:
|
| 77 |
+
|
| 78 |
+
| Model | Train | Test | IoU |
|
| 79 |
+
|-------|-------|------|-----|
|
| 80 |
+
| DeepLabV3-ResNet101 | Google | IGN | TBD |
|
| 81 |
+
|
| 82 |
+
---
|
| 83 |
+
|
| 84 |
+
## Usage
|
| 85 |
+
|
| 86 |
+
A `model.py` helper is included in this repo to simplify loading:
|
| 87 |
+
|
| 88 |
+
```python
|
| 89 |
+
from huggingface_hub import hf_hub_download
|
| 90 |
+
import importlib.util
|
| 91 |
+
|
| 92 |
+
path = hf_hub_download("gabrielkasmi/bdappv-models", "model.py")
|
| 93 |
+
spec = importlib.util.spec_from_file_location("bdappv_model", path)
|
| 94 |
+
mod = importlib.util.module_from_spec(spec)
|
| 95 |
+
spec.loader.exec_module(mod)
|
| 96 |
+
|
| 97 |
+
seg = mod.load_segmentation_model("google") # or "ign"
|
| 98 |
+
clf = mod.load_classification_model("google") # or "ign"
|
| 99 |
+
```
|
| 100 |
+
|
| 101 |
+
Both functions return the model in `eval()` mode. An optional `device` argument is supported (`"cpu"`, `"cuda"`, `"mps"`).
|
| 102 |
+
|
| 103 |
+
---
|
| 104 |
+
|
| 105 |
+
## Training
|
| 106 |
+
|
| 107 |
+
Models trained on the official BDAPPV splits using:
|
| 108 |
+
|
| 109 |
+
- **Optimizer:** AdamW (lr=1e-4, weight_decay=1e-4)
|
| 110 |
+
- **Scheduler:** Cosine annealing
|
| 111 |
+
- **Effective batch size:** 32 (batch 16 × grad accum 2)
|
| 112 |
+
- **Early stopping:** patience=7 epochs on validation metric
|
| 113 |
+
- **Input size:** 400×400 px
|
| 114 |
+
- **Initialization:** checkpoints from [Mayer et al. (2022)](https://doi.org/10.1016/j.apenergy.2021.118469), who fine-tuned DeepLabV3-ResNet101 and InceptionV3 on 10 cm/px orthoimagery from North Rhine-Westphalia (Germany) for rooftop PV detection. These checkpoints were then further fine-tuned on BDAPPV using the splits above.
|
| 115 |
+
|
| 116 |
+
Training scripts available in the [BDAPPV dataset repository](https://huggingface.co/datasets/gabrielkasmi/bdappv).
|
| 117 |
+
|
| 118 |
+
---
|
| 119 |
+
|
| 120 |
+
## Citation
|
| 121 |
+
|
| 122 |
+
If you use these models, please cite:
|
| 123 |
+
|
| 124 |
+
```bibtex
|
| 125 |
+
@phdthesis{kasmi2024enhancing,
|
| 126 |
+
title = {Enhancing the Reliability of Deep Learning Models to Improve
|
| 127 |
+
the Observability of French Rooftop Photovoltaic Installations},
|
| 128 |
+
author = {Kasmi, Gabriel},
|
| 129 |
+
year = {2024},
|
| 130 |
+
school = {Universit{\'e} Paris sciences et lettres}
|
| 131 |
+
}
|
| 132 |
+
```
|
| 133 |
+
|
| 134 |
+
## References
|
| 135 |
+
|
| 136 |
+
- Mayer et al. (2022). [3D-PV-Locator: Large-scale detection of rooftop-mounted photovoltaic systems in 3D.](https://doi.org/10.1016/j.apenergy.2021.118469) *Applied Energy*, 310, 118469. *(source of the base checkpoints)*
|
| 137 |
+
- Kasmi et al. (2023). [A crowdsourced dataset of aerial images with annotated solar photovoltaic arrays and installation metadata.](https://doi.org/10.1038/s41597-023-01951-4) *Scientific Data*, 10, 59. *(BDAPPV dataset)*
|
| 138 |
+
- Kasmi et al. (2022). [Towards unsupervised assessment with open-source data of the accuracy of deep learning-based distributed PV mapping.](https://arxiv.org/abs/2207.07466) *arXiv:2207.07466*. *(cross-provider distribution shift)*
|