From 3a69670e003dd70d2b1e91a9e0ec2199b8f02c35 Mon Sep 17 00:00:00 2001 From: Dennis Loevlie <59749099+loevlie@users.noreply.github.com> Date: Thu, 25 Jan 2024 16:09:20 -0500 Subject: [PATCH] Bug Fix - Type error when evaluating metric depth on Kitti --- metric_depth/zoedepth/models/base_models/depth_anything.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/metric_depth/zoedepth/models/base_models/depth_anything.py b/metric_depth/zoedepth/models/base_models/depth_anything.py index e3e6d4a4..6073074d 100644 --- a/metric_depth/zoedepth/models/base_models/depth_anything.py +++ b/metric_depth/zoedepth/models/base_models/depth_anything.py @@ -171,7 +171,7 @@ def get_size(self, width, height): def __call__(self, x): width, height = self.get_size(*x.shape[-2:][::-1]) - return nn.functional.interpolate(x, (height, width), mode='bilinear', align_corners=True) + return nn.functional.interpolate(x, (int(height), int(width)), mode='bilinear', align_corners=True) class PrepForMidas(object): def __init__(self, resize_mode="minimal", keep_aspect_ratio=True, img_size=384, do_resize=True):