From 5c2b60a4d5d77af5b44309e974e75130d4d97f10 Mon Sep 17 00:00:00 2001 From: hanhxiao Date: Wed, 21 Aug 2019 16:49:03 +0800 Subject: [PATCH] fix: remove target_image_size --- gnes/preprocessor/image/segmentation.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnes/preprocessor/image/segmentation.py b/gnes/preprocessor/image/segmentation.py index 0d297d36..cc87d9bc 100644 --- a/gnes/preprocessor/image/segmentation.py +++ b/gnes/preprocessor/image/segmentation.py @@ -83,8 +83,8 @@ def apply(self, doc: 'gnes_pb2.Document'): self.logger.error('bad document: "raw_bytes" is empty!') def _crop_resize(self, original_image, coordinates): - return np.array(original_image.crop(coordinates).resize((self.target_img_size, - self.target_img_size))) + return np.array(original_image.crop(coordinates).resize((self.target_width, + self.target_height))) def _get_seg_offset_nd(self, all_subareas: List[List[int]], index: List[List[int]], chunk: List[int]) -> List[int]: iou_list = [self._cal_iou(area, chunk) for area in all_subareas]