Expand regional corpus and aerial finetuning controls
This commit is contained in:
@@ -22,3 +22,7 @@ def test_empty_reference_counts_false_positives() -> None:
|
||||
predictions = [((0.0, 0.0, 10.0, 10.0), 0.4)]
|
||||
assert MODULE.match_boxes(predictions, [], confidence=0.25, match_iou=0.5) == (0, 1, 0)
|
||||
assert MODULE.match_boxes(predictions, [], confidence=0.5, match_iou=0.5) == (0, 0, 0)
|
||||
|
||||
|
||||
def test_box_scaling_preserves_center() -> None:
|
||||
assert MODULE.scale_box((10.0, 20.0, 30.0, 40.0), 1.5) == (5.0, 15.0, 35.0, 45.0)
|
||||
|
||||
@@ -33,6 +33,32 @@ def test_training_command_is_cuda_deterministic_and_bound_to_frozen_inputs(tmp_p
|
||||
assert "epochs=160" in command
|
||||
assert "max_det=1000" in command
|
||||
assert "imgsz=640" in command
|
||||
assert "optimizer=auto" in command
|
||||
assert "mosaic=1.0" in command
|
||||
|
||||
|
||||
def test_training_command_supports_conservative_aerial_finetuning(tmp_path: Path) -> None:
|
||||
command = MODULE.training_command(
|
||||
"yolo",
|
||||
model=tmp_path / "base.pt",
|
||||
data=tmp_path / "dataset.yaml",
|
||||
project=tmp_path / "runs",
|
||||
name="aerial",
|
||||
epochs=50,
|
||||
seed=42,
|
||||
batch=2,
|
||||
workers=0,
|
||||
optimizer="AdamW",
|
||||
lr0=0.0001,
|
||||
mosaic=0.0,
|
||||
scale=0.2,
|
||||
translate=0.05,
|
||||
)
|
||||
assert "optimizer=AdamW" in command
|
||||
assert "lr0=0.0001" in command
|
||||
assert "mosaic=0.0" in command
|
||||
assert "scale=0.2" in command
|
||||
assert "translate=0.05" in command
|
||||
assert f"data={tmp_path / 'dataset.yaml'}" in command
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user