From 7159fd15953d3e49ebebaf18258b55c5e89956a3 Mon Sep 17 00:00:00 2001 From: Stephane Chavin <stephanechvn@gmail.com> Date: Wed, 26 Apr 2023 20:23:05 +0200 Subject: [PATCH] correction --- labelme2yolo.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/labelme2yolo.py b/labelme2yolo.py index f526962..6c1a7c0 100644 --- a/labelme2yolo.py +++ b/labelme2yolo.py @@ -30,10 +30,10 @@ for index, labelme_annotation_path in enumerate(glob(f'{args.path_to_data}/*.jso labelme_annotation_file = open(labelme_annotation_path, 'r') labelme_annotation = json.load(labelme_annotation_file) - yolo_annotation_path = os.path.join(args.direction,'labels', image_id + '.txt') + yolo_annotation_path = os.path.join(args.directory,'labels', image_id + '.txt') yolo_annotation_file = open(yolo_annotation_path, 'w') yolo_image = base64.decodebytes(labelme_annotation['imageData'].encode()) - yolo_image_path = os.path.join(args.direction, 'labels', image_id + '.jpg') + yolo_image_path = os.path.join(args.directory, 'labels', image_id + '.jpg') # Write YOLO image (and it to the list) yolo_image_file = open(yolo_image_path, 'wb') -- GitLab