From 9f1f941c93b815db496c7e44512835ddcf44282b Mon Sep 17 00:00:00 2001 From: Sishxo <10180657@mail.ecust.edu.cn> Date: Mon, 18 Sep 2023 07:53:51 +0000 Subject: [PATCH] Fix the key error 'x' when export pascal VOC --- label_studio_converter/converter.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/label_studio_converter/converter.py b/label_studio_converter/converter.py index f1bab5e3..342ad692 100644 --- a/label_studio_converter/converter.py +++ b/label_studio_converter/converter.py @@ -1048,7 +1048,10 @@ def create_child_node(doc, tag, attr, parent_node): ) if key is None or len(bbox[key]) == 0: continue - + + if 'x' not in bbox and bbox['format']=='rle' and bbox['type']=='RectangleLabels': + continue + name = bbox[key][0] x = int(bbox['x'] / 100 * width) y = int(bbox['y'] / 100 * height)