From 741ad20dcba84d1ff5eaa5fb8b7c2886823c107f Mon Sep 17 00:00:00 2001 From: Jens Date: Mon, 27 Jul 2026 05:19:14 +0200 Subject: [PATCH] Keep visible roof merging opt-in --- docs/BELGIUM_BUILDING_TRAINING_LOOP.md | 14 +++++++------- scripts/assemble_belgium_building_corpus.py | 3 ++- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/docs/BELGIUM_BUILDING_TRAINING_LOOP.md b/docs/BELGIUM_BUILDING_TRAINING_LOOP.md index 0fdf60c8..7dd56e6e 100644 --- a/docs/BELGIUM_BUILDING_TRAINING_LOOP.md +++ b/docs/BELGIUM_BUILDING_TRAINING_LOOP.md @@ -95,10 +95,10 @@ audit but excluded from training as `created_after_imagery_period`. UrbIS does not expose an equivalent feature creation field in this acquisition contract, so its remaining temporal relation stays an explicit sample-level limitation. -The detector target is an imagery-visible roof instance, not an administrative -address or cadastral unit. Source footprints that truly touch or overlap are -dissolved into one roof instance before tiling; separated footprints are never -bridged. The audit retains every contributing native feature identifier and -reports both the accepted source-feature count and resulting visible-instance -count. This prevents dense row-house subdivisions that cannot be distinguished -from the orthophoto from becoming contradictory image labels. +An opt-in visible-roof experiment can dissolve source footprints that truly +touch or overlap; separated footprints are never bridged. The audit retains +every contributing native feature identifier and reports both source-feature +and visible-instance counts. This mode is not the default: the Belgium v8 +experiment showed that unconditional touching-footprint dissolve can merge +whole urban blocks and therefore must pass the same independent gates before +it can replace native instances. diff --git a/scripts/assemble_belgium_building_corpus.py b/scripts/assemble_belgium_building_corpus.py index cdd4e316..b03a3b3d 100644 --- a/scripts/assemble_belgium_building_corpus.py +++ b/scripts/assemble_belgium_building_corpus.py @@ -102,6 +102,7 @@ def main() -> int: parser.add_argument("--output-dir", type=Path, required=True) parser.add_argument("--version", default="building-be-v1") parser.add_argument("--min-label-px", type=float, default=3.0) + parser.add_argument("--merge-touching-roofs", action="store_true") parser.add_argument("--freeze", action="store_true") args = parser.parse_args() @@ -150,7 +151,7 @@ def main() -> int: ), reference_observed_at=reference.observed_at.isoformat() if reference.observed_at else None, imagery_valid_to=raster.valid_to.isoformat() if raster.valid_to else None, - merge_touching_roofs=True, + merge_touching_roofs=args.merge_touching_roofs, ) normalized_target.write_text(json.dumps(normalized, ensure_ascii=False), encoding="utf-8") audit_target.write_text(json.dumps(audit, ensure_ascii=False, indent=2), encoding="utf-8")