Normalize touching footprints as visible roof instances
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 05:06:20 +02:00
parent 7744803461
commit de0406130c
5 changed files with 112 additions and 4 deletions
@@ -80,6 +80,7 @@ def main() -> int:
parser.add_argument("--match-iou", type=float, default=0.25)
parser.add_argument("--device", default="cuda:0")
parser.add_argument("--split", default="val")
parser.add_argument("--augment", action="store_true", help="Enable deterministic YOLO test-time augmentation.")
args = parser.parse_args()
from ultralytics import YOLO
@@ -98,7 +99,13 @@ def main() -> int:
}
tiles = [item for item in summary["tiles"] if item.get("kept", True) and item["split"] == args.split]
image_paths = [item["image_path"] for item in tiles]
results = YOLO(str(args.model)).predict(image_paths, conf=min(args.thresholds), device=args.device, verbose=False)
results = YOLO(str(args.model)).predict(
image_paths,
conf=min(args.thresholds),
device=args.device,
augment=args.augment,
verbose=False,
)
observations: list[dict[str, Any]] = []
for tile, result in zip(tiles, results, strict=True):
height, width = result.orig_shape
@@ -144,6 +151,7 @@ def main() -> int:
"summary": str(args.summary),
"split": args.split,
"match_iou": args.match_iou,
"test_time_augmentation": args.augment,
"tile_count": len(tiles),
"sweeps": sweeps,
}