face-classification
face-classification copied to clipboard
unable to load model
when I ran: python pred.py --img_dir test --model face_model.pkl
got error:
Traceback (most recent call last):
File "pred.py", line 103, in
I tried pickle loading using other encoding option and also tried open file with "rb", but no good result.
Could you please tell me how to solve it? is it a version problem? OS: ubuntu 16.04 python: 3.5
If you are using the python3 then use this code to read pickle file.
with open(model_path,'rb') as f: clf, labels = pickle.load(f,encoding='latin1')
Hi, this still doesn't work for me. Here is my error now:
OS: windows 10 python 3.6.8