We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
When I tried to create an instance of MTCNN detector, something went wrong:
--------------------------------------------------------------------------- ValueError Traceback (most recent call last) <ipython-input-7-be16e7eec9f4> in <module> 3 4 img = cv2.imread("ivan.jpg") ----> 5 detector = MTCNN() 6 7 for i in range(len(images)): .../lib/python3.5/site-packages/mtcnn/mtcnn.py in __init__(self, weights_file, min_face_size, steps_threshold, scale_factor) 193 self.__session = tf.Session(config=config, graph=self.__graph) 194 --> 195 weights = np.load(weights_file).item() 196 self.__pnet = PNet(self.__session, False) 197 self.__pnet.set_weights(weights['PNet']) .../lib/python3.5/site-packages/numpy/lib/npyio.py in load(file, mmap_mode, allow_pickle, fix_imports, encoding) 445 else: 446 return format.read_array(fid, allow_pickle=allow_pickle, --> 447 pickle_kwargs=pickle_kwargs) 448 else: 449 # Try a pickle .../lib/python3.5/site-packages/numpy/lib/format.py in read_array(fp, allow_pickle, pickle_kwargs) 690 # The array contained Python objects. We need to unpickle the data. 691 if not allow_pickle: --> 692 raise ValueError("Object arrays cannot be loaded when " 693 "allow_pickle=False") 694 if pickle_kwargs is None: ValueError: Object arrays cannot be loaded when allow_pickle=False
I googled a bit and now think that problem causes due to new versions of numpy (see this issue: tensorflow/tensorflow#28102).
The text was updated successfully, but these errors were encountered:
Exactly. It works after adding allow_pickle=True #32
Sorry, something went wrong.
I fixed it by changing line 195 in mtcnn.py to: weights = np.load(weights_file, allow_pickle=True).item()
Just in case any others have the same problem
Implemented networks into Keras framework. Fixes #62, #59, #58, #56, #40
587a82f
, #38, #33, #31, #17, #3
No branches or pull requests
When I tried to create an instance of MTCNN detector, something went wrong:
I googled a bit and now think that problem causes due to new versions of numpy (see this issue: tensorflow/tensorflow#28102).
The text was updated successfully, but these errors were encountered: