Add dated regional imagery training sources
GeoIntel release gates / Compile, test, contracts and builds (push) Canceled after 0s
GeoIntel release gates / Python and npm vulnerability policy (push) Canceled after 0s
GeoIntel release gates / GIS image, SBOM and container scan (push) Canceled after 0s

This commit is contained in:
Jens
2026-07-27 02:39:47 +02:00
parent e607cbe724
commit 65d263a37b
5 changed files with 60 additions and 10 deletions
+6 -5
View File
@@ -28,9 +28,9 @@ from app.models import Dataset # noqa: E402
from normalize_belgium_building_labels import normalize # noqa: E402
REGION_SOURCES = {
"flanders": ("digitaal_vlaanderen_orthophoto", "grb"),
"wallonia": ("spw_orthophoto", "spw_picc"),
"brussels": ("urbis_orthophoto", "urbis"),
"flanders": ({"digitaal_vlaanderen_orthophoto"}, "grb"),
"wallonia": ({"spw_orthophoto"}, "spw_picc"),
"brussels": ({"urbis_orthophoto", "digitaal_vlaanderen_orthophoto"}, "urbis"),
}
SPLITS = {"train", "val", "calibration", "test", "background-test"}
@@ -56,8 +56,8 @@ def _validate_pair(sample: dict[str, Any], raster: Dataset, reference: Dataset)
region = str(sample.get("region") or "").lower()
if region not in REGION_SOURCES:
raise SystemExit(f"Unsupported region for {sample.get('sample_slug')}: {region}")
expected_raster, expected_reference = REGION_SOURCES[region]
if raster.source_name != expected_raster:
expected_rasters, expected_reference = REGION_SOURCES[region]
if raster.source_name not in expected_rasters:
raise SystemExit(f"Raster provider mismatch for {sample['sample_slug']}: {raster.source_name}")
if reference.source_name != expected_reference or reference.reference_layer_name != "buildings":
raise SystemExit(f"Reference provider/layer mismatch for {sample['sample_slug']}")
@@ -156,6 +156,7 @@ def main() -> int:
{
"sample_slug": slug,
"sample_role": sample.get("sample_role", "positive"),
"require_empty": bool(sample.get("require_empty", False)),
"region": region,
"context": sample.get("context"),
"split": sample["split"],