ageitgey / ageitgey/face_recognition
Can't use XGBoost Classifier with face_recognition
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 56.8k
- Forks
- 13.7k
- PR merge metrics
- No merged PRs in 30d
Description
- face_recognition version: Latest Version
- Python version: 3.6
- Operating System: Windows 10 x64
Hello!
I saw the using sklearn.Kneighbour classifier with face_recognition example. It works great, but I want to use Classifier from xgboost library to get my face recognition system more accurate.
I tried to modificate some example code to use XGBClassifier, but it generates following WARNINGS and does not recognition anything.
WARNINGS like this:
Warning (from warnings module):
File "C:\Program Files\Python36\lib\site-packages\sklearn\preprocessing\label.py", line 151
if diff:
DeprecationWarning: The truth value of an empty array is ambiguous. Returning False, but in future this will result in an error. Use array.size > 0 to check that an array is not empty.
But, original code works well.
I'm attaching my code. Most likely, the problem inside the "predict" function.
Please, help me. Sorry for my terrible English, I am Ukrainian.
Link to code: https://pastebin.com/Ceiqr3wN
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Compare the attached Pastebin code with the working sklearn.Kneighbour face_recognition example, focusing first on the predict function and the sklearn preprocessing warning. Determine why the XGBClassifier path produces no recognition, and consider the issue done when it recognizes faces without the reported warning.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scikit-learn
- Domain
- computer-vision, machine-learning
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100