rezaghoddoosian / Early-Drowsiness-Detection

The supporting code used for the baseline temporal method on the UTA-RLDD dataset
https://sites.google.com/prod/view/utarldd/home
MIT License
67 stars 25 forks source link

Which scikit-learn version should we use ? #9

Open moustapha00 opened 2 years ago

moustapha00 commented 2 years ago

Hello,

I got the following error when I run blink_video.py with latest scikit-learn-versions > 0.23:

[INFO] loading facial landmark predictor... /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (4.0.0) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Traceback (most recent call last): File "blink_video.py", line 581, in blink_detector(output_file,path) File "blink_video.py", line 315, in blink_detector loaded_svm = pickle.load(open('Trained_SVM_C=1000_gamma=0.1_for 7kNegSample.sav', 'rb')) ModuleNotFoundError: No module named 'sklearn.svm.classes'

And this one with earlier versions (<=0.23) :

[INFO] starting video stream thread... Attribute Qt::AA_EnableHighDpiScaling must be set before QCoreApplication is created. /usr/lib/python3/dist-packages/requests/init.py:89: RequestsDependencyWarning: urllib3 (1.26.6) or chardet (4.0.0) doesn't match a supported version! warnings.warn("urllib3 ({}) or chardet ({}) doesn't match a supported " Traceback (most recent call last): File "blink_video.py", line 581, in blink_detector(output_file,path) File "blink_video.py", line 444, in blink_detector IF_Closed_Eyes = loaded_svm.predict(EAR_series.reshape(1,-1)) File "/home/samber9ellas/.local/lib/python3.8/site-packages/sklearn/svm/_base.py", line 606, in predict if self.break_ties and self.decision_function_shape == 'ovo': AttributeError: 'SVC' object has no attribute 'break_ties'

MackieMesser17 commented 1 year ago

Get the same error: ModuleNotFoundError: No module named 'sklearn.svm.classes'

with scikit-learn version 1.1.2 and Python 3.8.10

How to make it work?

SaadShah11 commented 1 year ago

@moustapha00 @MackieMesser17 , I got the code working, use scikitlearn version == 0.20.4 pip install scikit-learn==0.20.4

RIta-hoeny commented 5 months ago

I got the code working, use scikitlearn version == 0.20.4 pip install scikit-learn==0.20.4 hi,I have a problem and really hope that you can help me. UserWarning: Trying to unpickle estimator SVC from version pre-0.18 when using version 0.20.4. This might lead to breaking code or invalid results. Use at your own risk.UserWarning) The problem is that TensorFlow 1.8.0 does not support downloading scikit-learn versions before 0.18. I’m puzzled too. Was this SVC model trained using a version of scikit-learn earlier than 0.18? How can compatibility with TensorFlow 1.8.0 be achieved? Thank you very much for your answer.