From 131b7731e99df903fa879f9db7c95682680da115 Mon Sep 17 00:00:00 2001 From: Haofan Wang Date: Wed, 21 Aug 2019 12:26:43 -0500 Subject: [PATCH] Update detect_face.py Fix Object arrays cannot be loaded when allow_pickle=False --- src/align/detect_face.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/align/detect_face.py b/src/align/detect_face.py index 7f98ca7fb..8c0b61d01 100644 --- a/src/align/detect_face.py +++ b/src/align/detect_face.py @@ -82,7 +82,7 @@ def load(self, data_path, session, ignore_missing=False): session: The current TensorFlow session ignore_missing: If true, serialized weights for missing layers are ignored. """ - data_dict = np.load(data_path, encoding='latin1').item() #pylint: disable=no-member + data_dict = np.load(data_path, encoding='latin1', allow_pickle=True).item() #pylint: disable=no-member for op_name in data_dict: with tf.variable_scope(op_name, reuse=True):