From 2794fbe31cb89dd09a3ef2763626b41696c2ab0b Mon Sep 17 00:00:00 2001 From: greatx Date: Fri, 25 Nov 2022 10:33:42 +0800 Subject: [PATCH] bug fixed --- README.md | 1 - src/labelme2yolo/__about__.py | 2 +- src/labelme2yolo/l2y.py | 3 +-- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 6df8de5..4955cc1 100644 --- a/README.md +++ b/README.md @@ -13,7 +13,6 @@ If you've already marked your segmentation dataset by LabelMe, it's easy to use --------- ## New - - export data as yolo polygon annotation (for YOLOv5 v7.0 segmentation) ## Installation diff --git a/src/labelme2yolo/__about__.py b/src/labelme2yolo/__about__.py index 2fc3af0..7040aae 100644 --- a/src/labelme2yolo/__about__.py +++ b/src/labelme2yolo/__about__.py @@ -2,4 +2,4 @@ # # SPDX-License-Identifier: MIT -__version__ = '0.0.5' +__version__ = '0.0.6' diff --git a/src/labelme2yolo/l2y.py b/src/labelme2yolo/l2y.py index 6075c01..55b3aba 100644 --- a/src/labelme2yolo/l2y.py +++ b/src/labelme2yolo/l2y.py @@ -119,7 +119,6 @@ def save_yolo_image(json_data, json_name, image_dir_path, target_dir): return img_path - class Labelme2YOLO(object): def __init__(self, json_dir): @@ -326,7 +325,7 @@ class Labelme2YOLO(object): yaml_file.write('nc: %i\n' % len(self._label_id_map)) names_str = '' - + for label, _ in self._label_id_map.items(): names_str += "'%s', " % label names_str = names_str.rstrip(", ")