HectorAnadon/Face-expression-and-ethnic-recognition

Cannot run the code

yywangvr opened this issue · 1 comments

Thank you very much for providing this great code. I am trying to run " python test_emotions.py -i", however, I get the following error. Could you please help solve the code so make it up-to-date?

/Users/yuyang01/miniconda3/envs/py37/lib/python3.7/site-packages/sklearn/utils/deprecation.py:144: FutureWarning: The sklearn.svm.classes module is deprecated in version 0.22 and will be removed in version 0.24. The corresponding classes / functions should instead be imported from sklearn.svm. Anything that cannot be imported from sklearn.svm is now part of the private API. warnings.warn(message, FutureWarning) /Users/yuyang01/miniconda3/envs/py37/lib/python3.7/site-packages/sklearn/base.py:318: UserWarning: Trying to unpickle estimator SVC from version 0.18.1 when using version 0.22.1. This might lead to breaking code or invalid results. Use at your own risk. UserWarning) Traceback (most recent call last): File "test_emotions.py", line 53, in <module> result = predict_emotion(args["image"]) File "test_emotions.py", line 45, in predict_emotion return clf.predict(np.array([poi])) File "/Users/yuyang01/miniconda3/envs/py37/lib/python3.7/site-packages/sklearn/svm/_base.py", line 585, in predict if self.break_ties and self.decision_function_shape == 'ovo': AttributeError: 'SVC' object has no attribute 'break_ties'

It appears that it is a version mismatch. I have tried with scikit_learn==0.19.0. Try it with that version.