!10990 fix: probabilistic failure when get data timeout in retinaface_resnet50 / psenet

From: @jonyguo
Reviewed-by: 
Signed-off-by:
pull/10990/MERGE
mindspore-ci-bot 4 years ago committed by Gitee
commit 29505ceb4a

@ -172,6 +172,8 @@ def shrink(bboxes, rate, max_shr=20):
class TrainDataset:
def __init__(self):
cv2.setNumThreads(2)
self.is_transform = True
self.img_size = config.TRAIN_LONG_SIZE
self.kernel_num = config.KERNEL_NUM

@ -63,6 +63,7 @@ class WiderFace():
return self.images_list[item], self.labels_list[item]
def read_dataset(img_path, annotation):
cv2.setNumThreads(2)
if isinstance(img_path, str):
img = cv2.imread(img_path)

Loading…
Cancel
Save