From a2f1824c0d0cde3d7e4a0f10dbe13c71c27f056c Mon Sep 17 00:00:00 2001 From: mfurkancoskun Date: Mon, 29 Jul 2019 15:10:39 +0300 Subject: [PATCH] TypeError Fix (#596) Fixed: TypeError while using XML to YOLO converter #595 --- utils/yolo/converter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/yolo/converter.py b/utils/yolo/converter.py index 23da12b9..6539eb15 100644 --- a/utils/yolo/converter.py +++ b/utils/yolo/converter.py @@ -207,8 +207,8 @@ def process_cvat_xml(xml_file, image_dir, output_dir,username,password,ilabels): else: for img_tag in cvat_xml.findall('image'): image_name = img_tag.get('name') - width = img_tag.get('width') - height = img_tag.get('height') + width = int(img_tag.get('width')) + height = int(img_tag.get('height')) image_path = os.path.join(image_dir, image_name) if not os.path.exists(image_path): log.warn('{} image cannot be found. Is `{}` image directory correct?'.