提交 53952a46 编写于 作者: T tink2123

modified det reader

上级 e5a2062d
......@@ -13,6 +13,7 @@
#limitations under the License.
import os
import sys
import math
import random
import functools
......@@ -42,6 +43,10 @@ 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":
print("multiprocess is not fully compatible with Windows."
"num_workers will be 1.")
self.num_workers = 1
for img_id in range(process_id, img_num, self.num_workers):
label_infor = label_infor_list[img_id_list[img_id]]
outs = self.process(label_infor)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册