I am having issue with landmark detection with couple of faces. These are the faces that were generated from one of the 3d face reconstruction models. I am using standard SFD face detector. I think the error seems to be at the detector from the logs:
Traceback (most recent call last):
File "facealignment_test.py", line 8, in test_predict_points
fa.get_landmarks('assets/matched_frame_lm.png')
File "/home/aditya/Python_code_learning/dev/kython_env/lib/python3.7/site-packages/face_alignment/api.py", line 141, in get_landmarks
return self.get_landmarks_from_image(image_or_path, detected_faces)
File "/home/aditya/Python_code_learning/dev/kython_env/lib/python3.7/site-packages/face_alignment/api.py", line 171, in get_landmarks_from_image
detected_faces = self.face_detector.detect_from_image(image[..., ::-1].copy())
File "/home/aditya/Python_code_learning/dev/kython_env/lib/python3.7/site-packages/face_alignment/detection/sfd/sfd_detector.py", line 51, in detect_from_image
bboxlist = detect(self.face_detector, image, device=self.device)
File "/home/aditya/Python_code_learning/dev/kython_env/lib/python3.7/site-packages/face_alignment/detection/sfd/detect.py", line 20, in detect
img = img - np.array([104, 117, 123])
ValueError: operands could not be broadcast together with shapes (1024,1024,4) (3,)
I am having issue with landmark detection with couple of faces. These are the faces that were generated from one of the 3d face reconstruction models. I am using standard SFD face detector. I think the error seems to be at the detector from the logs:
The image is:
The error is as follows:
====================================================================== ERROR: test_predict_points (main.Tester)
Traceback (most recent call last): File "facealignment_test.py", line 8, in test_predict_points fa.get_landmarks('assets/matched_frame_lm.png') File "/home/aditya/Python_code_learning/dev/kython_env/lib/python3.7/site-packages/face_alignment/api.py", line 141, in get_landmarks return self.get_landmarks_from_image(image_or_path, detected_faces) File "/home/aditya/Python_code_learning/dev/kython_env/lib/python3.7/site-packages/face_alignment/api.py", line 171, in get_landmarks_from_image detected_faces = self.face_detector.detect_from_image(image[..., ::-1].copy()) File "/home/aditya/Python_code_learning/dev/kython_env/lib/python3.7/site-packages/face_alignment/detection/sfd/sfd_detector.py", line 51, in detect_from_image bboxlist = detect(self.face_detector, image, device=self.device) File "/home/aditya/Python_code_learning/dev/kython_env/lib/python3.7/site-packages/face_alignment/detection/sfd/detect.py", line 20, in detect img = img - np.array([104, 117, 123]) ValueError: operands could not be broadcast together with shapes (1024,1024,4) (3,)
Any ideas?