Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cv2.error: OpenCV(4.9.0) 👎 error: (-5:Bad argument) in function 'cvtColor' #209

Open
hsuhorizon opened this issue Dec 15, 2024 · 2 comments

Comments

@hsuhorizon
Copy link

I encountered the following issues during execution:

Traceback (most recent call last):
File "/Halo/hallo/scripts/inference.py", line 376, in
inference_process(command_line_args)
File "/Halo/hallo/scripts/inference.py", line 163, in inference_process
source_image_lip_mask = image_processor.preprocess(
File "/root/anaconda3/envs/hallo/lib/python3.10/site-packages/hallo/datasets/image_processor.py", line 124, in preprocess
faces = self.face_analysis.get(cv2.cvtColor(np.array(ref_image_pil.copy()), cv2.COLOR_RGB2BGR))
cv2.error: OpenCV(4.9.0) 👎 error: (-5:Bad argument) in function 'cvtColor'

Overload resolution failed:

  • src is not a numpy array, neither a scalar
  • Expected Ptrcv::UMat for argument 'src'

appreciate for explaination

@xumingw
Copy link
Contributor

xumingw commented Dec 16, 2024

Could you check whether ref_image_pil.copy() is empty?

@hsuhorizon
Copy link
Author

sry I'm not sure how to check. ㄒoㄒ

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants