Storing face-encoding in database

Open
#599 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
4/5
Estimated time
3-5 days
Newbie friendliness
25/100
Issue type
Bug
Clarity
Needs clarification
Activity status
Stale
Tech stack
django, numpy, python

Research direction

Start with the reported Django character-field storage path and the conversion between database values and NumPy arrays. Reproduce the ufunc subtraction error using a stored encoding and an image-generated encoding; done means the two encodings can be compared without the dtype or shape error.

Written by the indexing model from the issue text.

Description

  • face_recognition version:1.2.2
  • Python version: 2.7
  • Operating System: Kali linux
Description

@ageitgey, I am working with your module using django and need to store the face-encodings in a database field to optimize comparison.
I used a character field and converted it to both numpy array and list before comparing, but had issues comparing the face encodings retrieved from database with the one created from an image. Any advice?

Was getting error ufunc 'subtract' did not contain a loop with signature matching types dtype('<U1848') dtype('<U1848') dtype('<U1848')

i printed both face encodings (from database and from image) and they looked alike and were of the same type, i also changed the types to lists and numpy arrays yet it did not work. Did alot of crazy stuff including list comprehension and regex just to hack up a solution. My guess is probably the difference in shape of the matrix because each data in both matrices were of type float and looked alike.

Dominant language
Python
Stars
56.8k
Forks
13.7k
PR merge metrics
No merged PRs in 30d

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.

More from ageitgey/face_recognition

All issues in ageitgey/face_recognition

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.