Add files using upload-large-folder tool
Browse files- README.md +52 -0
- encoder.pt +3 -0
- encoder_tokens_10k.pt +3 -0
- encoder_tokens_10k_metadata.json +77 -0
- manifest/data_config.json +53 -0
- manifest/split.parquet +3 -0
README.md
ADDED
|
@@ -0,0 +1,52 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: cc-by-4.0
|
| 3 |
+
tags:
|
| 4 |
+
- remote-sensing
|
| 5 |
+
- insar
|
| 6 |
+
- ground-motion
|
| 7 |
+
- time-series
|
| 8 |
+
- egms
|
| 9 |
+
---
|
| 10 |
+
|
| 11 |
+
# EGMS-QA · Encoder
|
| 12 |
+
|
| 13 |
+
Frozen spatio-temporal encoder and its 10,000-tile token cache for **EGMS-QA**,
|
| 14 |
+
a natural-language question-answering system over
|
| 15 |
+
[European Ground Motion Service](https://egms.land.copernicus.eu/) (EGMS)
|
| 16 |
+
persistent-scatterer displacement time series.
|
| 17 |
+
|
| 18 |
+
The encoder maps a variable-size 7 km tile of point displacement histories to a
|
| 19 |
+
fixed **65-token** representation (1 tile summary + 8×8 spatial cells, 256-d),
|
| 20 |
+
trained self-supervised with masked reconstruction. It is frozen downstream.
|
| 21 |
+
|
| 22 |
+
Code: https://github.com/risenyard/egms-qa ·
|
| 23 |
+
Companion repos: [`risenyard/egms-qa-qa_construction`](https://huggingface.co/datasets/risenyard/egms-qa-qa_construction) ·
|
| 24 |
+
[`risenyard/egms-qa-translator`](https://huggingface.co/risenyard/egms-qa-translator)
|
| 25 |
+
|
| 26 |
+
## Files
|
| 27 |
+
|
| 28 |
+
| file | what it is |
|
| 29 |
+
|---|---|
|
| 30 |
+
| `encoder.pt` | frozen encoder checkpoint (`model` state dict + training args) |
|
| 31 |
+
| `encoder_tokens_10k.pt` | token cache for the 10k tiles: `spatial_tokens [10000,65,256]` (X), `token_mask [10000,65]` (m, empty cells = 0), plus `tile_ids`, `splits`, `point_count_per_bin`, `n_points_per_tile`, `metadata` |
|
| 32 |
+
| `encoder_tokens_10k_metadata.json` | extraction metadata |
|
| 33 |
+
| `manifest/split.parquet` | 10k-tile train/val/test split manifest |
|
| 34 |
+
| `manifest/data_config.json` | data configuration reference |
|
| 35 |
+
|
| 36 |
+
## Use
|
| 37 |
+
|
| 38 |
+
```python
|
| 39 |
+
from huggingface_hub import hf_hub_download
|
| 40 |
+
import torch
|
| 41 |
+
|
| 42 |
+
tok = torch.load(hf_hub_download("risenyard/egms-qa-encoder", "encoder_tokens_10k.pt"),
|
| 43 |
+
map_location="cpu", weights_only=False)
|
| 44 |
+
X, m = tok["spatial_tokens"], tok["token_mask"] # [10000,65,256], [10000,65]
|
| 45 |
+
```
|
| 46 |
+
|
| 47 |
+
Re-extracting tokens from raw tiles, or loading the checkpoint architecture,
|
| 48 |
+
needs the model code in the GitHub repo (`egms_encoder`). Place these files at
|
| 49 |
+
`data/encoder/…` of a checkout to reproduce end to end (see the repo README).
|
| 50 |
+
|
| 51 |
+
The raw EGMS Level-3 product is Copernicus data and is not redistributed here.
|
| 52 |
+
Licensed CC-BY-4.0.
|
encoder.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:cdb0bd2437c063a79c871eb54445dbee6fb82bd9e20186768fa5b947ffd9d474
|
| 3 |
+
size 79442395
|
encoder_tokens_10k.pt
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c95bb465bf4a948d8858bcdf51a0ce851e6ba9e849a8db2772fca4f49b14312a
|
| 3 |
+
size 669285010
|
encoder_tokens_10k_metadata.json
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"encoder_checkpoint": "data/encoder/checkpoint/encoder.pt",
|
| 3 |
+
"coord_scale": 3500.0,
|
| 4 |
+
"encoder_args": {
|
| 5 |
+
"v4_config": "data/processed/v4/v4_data_config.json",
|
| 6 |
+
"v4_normalization": "data/processed/v4/v4_normalization.json",
|
| 7 |
+
"output_dir": "outputs/encoder_pretrain",
|
| 8 |
+
"tile_size": 7000.0,
|
| 9 |
+
"min_tile_points": 200,
|
| 10 |
+
"max_tile_points": 4096,
|
| 11 |
+
"tiles_per_batch": 8,
|
| 12 |
+
"d_model": 256,
|
| 13 |
+
"num_layers": 6,
|
| 14 |
+
"num_heads": 8,
|
| 15 |
+
"dropout": 0.1,
|
| 16 |
+
"input_length": 294,
|
| 17 |
+
"mask_ratio": 0.3,
|
| 18 |
+
"mask_strategy": "block",
|
| 19 |
+
"sync_mask": true,
|
| 20 |
+
"mask_schedule": "fixed",
|
| 21 |
+
"eval_mask_ratio": 0.3,
|
| 22 |
+
"model_version": "v3_3",
|
| 23 |
+
"patch_size": 8,
|
| 24 |
+
"temporal_layers": 2,
|
| 25 |
+
"temporal_heads": 4,
|
| 26 |
+
"residual_loss_weight": 1.0,
|
| 27 |
+
"residual_consistency_weight": 0.1,
|
| 28 |
+
"residual_head_mode": "additive",
|
| 29 |
+
"coord_scale": 3500.0,
|
| 30 |
+
"residual_head_lr": 0.0001,
|
| 31 |
+
"init_from_checkpoint": null,
|
| 32 |
+
"point_sampling": "residual_weighted",
|
| 33 |
+
"residual_sampling_alpha": 0.75,
|
| 34 |
+
"max_steps": 150000,
|
| 35 |
+
"duration_hours": null,
|
| 36 |
+
"lr": 0.0004,
|
| 37 |
+
"min_lr": 3e-05,
|
| 38 |
+
"lr_scheduler": "cosine",
|
| 39 |
+
"scheduler_total_steps": 150000,
|
| 40 |
+
"warmup_steps": 1000,
|
| 41 |
+
"weight_decay": 0.01,
|
| 42 |
+
"precision": "bf16",
|
| 43 |
+
"device": "cuda:0",
|
| 44 |
+
"seed": 42,
|
| 45 |
+
"split_strategy": "random",
|
| 46 |
+
"val_fraction": 0.1,
|
| 47 |
+
"test_fraction": 0.1,
|
| 48 |
+
"stratify_bins": 3,
|
| 49 |
+
"val_batches": 16,
|
| 50 |
+
"val_every_steps": 1000,
|
| 51 |
+
"val_seed": 1729,
|
| 52 |
+
"checkpoint_every_steps": 5000,
|
| 53 |
+
"log_every_steps": 200,
|
| 54 |
+
"train_window_steps": 1000,
|
| 55 |
+
"resume_from": null
|
| 56 |
+
},
|
| 57 |
+
"manifest_path": "data/encoder/manifest/split.parquet",
|
| 58 |
+
"data_config_path": "data/encoder/manifest/data_config.json",
|
| 59 |
+
"normalizer_mean": -2.6937686788514412,
|
| 60 |
+
"normalizer_std": 5.697023090760733,
|
| 61 |
+
"tile_size": 7000.0,
|
| 62 |
+
"grid_size": 8,
|
| 63 |
+
"n_tokens": 65,
|
| 64 |
+
"n_tiles": 10000,
|
| 65 |
+
"d_model": 256,
|
| 66 |
+
"input_length": 294,
|
| 67 |
+
"time_window_start": 8,
|
| 68 |
+
"time_window_end": 302,
|
| 69 |
+
"token_layout": "index 0 = CLS, 1..64 = 8x8 bins row-major",
|
| 70 |
+
"extraction_script": "src/egms_encoder/extract_tokens.py",
|
| 71 |
+
"extraction_date_utc": "2026-07-01T00:26:39Z",
|
| 72 |
+
"bin_occupancy_mean": 0.8588296875,
|
| 73 |
+
"bin_occupancy_median": 0.9375,
|
| 74 |
+
"n_points_per_tile_mean": 2018.0485,
|
| 75 |
+
"n_points_per_tile_min": 200,
|
| 76 |
+
"n_points_per_tile_max": 4900
|
| 77 |
+
}
|
manifest/data_config.json
ADDED
|
@@ -0,0 +1,53 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"version": "v4",
|
| 3 |
+
"created": "2026-05-27",
|
| 4 |
+
"source": {
|
| 5 |
+
"tiles_dir": "data/processed/tiles_l3_u_2019_2023_europe",
|
| 6 |
+
"total_tiles_available": 131281
|
| 7 |
+
},
|
| 8 |
+
"filter": {
|
| 9 |
+
"max_nan_mean": 0.02,
|
| 10 |
+
"require_first_valid": 0,
|
| 11 |
+
"require_last_valid_min": 301,
|
| 12 |
+
"min_points": 200,
|
| 13 |
+
"pool_size": 83323,
|
| 14 |
+
"pool_total_points": 101340689
|
| 15 |
+
},
|
| 16 |
+
"time_window": {
|
| 17 |
+
"t_start": 8,
|
| 18 |
+
"t_end": 302,
|
| 19 |
+
"input_length": 294,
|
| 20 |
+
"rationale": "Pool tiles are 100% NaN-free within [t=8, t=302). Earlier steps (t=1,4-7) and tail steps (t=302,303) are systematically missing in 10-21% of pool tiles and are trimmed. Verified by scripts/v4_verify_trim_zero_nan.py on full 83K pool: 0 residual NaN.",
|
| 21 |
+
"compared_to_v33": "V3.3 used 302 steps (t=0..301 of the no_tail parquet). V4 uses 294 steps (t=8..301 of the raw npz). V4 starts ~6 weeks later in 2019."
|
| 22 |
+
},
|
| 23 |
+
"geographic_sampling": {
|
| 24 |
+
"method": "grid_max_npoints_with_round_robin",
|
| 25 |
+
"grid_m": 30000,
|
| 26 |
+
"target_tiles": 10000,
|
| 27 |
+
"sampled_tiles": 10000,
|
| 28 |
+
"occupied_cells": 4142,
|
| 29 |
+
"cells_in_sample": 4142,
|
| 30 |
+
"rounds_used": 3,
|
| 31 |
+
"total_points_sampled": 20180485,
|
| 32 |
+
"seed": 42
|
| 33 |
+
},
|
| 34 |
+
"files": {
|
| 35 |
+
"pool_candidates": "data/processed/v4/v4_pool_candidates.parquet",
|
| 36 |
+
"sample_10k": "data/processed/v4/v4_sample_10k.parquet",
|
| 37 |
+
"split": "data/processed/v4/v4_split.json",
|
| 38 |
+
"nan_profiles_source": "outputs/archive/V4/nan_pattern_analysis_20260527_145457/v4_nan_profiles.parquet"
|
| 39 |
+
},
|
| 40 |
+
"split": {
|
| 41 |
+
"method": "plain_random_tile_level",
|
| 42 |
+
"ratios": {"train": 0.80, "val": 0.10, "test": 0.10},
|
| 43 |
+
"counts": {"train": 8000, "val": 1000, "test": 1000},
|
| 44 |
+
"seed": 1729,
|
| 45 |
+
"n_grid_cells_per_split": {"train": 4022, "val": 925, "test": 923, "total_cells": 4142},
|
| 46 |
+
"backup_spatial_blocked": "data/processed/v4/v4_split_spatial_blocked.{json,parquet}.bak"
|
| 47 |
+
},
|
| 48 |
+
"tile_field_layout": {
|
| 49 |
+
"feature_columns_count": 10,
|
| 50 |
+
"expected_layout": "[easting, northing, height, rmse, mean_velocity, mean_velocity_std, acceleration, acceleration_std, seasonality, seasonality_std, time_series(294)]",
|
| 51 |
+
"note": "LazyTileStore must construct rows in this order from per-tile npz to remain compatible with V3.3 trainer expectations."
|
| 52 |
+
}
|
| 53 |
+
}
|
manifest/split.parquet
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bfb92ef7604d6ab18449f24a10d519985030c87cf6bf380dbc338ed5c3d91784
|
| 3 |
+
size 434406
|