Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# @package _global_
defaults:
- override /model: heat_full_fusion_avg_reg
- override /data: heat_guatemala
- override /metrics: guatemala_regression

tags: ["heat_island", "guatemala", "full_fusion_avg", "tessera", "regression"]
seed: 12345

trainer:
min_epochs: 1
max_epochs: 50

data:
batch_size: 64
dataset:
modalities:
coords: {}
tessera:
year: 2024
size: 10
format: npy

callbacks:
model_checkpoint:
monitor: val_r2
mode: max
early_stopping:
monitor: val_r2
mode: max
patience: 20

logger:
wandb:
tags: ${tags}
group: "heat_island"
aim:
experiment: "heat_island"
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# @package _global_
defaults:
- override /model: heat_tessera_tabular_avg_best
- override /data: heat_guatemala
- override /metrics: guatemala_regression

tags: ["heat_island", "guatemala", "full_fusion_avg", "tessera", "regression"]
seed: 12345

trainer:
min_epochs: 1
max_epochs: 50

data:
batch_size: 64
dataset:
modalities:
coords: {}
tessera:
year: 2024
size: 10
format: npy

callbacks:
model_checkpoint:
monitor: val_r2
mode: max
early_stopping:
monitor: val_r2
mode: max
patience: 20

logger:
wandb:
tags: ${tags}
group: "heat_island"
aim:
experiment: "heat_island"
29 changes: 29 additions & 0 deletions configs/inference_heat_guatemala_concept_similarity.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
# Does text similarity agree with measured LST?
# Run: python src/inference/inference_heat_guatemala_concept_similarity.py
defaults:
- paths: ${oc.env:STORAGE_MODE,local}
- extras: default
- hydra: default
- data: heat_guatemala_tessera_text
- _self_

task_name: "inference"
tags: ["inference", "heat_island", "guatemala", "concept_similarity"]
seed: 12345

# Aligned embeddings come from the alignment run, LST predictions from the
# predictive run. Both consume the same pooled Tessera vector.
alignment_ckpt_path: ${paths.checkpoint_dir}/epoch_035.ckpt
predictive_ckpt_path: ${paths.checkpoint_dir}/epoch_093.ckpt

concepts_file: ${paths.root_dir}/outputs/demo_concepts.json
split: test
device: cuda

output_csv: ${paths.root_dir}/outputs/heat_guatemala_concept_similarity_per_location.csv
output_summary_csv: ${paths.root_dir}/outputs/heat_guatemala_concept_similarity_summary.csv

data:
dataset:
use_target_data: true # the measured LST is the thing being validated against
saved_split_file_name: "split_indices_heat_guatemala_2026-08-27-clean.pth"
28 changes: 28 additions & 0 deletions configs/inference_heat_guatemala_embeddings.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# Aligned Tessera embeddings for the Guatemala UHI use case.
# Run: python src/inference/inference_heat_guatemala_embeddings.py
defaults:
- paths: ${oc.env:STORAGE_MODE,local}
- extras: default
- hydra: default
- _self_

task_name: "inference"
tags: ["inference", "heat_island", "guatemala", "tessera"]
seed: 12345

alignment_ckpt_path: ${paths.checkpoint_dir}/epoch_035.ckpt

points_csv: ${paths.data_dir}/heat_guatemala/model_ready_heat_guatemala.csv
limit: null # process only the first N rows, for a quick check

tile_dir: ${paths.data_dir}/heat_guatemala/eo/tessera
year: 2024
tile_size: 10
# v1.1 covers very little of Guatemala City (11 tiles for 2024 in the 1x1 degree
# box); every tile in this use case came from v1.
tessera_version: v1

output_csv: ${paths.root_dir}/outputs/heat_guatemala_aligned_embeddings.csv
wide_columns: false # true: one column per dimension instead of one cell per vector
normalize: true # the contrastive loss normalises, so keep this on for cosine
device: cuda
2 changes: 0 additions & 2 deletions configs/model/heat_full_fusion_cnn_best.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,6 @@ geo_encoder:
geo_data_name: tessera
resnet_version: 18
pretrained_cnn: imagenet
freezing_strategy: all
output_dim: 256
fusion_strategy: concat
prediction_head:
_target_: src.models.components.pred_heads.mlp_regression_head.MLPRegressionPredictionHead
Expand Down
2 changes: 0 additions & 2 deletions configs/model/heat_tessera_cnn_best.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@ geo_encoder:
geo_data_name: tessera
resnet_version: 34
pretrained_cnn: imagenet
freezing_strategy: all
output_dim: 256
prediction_head:
_target_: src.models.components.pred_heads.mlp_regression_head.MLPRegressionPredictionHead
nn_layers: 2
Expand Down
45 changes: 45 additions & 0 deletions outputs/demo_concepts.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
{
"_comment": "Caption vocabulary for the Guatemala UHI demo. Each concept is scored by encoding every caption with the alignment model's text branch, averaging, L2-normalising, and taking the dot product with a location's aligned embedding. Only concepts with a positive skill index on the test split are included - see heat_guatemala_concept_evaluation.csv.",
"_checkpoint": "data/checkpoints/other_ckpt/epoch_035.ckpt",
"concepts": {
"vegetation_greenness": {
"label": "Vegetation greenness",
"recommended": true,
"skill_index": 0.7476,
"captions": [
"an area with high vegetation greenness",
"a location with lush green vegetation",
"a green area with healthy dense vegetation"
]
},
"forest_cover": {
"label": "Forest cover",
"recommended": true,
"skill_index": 0.5409,
"captions": [
"an area with dense forest cover",
"a location covered by forest",
"a heavily forested area with many trees"
]
},
"builtup_age": {
"label": "Established urban fabric",
"recommended": true,
"skill_index": 0.478,
"captions": [
"a long-established built-up area",
"an old urban area built many decades ago",
"a mature consolidated urban neighbourhood"
]
}
},
"_excluded": {
"_note": "These scored at or below baseline on the test split. They will still return confident-looking numbers, which is exactly why they must stay out of the demo vocabulary.",
"tree_cover": 0.2178,
"lst_max_hottest": -0.1336,
"ndwi_water": -0.3533,
"slope": -0.0006,
"cool_area_r_vs_measured_lst": 0.217,
"_cool_area_note": "Removed after validation: similarity to 'coolest areas' correlates POSITIVELY with measured LST (r=+0.217), i.e. it points at hotter places. It tracks established urban fabric, not coolness. Captions kept here for reference only: one of the coolest areas in the city | a location with low land surface temperature | a cool shaded part of the urban area"
}
}
Loading
Loading