tiling for enhancement: ensure precision by rounding

This commit is contained in:
Robert Sachunsky 2026-07-30 15:29:03 +02:00
parent b2777a2562
commit 5f4e4fb8bd

View file

@ -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: