ageitgey / ageitgey/face_recognition

Can't use XGBoost Classifier with face_recognition

Open
#577 1 comment 0 reactions 0 assignees View on GitHub

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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.