From 9559c65c588febfbab4b47b2ccd4c0365766933a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Richard=20L=C3=B6wenstr=C3=B6m?= Date: Sat, 15 Oct 2022 17:59:59 +0200 Subject: [PATCH] fix: incorrect resizing in adabins --- perceptor/models/adabins_depth/adabins_depth.py | 4 ++-- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/perceptor/models/adabins_depth/adabins_depth.py b/perceptor/models/adabins_depth/adabins_depth.py index 87b9ce0..21ef0f3 100644 --- a/perceptor/models/adabins_depth/adabins_depth.py +++ b/perceptor/models/adabins_depth/adabins_depth.py @@ -38,12 +38,12 @@ def forward(self, images: Tensor.dims("NCHW")) -> Tensor.dims("NCHW"): if image_area > MAX_ADABINS_AREA: scale = np.sqrt(MAX_ADABINS_AREA) / np.sqrt(image_area) images = transforms.resize( - images, out_shape=(int(w * scale), int(h * scale)), resample="lancsoz3" + images, out_shape=(int(h * scale), int(w * scale)), resample="lanczos3" ) elif image_area < MIN_ADABINS_AREA: scale = np.sqrt(MIN_ADABINS_AREA) / np.sqrt(image_area) images = transforms.resize( - images, out_shape=(int(w * scale), int(h * scale)), resample="bicubic" + images, out_shape=(int(h * scale), int(w * scale)), resample="bicubic" ) return self.model.predict(images) diff --git a/pyproject.toml b/pyproject.toml index 19c1ddf..32c98ab 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "perceptor" -version = "0.6.5" +version = "0.6.6" description = "Modular image generation library" authors = ["Richard Löwenström ", "dribnet"] readme = "README.md"