From 14fdead9ab88c7dd45e750c2fafa2e5b12855012 Mon Sep 17 00:00:00 2001 From: littletomatodonkey Date: Thu, 30 Jul 2020 02:00:25 +0000 Subject: [PATCH] fix windows ms --- ppocr/data/det/dataset_traversal.py | 2 +- ppocr/data/rec/dataset_traversal.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/ppocr/data/det/dataset_traversal.py b/ppocr/data/det/dataset_traversal.py index 737cbe2e..92b9aac4 100644 --- a/ppocr/data/det/dataset_traversal.py +++ b/ppocr/data/det/dataset_traversal.py @@ -43,7 +43,7 @@ class TrainReader(object): img_num = len(label_infor_list) img_id_list = list(range(img_num)) random.shuffle(img_id_list) - if sys.platform == "win32": + if sys.platform == "win32" and self.num_workers != 1: print("multiprocess is not fully compatible with Windows." "num_workers will be 1.") self.num_workers = 1 diff --git a/ppocr/data/rec/dataset_traversal.py b/ppocr/data/rec/dataset_traversal.py index 510a0284..1e9dbb9c 100755 --- a/ppocr/data/rec/dataset_traversal.py +++ b/ppocr/data/rec/dataset_traversal.py @@ -233,7 +233,7 @@ class SimpleReader(object): img_num = len(label_infor_list) img_id_list = list(range(img_num)) random.shuffle(img_id_list) - if sys.platform == "win32": + if sys.platform == "win32" and self.num_workers != 1: print("multiprocess is not fully compatible with Windows." "num_workers will be 1.") self.num_workers = 1 -- GitLab