ghost icon indicating copy to clipboard operation
ghost copied to clipboard

Sber-Swap Windows 10

Open osmankaya opened this issue 3 years ago • 9 comments

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

osmankaya avatar Apr 06 '22 18:04 osmankaya

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

It works fine on Windows 10

aesanchezgh avatar Apr 06 '22 22:04 aesanchezgh

how can i run it?

osmankaya avatar Apr 06 '22 22:04 osmankaya

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

thepirat000 avatar Apr 07 '22 00:04 thepirat000

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.

ramnnv avatar Apr 07 '22 00:04 ramnnv

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:

  • {source_faces_imgs}: One or more file paths to the images containing the "new faces" to be swapped on the target image
  • {target_img}: File path to the target image that will be changed to have the "new faces"
  • {target_faces_imgs}: One or more file paths containing the "current faces" images to swap, corresponding to each of the source faces. This parameter is optional if you are swapping just one face. If not provided, all the faces on the {target_img} will be swapped by the given source face

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

thepirat000 avatar Apr 07 '22 01:04 thepirat000

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.

ramnnv avatar Apr 07 '22 06:04 ramnnv

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

osmankaya avatar Apr 07 '22 13:04 osmankaya

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.

ramnnv avatar Apr 08 '22 18:04 ramnnv

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

LostnD avatar May 05 '22 12:05 LostnD