diff --git a/pyproject.toml b/pyproject.toml index 74c2e1d..95a2b5d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,7 @@ dependencies = [ "opencv-python>=4.1.2", "Pillow>=9.2,<10.3", "numpy>=1.23.1,<1.27.0", - "tqdm" + "rich" ] dynamic = ["version"] diff --git a/requirements.txt b/requirements.txt index c525125..f802fac 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,4 +1,4 @@ opencv-python Pillow numpy -tqdm +rich diff --git a/src/labelme2yolo/__about__.py b/src/labelme2yolo/__about__.py index 0822a15..c58ae93 100644 --- a/src/labelme2yolo/__about__.py +++ b/src/labelme2yolo/__about__.py @@ -4,4 +4,4 @@ """ about version """ -__version__ = "0.1.5" +__version__ = "0.1.6" diff --git a/src/labelme2yolo/l2y.py b/src/labelme2yolo/l2y.py index 92d1a1b..0ca97fc 100644 --- a/src/labelme2yolo/l2y.py +++ b/src/labelme2yolo/l2y.py @@ -21,7 +21,7 @@ import PIL.Image import PIL.ImageOps import cv2 import numpy as np -import tqdm +from rich.progress import track # set seed random.seed(12345678) @@ -246,7 +246,7 @@ class Labelme2YOLO: for target_dir, json_names in zip(dirs, names): logger.info("Converting %s set ...", target_dir) with Pool(os.cpu_count() - 1) as pool: - for json_name in tqdm.tqdm(json_names): + for json_name in track(json_names): pool.apply(self.covert_json_to_text, (target_dir, json_name)) self._save_dataset_yaml()