From 5f4e4fb8bd0c8b33cfce4505ecbfd891c35d0ba6 Mon Sep 17 00:00:00 2001 From: Robert Sachunsky Date: Thu, 30 Jul 2026 15:29:03 +0200 Subject: [PATCH] tiling for enhancement: ensure precision by rounding --- src/eynollah/utils/tiling.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/eynollah/utils/tiling.py b/src/eynollah/utils/tiling.py index a0a8822..48f48bb 100644 --- a/src/eynollah/utils/tiling.py +++ b/src/eynollah/utils/tiling.py @@ -159,7 +159,7 @@ def do_prediction( img_patch[:] = 0 if is_enhancement: - seg = (prediction * 255).astype(np.uint8) + seg = np.round(prediction * 255).astype(np.uint8) else: seg = np.argmax(prediction, axis=2).astype(np.uint8) if thresholding_for_some_classes: