From c0e57460963ce596e2e9896c1e5742a56b1873d1 Mon Sep 17 00:00:00 2001 From: "Kaustubh \"Kauby\" Sakhalkar" Date: Sun, 25 Feb 2018 14:24:57 +0100 Subject: [PATCH] Update first_stage.py --- src/first_stage.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/first_stage.py b/src/first_stage.py index 7c1e4b9..a45384d 100644 --- a/src/first_stage.py +++ b/src/first_stage.py @@ -26,7 +26,7 @@ def run_first_stage(image, net, scale, threshold): # scale the image and convert it to a float array width, height = image.size sw, sh = math.ceil(width*scale), math.ceil(height*scale) - img = image.resize((sw, sh), Image.BILINEAR) + img = image.resize((float(sw), float(sh)), Image.BILINEAR) img = np.asarray(img, 'float32') img = Variable(torch.FloatTensor(_preprocess(img)), volatile=True)