Add pipeline tag and library name
#2
by
nielsr
HF Staff
- opened
README.md
CHANGED
|
@@ -1,5 +1,7 @@
|
|
| 1 |
---
|
| 2 |
license: mit
|
|
|
|
|
|
|
| 3 |
---
|
| 4 |
|
| 5 |
# AnySat: An Earth Observation Model for Any Resolutions, Scales, and Modalities
|
|
@@ -62,7 +64,7 @@ Arrange your data in a dictionary with any of the following keys:
|
|
| 62 |
| l8 | Time series tensor |BxTx11xHxW | B8, B1, B2, B3, B4, B5, B6, B7, B9, B10, B11 | 10m |
|
| 63 |
| modis | Time series tensor |BxTx7xHxW | B1, B2, B3, B4, B5, B6, B7 | 250m |
|
| 64 |
|
| 65 |
-
Note that time series requires a `_dates` companion tensor containing the day of the year: 01/01 = 0, 31/12=364.
|
| 66 |
|
| 67 |
**Example Input** for a tile of 60x60m and a batch size of B:
|
| 68 |
|
|
@@ -84,16 +86,19 @@ Decide on:
|
|
| 84 |
- `'tile'`: Single vector per tile
|
| 85 |
- `'patch'`: A vector per patch
|
| 86 |
- `'dense'`: A vector per sub-patch
|
| 87 |
-
- `'all'`:
|
| 88 |
-
|
|
|
|
|
|
|
| 89 |
The sub patches are `1x1` pixels for time series and `10x10` pixels for VHR images. If using `output='dense'`, specify the `output_modality`.
|
| 90 |
|
| 91 |
Example use:
|
| 92 |
```python
|
| 93 |
-
features = AnySat(data,
|
| 94 |
-
features = AnySat(data,
|
| 95 |
-
features = AnySat(data,
|
| 96 |
-
features = AnySat(data,
|
|
|
|
| 97 |
```
|
| 98 |
**Explanation for the size of the dense map:** `d=10` for 'aerial' which has a 0.2m resolution, the sub-patches are 2x2 m.
|
| 99 |
|
|
@@ -149,7 +154,7 @@ python src/train.py exp=BraDD_AnySAT_LP
|
|
| 149 |
Our implementation already supports 9 datasets:
|
| 150 |
|
| 151 |
<p align="center">
|
| 152 |
-
<img src="
|
| 153 |
</p>
|
| 154 |
|
| 155 |
## GeoPlex Datasets
|
|
@@ -216,4 +221,10 @@ Please use the following bibtex:
|
|
| 216 |
journal={arXiv preprint arXiv:2412.14123},
|
| 217 |
year={2024}
|
| 218 |
}
|
| 219 |
-
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: mit
|
| 3 |
+
pipeline_tag: image-feature-extraction
|
| 4 |
+
library_name: torch
|
| 5 |
---
|
| 6 |
|
| 7 |
# AnySat: An Earth Observation Model for Any Resolutions, Scales, and Modalities
|
|
|
|
| 64 |
| l8 | Time series tensor |BxTx11xHxW | B8, B1, B2, B3, B4, B5, B6, B7, B9, B10, B11 | 10m |
|
| 65 |
| modis | Time series tensor |BxTx7xHxW | B1, B2, B3, B4, B5, B6, B7 | 250m |
|
| 66 |
|
| 67 |
+
Note that time series requires a `_dates` companion tensor containing the day of the year: 01/01 = 0, 31/12=364. The data also needs to be normalized (data -mean) /std as input to our model.
|
| 68 |
|
| 69 |
**Example Input** for a tile of 60x60m and a batch size of B:
|
| 70 |
|
|
|
|
| 86 |
- `'tile'`: Single vector per tile
|
| 87 |
- `'patch'`: A vector per patch
|
| 88 |
- `'dense'`: A vector per sub-patch
|
| 89 |
+
- `'all'`: A vector per patch with class token at first position
|
| 90 |
+
|
| 91 |
+
⚠️ For segmentation tasks, use 'dense' argument!
|
| 92 |
+
|
| 93 |
The sub patches are `1x1` pixels for time series and `10x10` pixels for VHR images. If using `output='dense'`, specify the `output_modality`.
|
| 94 |
|
| 95 |
Example use:
|
| 96 |
```python
|
| 97 |
+
features = AnySat(data, patch_size=10, output='tile') #tensor of size [B, D,]
|
| 98 |
+
features = AnySat(data, patch_size=10, output='patch') #tensor of size [B, D, 6, 6]
|
| 99 |
+
features = AnySat(data, patch_size=20, output='patch') #tensor of size [B, D, 3, 3]
|
| 100 |
+
features = AnySat(data, patch_size=20, output='dense', output_modality='aerial') #tensor of size [B, 2*D, 30, 30]
|
| 101 |
+
features = AnySat(data, patch_size=20, output='dense', output_modality='s2') #tensor of size [B, 2*D, 6, 6]
|
| 102 |
```
|
| 103 |
**Explanation for the size of the dense map:** `d=10` for 'aerial' which has a 0.2m resolution, the sub-patches are 2x2 m.
|
| 104 |
|
|
|
|
| 154 |
Our implementation already supports 9 datasets:
|
| 155 |
|
| 156 |
<p align="center">
|
| 157 |
+
<img src=".media/datasets.png" alt="AnySat Datasets" width="500">
|
| 158 |
</p>
|
| 159 |
|
| 160 |
## GeoPlex Datasets
|
|
|
|
| 221 |
journal={arXiv preprint arXiv:2412.14123},
|
| 222 |
year={2024}
|
| 223 |
}
|
| 224 |
+
```
|
| 225 |
+
|
| 226 |
+
# Acknowledgements
|
| 227 |
+
- The code is conducted on the same base as [OmniSat](https://github.com/gastruc/OmniSat)
|
| 228 |
+
- The JEPA implementation comes from [JEPA](https://github.com/facebookresearch/ijepa)
|
| 229 |
+
- The code from Pangaea datasets comes from [Pangaea](https://github.com/VMarsocci/pangaea-bench)
|
| 230 |
+
<br>
|