Closed pegahs1993 closed 2 years ago
It seems like an OpenCV version error. I used 'opencv_python==4.4.0.40' in the requirements.txt You can downgrade the OpenCV version or modify the codes for your version (4.5.4 as you shown).
It seems like an OpenCV version error. I used 'opencv_python==4.4.0.40' in the requirements.txt You can downgrade the OpenCV version or modify the codes for your version (4.5.4 as you shown).
Thank you so much for your prompt reply! Change opencv_python version worked, and the code was executed :)
pip install opencv-python==4.4.0.40
I run into this situation as well with exactly opencv version 4.5.4. I tried pip install opencv-python==4.4.0.40
, but did help.
After check anaconda, I found that this is because there's another lib called opencv-python-headless
was installed.
by
pip uninstall opencv-python-headless
can solve this problem.
Thanks for sharing such nice work. I tried replicating the work however I got the following error. please guide me. many thanks
**File "demo.py", line 264, in
facedataset.dataset.image_pad)
File "/content/LiveSpeechPortraits-main/datasets/face_dataset.py", line 280, in get_data_test_mode
feature_map = torch.from_numpy(self.get_feature_image(landmarks, (self.opt.loadSize, self.opt.loadSize), shoulder, pad)[np.newaxis, :].astype(np.float32)/255.)
File "/content/LiveSpeechPortraits-main/datasets/face_dataset.py", line 287, in get_feature_image
im_edges = self.draw_face_feature_maps(landmarks, size)
File "/content/LiveSpeechPortraits-main/datasets/face_dataset.py", line 317, in draw_face_feature_maps im_edges = cv2.line(im_edges, tuple(keypoints[edge[i]]), tuple(keypoints[edge[i+1]]), 255, 2) cv2.error: OpenCV(4.5.4-dev) :-1: error: (-5:Bad argument) in function 'line'