replace tqdm with rich (#43)

This commit is contained in:
Wang Xin 2024-02-28 23:53:11 +08:00 committed by GitHub
parent 94c14a6430
commit f777359f33
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 5 additions and 5 deletions

View File

@ -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"]

View File

@ -1,4 +1,4 @@
opencv-python
Pillow
numpy
tqdm
rich

View File

@ -4,4 +4,4 @@
"""
about version
"""
__version__ = "0.1.5"
__version__ = "0.1.6"

View File

@ -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()