howdy: Error when trying to use IR sensors on Manjaro (Arch-based) with HP Spectre
Just wanted to say first thanks for making this utility. My /dev/video0 device is the main camera and the /dev/video2 is the IR sensors. video1 and 3 are inactive even though v4l2-ctl --list-devices --all lists all 4 (0-3) as “HP Wide Vision FHD Camera: HP W (usb-0000:00:14.0-5).” If I test using the camera, my face is outlined in red and I can add my face just fine, however if I use video2 (IR sensors), testing works (I have to get a bit closer to the sensors for it to outline my face but that’s okay) but trying to add my face returns this error and my face is not added.
Traceback (most recent call last): File “/usr/bin/howdy”, line 90, in <module> import cli.add File “/usr/lib/security/howdy/cli/add.py”, line 110, in <module> enc = face_recognition.face_encodings(frame) File “/usr/lib/python3.7/site-packages/face_recognition/api.py”, line 210, in face_encodings return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks] File “/usr/lib/python3.7/site-packages/face_recognition/api.py”, line 210, in <listcomp> return [np.array(face_encoder.compute_face_descriptor(face_image, raw_landmark_set, num_jitters)) for raw_landmark_set in raw_landmarks] TypeError: compute_face_descriptor(): incompatible function arguments. The following argument types are supported: 1. (self: dlib.face_recognition_model_v1, img: numpy.ndarray[(rows,cols,3),uint8], face: dlib.full_object_detection, num_jitters: int=0) -> dlib.vector 2. (self: dlib.face_recognition_model_v1, img: numpy.ndarray[(rows,cols,3),uint8], faces: dlib.full_object_detections, num_jitters: int=0) -> dlib.vectors 3. (self: dlib.face_recognition_model_v1, batch_img: List[numpy.ndarray[(rows,cols,3),uint8]], batch_faces: List[dlib.full_object_detections], num_jitters: int=0) -> dlib.vectorss Invoked with: <dlib.face_recognition_model_v1 object at 0x7f15f4c09730>, array([[22, 22, 22, …, 24, 24, 24], [22, 22, 22, …, 24, 24, 24], [21, 21, 21, …, 24, 24, 24], …, [74, 74, 74, …, 77, 77, 78], [73, 74, 74, …, 77, 78, 78], [72, 71, 75, …, 77, 77, 78]], dtype=uint8), <dlib.full_object_detection object at 0x7f15f40c6d88>, 1
Any suggestions? Thanks!
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 19 (9 by maintainers)
@boltgolt I think this error is cause by some IR Cameras return “Grayscale” instead of “RGB” image. Mine uses XPS13 9370 and this machine IR camera return grayscale while dlib requires RGB image. May be we have to emply some sanity check for input image dimension before feed into dlib? For example,
to test.py add.py and compare.py
@Droidpro1 no, to the
add.pyorcompare.py.test.pyisn’t affected.That’s correct.
According to its source,
opencvshould do this by default, but in your case it doesn’t for some reason.I could have worded it better. Just install it without using the AUR helper (makepkg -si)