ai-forever / ghost

A new one shot face swap approach for image and video domains
Apache License 2.0
1.25k stars 265 forks source link

Sber-Swap Windows 10 #32

Open osmankaya opened 2 years ago

osmankaya commented 2 years ago

Hello, how can I use sber swap on windows 10 can anyone help?

aesanchezgh commented 2 years ago

Hello, how can I use sber swap on windows 10 can anyone help?

It works fine on Windows 10

osmankaya commented 2 years ago

how can i run it?

thepirat000 commented 2 years ago

Here is a PowerShell script that I used to set up a fresh VM to run sber-swap on windows:

https://gist.github.com/thepirat000/ae9c9acf0e9d98b1aa14571cf2197341

ramnnv commented 2 years ago

Here is a PowerShell script that I used to set up a fresh VM to run sber-swap on windows:

https://gist.github.com/thepirat000/ae9c9acf0e9d98b1aa14571cf2197341

You help me a lot with that fixes.

Can you please share the correct command to swap face between 2 pictures (as google colab)? i cant make it work with pictures only working for me with videos.

My paths are the defaults: examples/images/1.jpg, examples/images/2.jpg

Thank you.

thepirat000 commented 2 years ago

Not sure if you're asking this, but as far as I know you cannot swap on two images at once. Just one of the images will we changed, so if you want to swap the face on picture1 by face on picture2 AND viceversa you'll need to run it twice, one for each swap.

The command for images looks like this:

python inference.py --source_paths {source_faces_imgs} --target_image {target_img} --target_faces_paths {target_faces_imgs} --image_to_image True

Being:

Some examples:

python inference.py --source_paths "my_face.jpg" --target_image "obama.jpg" --image_to_image True
python inference.py --source_paths "my_face.jpg" "my_son_face.jpg" --target_image "simpsons_family.jpg" --target_faces_paths "homer_crop.jpg" "bart_crop.jpg" --image_to_image True
ramnnv commented 2 years ago

That's what i was looking for, now i'm running full sber swap on windows. I took your code and just put the folders example/images on the source and the target, and finally work.

Thanks for your time and helping this newbie learning user.

osmankaya commented 2 years ago

Ekran Alıntısı Thank you i got it working but i get this error on some videos

ramnnv commented 2 years ago

That error happen to me at first, but it fixed itself, i just install pytorch, but im not sure if thats the solution, i didn't anything else.

andriken commented 2 years ago

That's what i was looking for, now i'm running full sber swap on windows. I took your code and just put the folders example/images on the source and the target, and finally work.

Thanks for your time and helping this newbie learning user.

can you help me and tell which version of python are you using, I'm having a lot of dependency issues while installing the requirements.txt I'm using python 3.7, by the way I'm also on windows 10