YuvalNirkin / fsgan

FSGAN - Official PyTorch Implementation
https://nirkin.com/fsgan
Creative Commons Zero v1.0 Universal
750 stars 147 forks source link

No module named 'face_alignment' in V1 #166

Open BCL123456-BAL opened 1 year ago

BCL123456-BAL commented 1 year ago

I want to realize Images to Images Face Swapping, so I read Paper Models Inference. First I run 'python download_fsgan_models.py' and 'git checkout v1' Then I run the command '' python D:\Desktop\fsgan\inference\face_swap_images2images.py D:\Desktop\000015.jpg -t D:\Desktop\000012.jpg -o D:\desktop\output'' Finally It throw the error ''ModuleNotFoundError: No module named 'face_alignment'' The image as follow: image The project in D:\Desktop, I set environment variable 'PYTHONPATH' = 'D:\Desktop' l also search the module in the project file and conda packages, but the result show none.

YuvalNirkin commented 1 year ago

Add the package with the following command: pip install face-alignment

I'll add it to the install configuration.

BCL123456-BAL commented 1 year ago

I'm sorry to trouble you again. It throws a new error ''AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)''.
Since I haven't had a deep understanding of the project, and the project is a big one, I can't solve this problem quickly through Google. This is error image image

battlesaint commented 1 year ago

I'm sorry to trouble you again. It throws a new error ''AttributeError: partially initialized module 'cv2' has no attribute 'gapi_wip_gst_GStreamerPipeline' (most likely due to a circular import)''. Since I haven't had a deep understanding of the project, and the project is a big one, I can't solve this problem quickly through Google. This is error image image

pip install opencv-contrib-python --upgrade