From cdee98bfb6240916939dfea3865515784be6c439 Mon Sep 17 00:00:00 2001 From: xavier Date: Wed, 15 Jan 2020 11:13:46 +0100 Subject: [PATCH] Correction in annotation boundaries --- slice_image_with_annotations.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slice_image_with_annotations.py b/slice_image_with_annotations.py index 19eaff5..bdf2ffa 100644 --- a/slice_image_with_annotations.py +++ b/slice_image_with_annotations.py @@ -47,8 +47,8 @@ def slice(image, xml, size=(2, 2), path='', suffix=''): if( xmin > x and xmax > x and ymin > y and ymax > y and - xmin < yy and xmax < yy and - ymin < xx and ymax < xx + xmin < xx and xmax < xx and + ymin < yy and ymax < yy ): obj = ET.SubElement(annotation, 'object') ET.SubElement(obj, 'name').text = member[0].text