diff --git a/utils/data_loading.py b/utils/data_loading.py index e2e1dd7..2d6e4e6 100644 --- a/utils/data_loading.py +++ b/utils/data_loading.py @@ -30,7 +30,7 @@ class BasicDataset(Dataset): w, h = pil_img.size newW, newH = int(scale * w), int(scale * h) assert newW > 0 and newH > 0, 'Scale is too small, resized images would have no pixel' - pil_img = pil_img.resize((newW, newH)) + pil_img = pil_img.resize((newW, newH), resample=Image.NEAREST if is_mask else Image.BICUBIC) img_ndarray = np.asarray(pil_img) if img_ndarray.ndim == 2 and not is_mask: