From 8e969a1bb161ff7dba999285d8200a5b38a951ff Mon Sep 17 00:00:00 2001 From: jcc Date: Tue, 8 Jun 2021 14:22:32 +0800 Subject: [PATCH] modified line35 and line38 type(off)=int --- eval_image.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/eval_image.py b/eval_image.py index c93e91c..41b01d2 100755 --- a/eval_image.py +++ b/eval_image.py @@ -32,10 +32,10 @@ def eval(): im = caffe.io.load_image(args.image) h, w, _ = im.shape if h < w: - off = (w - h) / 2 + off = int((w - h) / 2) im = im[:, off:off + h] else: - off = (h - w) / 2 + off = int((h - w) / 2) im = im[off:off + h, :] im = caffe.io.resize_image(im, [nh, nw])