Traceback (most recent call last):
File "src/compare.py", line 130, in <module>
main(parse_arguments(sys.argv[1:]))
File "src/compare.py", line 41, in main
images = load_and_align_data(args.image_files, args.image_size, args.margin, args.gpu_memory_fraction)
File "src/compare.py", line 90, in load_and_align_data
pnet, rnet, onet = align.detect_face.create_mtcnn(sess, None)
File "/home/wilf/tensorflow-demo/MyDrowsyDriverDetection/facenet-master/src/align/detect_face.py", line 319, in create_mtcnn
pnet.load(os.path.join(model_path, 'det1.npy'), sess)
File "/home/wilf/tensorflow-demo/MyDrowsyDriverDetection/facenet-master/src/align/detect_face.py", line 90, in load
data_dict = np.load(data_path, encoding='latin1').item() #pylint: disable=no-member
File "/usr/local/lib/python3.5/dist-packages/numpy/lib/npyio.py", line 447, in load
pickle_kwargs=pickle_kwargs)
File "/usr/local/lib/python3.5/dist-packages/numpy/lib/format.py", line 692, in read_array
raise ValueError("Object arrays cannot be loaded when "
ValueError: Object arrays cannot be loaded when allow_pickle=False
解决方法:
将numpy版本降低
sudo pip3 uninstall numpy
sudo pip3 install numpy==1.16.2