ageitgey / ageitgey/face_recognition

What does face_encoding do in the example code?

Open
#744 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

From this example
https://github.com/ageitgey/face_recognition/blob/master/examples/facerec_from_webcam_faster.py
In the example here what does the face_encoding in the for loop do and what will happen if i remove it?
Because it was only stated in that statement and not again in the whole script, so i wanted to know what it does. Just a newbie at programming wanting to learn everything thank you :)

face_names = []
for face_encoding in face_encodings:
# See if the face is a match for the known face(s)
matches = face_recognition.compare_faces(known_face_encodings, face_encoding)
name = "Unknown"

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

Start with examples/facerec_from_webcam_faster.py and inspect the loop containing face_encoding and compare_faces. Clarify the variable's role in the loop and what behavior changes if that loop variable is removed; the issue is done when the example's control flow is understandable to a beginner.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
computer-vision
Issue type
Documentation
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.