diff --git a/src/labelme2yolo/l2y.py b/src/labelme2yolo/l2y.py index 74d57e5..d70f17a 100644 --- a/src/labelme2yolo/l2y.py +++ b/src/labelme2yolo/l2y.py @@ -249,7 +249,7 @@ def convert(self, val_size, test_size): with Pool(os.cpu_count() - 1) as pool, Progress() as progress: task = progress.add_task("[cyan]Converting...", total=len(json_names)) func = partial(self.covert_json_to_text, target_dir) - for _ in pool.map(func, json_names): + for _ in pool.imap_unordered(func, json_names): progress.update(task, advance=1) self._save_dataset_yaml()