liuxiaolong19920720 / predict-facial-attractiveness Goto Github PK
View Code? Open in Web Editor NEWUsing OpenCV and Dlib to predict facial attractiveness.
Using OpenCV and Dlib to predict facial attractiveness.
加载决策树pkl模型出错,是不是对sklearn版本有要求?
Traceback (most recent call last):
File "myPredict.py", line 8, in
clf = joblib.load(root+'model/my_face_rating.pkl')
File "/usr/local/lib/python2.7/site-packages/sklearn/externals/joblib/numpy_pickle.py", line 573, in load
return load_compatibility(fobj)
File "/usr/local/lib/python2.7/site-packages/sklearn/externals/joblib/numpy_pickle_compat.py", line 226, in load_compatibility
obj = unpickler.load()
File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 864, in load
dispatchkey
File "/usr/local/lib/python2.7/site-packages/sklearn/externals/joblib/numpy_pickle_compat.py", line 177, in load_build
Unpickler.load_build(self)
File "/usr/local/Cellar/python/2.7.13_1/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pickle.py", line 1223, in load_build
setstate(state)
File "sklearn/tree/_tree.pyx", line 632, in sklearn.tree._tree.Tree.setstate (sklearn/tree/_tree.c:8128)
KeyError: 'max_depth'
File "D:\Study\Anaconda\envs\opencv\lib\site-packages\sklearn\tree\tree.py", line 194, in fit
% self.min_samples_split)
ValueError: min_samples_split must be an integer greater than 1 or a float in (0.0, 1.0]; got the integer 1
I am totally a tyro , the error above I can resolve, please help! I will appreciate it so much, thank you.
[[ 2.70908844]
[ 2.70908844]
[ 2.70908844]
[ 2.70908844]
[ 2.70908844]
[ 2.70908844]]
Hello ... I am using your code .. but getting error at this line
features_test = pca.transform(features_test)
this is the 17th line in myPredict.py ... i am assuming that the version of sklearn you choosed to develop this code is updated. So can you please tell me how to solve it or just tell me the version of sklearn which works perfectly. Thanks
Hello, I have this mistake:
ValueError: Expected 2D array, got 1D array instead
Thanks!
Warning (from warnings module):
File "C:\Python27\lib\site-packages\sklearn\base.py", line 253
UserWarning)
UserWarning: Trying to unpickle estimator DecisionTreeRegressor from version pre-0.18 when using version 0.20.3. This might lead to breaking code or invalid results. Use at your own risk.
Traceback (most recent call last):
File "C:\Python27\predict-facial-attractiveness-master\source\myPredict.py", line 7, in
clf = joblib.load(root+'model\my_face_rating.pkl')
File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle.py", line 596, in load
return load_compatibility(fobj)
File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle_compat.py", line 226, in load_compatibility
obj = unpickler.load()
File "C:\Python27\lib\pickle.py", line 864, in load
dispatchkey
File "C:\Python27\lib\site-packages\sklearn\externals\joblib\numpy_pickle_compat.py", line 177, in load_build
Unpickler.load_build(self)
File "C:\Python27\lib\pickle.py", line 1223, in load_build
setstate(state)
File "sklearn\tree_tree.pyx", line 649, in sklearn.tree._tree.Tree.setstate
KeyError: 'max_depth'
Is it possible to use this code to predict facial attractiveness for my own inputted images?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.