Support larger operator training samples
This commit is contained in:
@@ -43,6 +43,9 @@ def test_prepare_operator_real_data_samples_help_does_not_require_gis_dependenci
|
||||
assert result.returncode == 0
|
||||
assert "Prepare real Digitaal Vlaanderen" in result.stdout
|
||||
assert "--samples" in result.stdout
|
||||
assert "--width" in result.stdout
|
||||
assert "--height" in result.stdout
|
||||
assert "--half-size-scale" in result.stdout
|
||||
|
||||
|
||||
def test_multi_sample_detection_quality_matrix_runs_existing_matrix_for_each_sample() -> None:
|
||||
|
||||
@@ -63,6 +63,27 @@ def test_operator_background_candidates_are_unique_enough_for_hard_negative_trai
|
||||
assert half_sizes == {260.0}
|
||||
|
||||
|
||||
def test_operator_sample_can_be_scaled_for_larger_training_aoi(tmp_path: Path) -> None:
|
||||
module = load_sample_preparer()
|
||||
|
||||
sample = module.OperatorSample(
|
||||
slug="geel",
|
||||
display_name="Geel",
|
||||
center_lon=5.0,
|
||||
center_lat=51.0,
|
||||
half_size_m=250.0,
|
||||
)
|
||||
|
||||
configured = module.apply_sample_overrides(sample, width=1024, height=1024, half_size_scale=2.0)
|
||||
ortho_path, reference_path = module.sample_artifact_paths(configured, tmp_path)
|
||||
|
||||
assert configured.width == 1024
|
||||
assert configured.height == 1024
|
||||
assert configured.half_size_m == 500.0
|
||||
assert ortho_path.name == "geel_orthophoto_wms_1024.tif"
|
||||
assert reference_path.name == "geel_grb_gbg_buildings.geojson"
|
||||
|
||||
|
||||
def test_background_candidate_can_write_empty_reference_geojson(tmp_path: Path, monkeypatch) -> None:
|
||||
module = load_sample_preparer()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user