cmusatyalab / openface

Face recognition with deep neural networks.
http://cmusatyalab.github.io/openface/
Apache License 2.0
15.14k stars 3.6k forks source link

IOError: [Errno 2] No such file or directory: 'generated-embeddings/classifier.pkl' #320

Closed monajalal closed 6 years ago

monajalal commented 7 years ago

So can you guide how to run this demo?

[jalal@goku openface]$ /usr/bin/python demos/classifier.py infer generated-embeddings/classifier.pkl sky_chon.jpg
/usr/lib64/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
/usr/lib64/python2.7/site-packages/sklearn/grid_search.py:42: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. This module will be removed in 0.20.
  DeprecationWarning)
Traceback (most recent call last):
  File "demos/classifier.py", line 294, in <module>
    infer(args, args.multi)
  File "demos/classifier.py", line 176, in infer
    with open(args.classifierModel, 'rb') as f:
IOError: [Errno 2] No such file or directory: 'generated-embeddings/classifier.pkl'
[jalal@goku openface]$ ls
api-docs         build    CONTRIBUTING.md  demos       docs        images   mkdocs.yml  opencv-dlib-torch.Dockerfile  README.md         run-tests.sh  tests     util
batch-represent  cloc.sh  data             Dockerfile  evaluation  LICENSE  models      openface                      requirements.txt  setup.py      training
[jalal@goku openface]$ pwd
/usr/local/openface
[jalal@goku openface]$ sudo /usr/bin/python demos/classifier.py infer generated-embeddings/classifier.pkl sky_chon.jpg
/usr/lib64/python2.7/site-packages/sklearn/cross_validation.py:41: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. Also note that the interface of the new CV iterators are different from that of this module. This module will be removed in 0.20.
  "This module will be removed in 0.20.", DeprecationWarning)
/usr/lib64/python2.7/site-packages/sklearn/grid_search.py:42: DeprecationWarning: This module was deprecated in version 0.18 in favor of the model_selection module into which all the refactored classes and functions are moved. This module will be removed in 0.20.
  DeprecationWarning)
/usr/bin/env: th: No such file or directory
Traceback (most recent call last):
  File "demos/classifier.py", line 294, in <module>
    infer(args, args.multi)
  File "demos/classifier.py", line 176, in infer
    with open(args.classifierModel, 'rb') as f:
IOError: [Errno 2] No such file or directory: 'generated-embeddings/classifier.pkl'
[jalal@goku openface]$

Additionally, I had to change this in your code:

#from sklearn.lda import LDA #commented by Mona
from sklearn.discriminant_analysis import LinearDiscriminantAnalysis as LDA #added by Mona
stale[bot] commented 6 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

colab1590 commented 5 years ago

i am getting this error while installing. how to resolve this ? in windows 10 i am using. root@b17cf6f57801:~/openface# ./demos/classifier.py infer models/openface/celeb-classifier.nn4.small2.v1.pk1 ./images/examples/adams.jpg Traceback (most recent call last): File "./demos/classifier.py", line 293, in infer(args, args.multi) File "./demos/classifier.py", line 175, in infer with open(args.classifierModel, 'rb') as f: IOError: [Errno 2] No such file or directory: 'models/openface/celeb-classifier.nn4.small2.v1.pk1'

Akshit2896 commented 4 years ago

i am getting this error while installing. how to resolve this ? in windows 10 i am using. root@b17cf6f57801:~/openface# ./demos/classifier.py infer models/openface/celeb-classifier.nn4.small2.v1.pk1 ./images/examples/adams.jpg Traceback (most recent call last): File "./demos/classifier.py", line 293, in infer(args, args.multi) File "./demos/classifier.py", line 175, in infer with open(args.classifierModel, 'rb') as f: IOError: [Errno 2] No such file or directory: 'models/openface/celeb-classifier.nn4.small2.v1.pk1'

dude, it's .pkl not pk1