From 918e900110ecac1db8b3416b095af661375981c8 Mon Sep 17 00:00:00 2001 From: Steven Lang Date: Wed, 2 Jan 2019 21:06:24 +0100 Subject: [PATCH] Update scale_pyramid with area downsampling Replace bilinear with area interpolation for the scale pyramid as suggested in the official implementation https://github.com/mrharicot/monodepth/blob/5bc4bb1eaf6f6c78ec3bcda37af4eeea9fc4f0c6/monodepth_model.py#L82 --- loss.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/loss.py b/loss.py index 7aa4f9c..a683750 100644 --- a/loss.py +++ b/loss.py @@ -21,8 +21,8 @@ def scale_pyramid(self, img, num_scales): nh = h // ratio nw = w // ratio scaled_imgs.append(nn.functional.interpolate(img, - size=[nh, nw], mode='bilinear', - align_corners=True)) + size=[nh, nw], mode="area", + align_corners=None)) return scaled_imgs def gradient_x(self, img):