ageitgey / ageitgey/face_recognition
TypeError: call(): incompatible function arguments
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
- Python version: 3.6.5
- Operating System: Windows 7 / Git Bash 2.17.1.2
Description
return face_detector(img, number_of_times_to_upsample)
TypeError: call(): incompatible function arguments. The following argument types are supported:
1. (self: dlib.fhog_object_detector, image: array, upsample_num_times: int=0)
How to fix this ?
What I Did
$pip3 install dlib (version is 19.13.1)
$pip3 install face_recognition (version 1.2.2)
$cd ~/cv2 (my sample code is in https://github.com/rkuo2000/cv2/cam_eye_tracking.py)
$python cam_eye_tracking.py
Traceback (most recent call last):
File "cam_eye_tracking.py", line 11, in
face_landmarks_list = face_recognition.face_landmarks(image)
File "C:\Program Files\Python36\lib\site-packages\face_recognition\api.py", line 173, in face_landmarks
landmarks = _raw_face_landmarks(face_image, face_locations)
File "C:\Program Files\Python36\lib\site-packages\face_recognition\api.py", line 153, in _raw_face_landmarks
face_locations = _raw_face_locations(face_image)
File "C:\Program Files\Python36\lib\site-packages\face_recognition\api.py", line 102, in _raw_face_locations
return face_detector(img, number_of_times_to_upsample)
TypeError: call(): incompatible function arguments. The following argument types are supported:
1. (self: dlib.fhog_object_detector, image: array, upsample_num_times: int=0) -> dlib.rectangles
Invoked with: <dlib.fhog_object_detector object at 0x000000000A3D6570>, None, 1
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
Start with cam_eye_tracking.py and trace the image passed to face_recognition.face_landmarks, then inspect face_recognition/api.py around _raw_face_locations and line 102. Confirm why the detector receives None instead of an image; done means the sample reaches face detection with a valid image and no incompatible-arguments error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- computer-vision
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100