Normalize touching footprints as visible roof instances
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user