ageitgey / ageitgey/face_recognition
Please install `face_recognition_models`Please install `face_recognition_models`
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: 1.2.2
- face_recognition_models: 0.3.0 #i have it installed
- Python version: 3.5.3
- Operating System: Rasbian (Raspberry-Pi)
Description
When I try to run this code, it quits with the message "Please install face_recognition_models with this command before using face_recognition:
pip install git+https://github.com/ageitgey/face_recognition_models", but I have installed it already.
The Code:
`
import face_recognition
import picamera
import numpy as np
import os
camera = picamera.PiCamera()
camera.resolution = (320, 240)
output = np.empty((240, 320, 3), dtype=np.uint8)
known_encodings = []
known_names = []
path = "/home/pi/Desktop/images"
files = [next(f for f in os.walk(path))[2]]
print("Loading...")
print(files)
for file in files[0]:
image = face_recognition.load_image_file(path + "/" + str(file))
encoding = face_recognition.face_encodings(image)[0]
known_encodings.append(encoding)
known_names.append(file.split(".")[0])
face_locations = []
face_encodings = []
print("Loaded images")
while True:
print("Capturing image.")
# Grab a single frame of video from the RPi camera as a numpy array
camera.capture(output, format="rgb")
# Find all the faces and face encodings in the current frame of video
face_locations = face_recognition.face_locations(output)
print("Found {} faces in image.".format(len(face_locations)))
face_encodings = face_recognition.face_encodings(output, face_locations)
# Loop over each face found in the frame to see if it's someone we know.
for face_encoding in face_encodings:
# See if the face is a match for the known face(s)
match = face_recognition.compare_faces(known_encodings, face_encoding)
name = "<Unknown Person>"
if True in match:
name = known_names[match.index(True)]
print("I see someone named {}!".format(name))
`
What I Did
I ran the command "pip install git+https://github.com/ageitgey/face_recognition_models" a few times and it never said requirement already satisfied, it downloaded every time I ran the install. I have also tried it with pip3 but same result.
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
The issue names no repository file or test. Reproduce the import on Python 3.5.3 and Raspberry Pi using the reported pip and pip3 commands, then compare the package installation environment with the interpreter running face_recognition; done means identifying a reproducible fix or documenting the exact environment mismatch.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, raspberry-pi
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100