replace tqdm with rich (#43)
This commit is contained in:
parent
94c14a6430
commit
f777359f33
|
@ -26,7 +26,7 @@ dependencies = [
|
||||||
"opencv-python>=4.1.2",
|
"opencv-python>=4.1.2",
|
||||||
"Pillow>=9.2,<10.3",
|
"Pillow>=9.2,<10.3",
|
||||||
"numpy>=1.23.1,<1.27.0",
|
"numpy>=1.23.1,<1.27.0",
|
||||||
"tqdm"
|
"rich"
|
||||||
]
|
]
|
||||||
dynamic = ["version"]
|
dynamic = ["version"]
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
opencv-python
|
opencv-python
|
||||||
Pillow
|
Pillow
|
||||||
numpy
|
numpy
|
||||||
tqdm
|
rich
|
||||||
|
|
|
@ -4,4 +4,4 @@
|
||||||
"""
|
"""
|
||||||
about version
|
about version
|
||||||
"""
|
"""
|
||||||
__version__ = "0.1.5"
|
__version__ = "0.1.6"
|
||||||
|
|
|
@ -21,7 +21,7 @@ import PIL.Image
|
||||||
import PIL.ImageOps
|
import PIL.ImageOps
|
||||||
import cv2
|
import cv2
|
||||||
import numpy as np
|
import numpy as np
|
||||||
import tqdm
|
from rich.progress import track
|
||||||
|
|
||||||
# set seed
|
# set seed
|
||||||
random.seed(12345678)
|
random.seed(12345678)
|
||||||
|
@ -246,7 +246,7 @@ class Labelme2YOLO:
|
||||||
for target_dir, json_names in zip(dirs, names):
|
for target_dir, json_names in zip(dirs, names):
|
||||||
logger.info("Converting %s set ...", target_dir)
|
logger.info("Converting %s set ...", target_dir)
|
||||||
with Pool(os.cpu_count() - 1) as pool:
|
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))
|
pool.apply(self.covert_json_to_text, (target_dir, json_name))
|
||||||
|
|
||||||
self._save_dataset_yaml()
|
self._save_dataset_yaml()
|
||||||
|
|
Loading…
Reference in New Issue