未验证 提交 83e9e08f 编写于 作者: G Guanghua Yu 提交者: GitHub

fix im_info in solov2 deploy infer (#1910)

上级 ef65c7e1
......@@ -86,6 +86,9 @@ class Resize(object):
"""
im_channel = im.shape[2]
im_scale_x, im_scale_y = self.generate_scale(im)
im_info['resize_shape'] = [
im_scale_x * float(im.shape[0]), im_scale_y * float(im.shape[1])
]
if self.use_cv2:
im = cv2.resize(
im,
......@@ -115,7 +118,6 @@ class Resize(object):
im = padding_im
im_info['scale'] = [im_scale_x, im_scale_y]
im_info['resize_shape'] = im.shape[:2]
return im, im_info
def generate_scale(self, im):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册