Page 1 of 1

Swapping face on image only... no luck.

Posted: Wed Jan 22, 2020 12:48 am
by sergor
First off - you devs are nothing but brilliant - this program motivates to go beyond what it does - this coming from a man who first rejoiced when the 8" floppy was reduced to 5,25" (yes I'm that old!)

I have been searching for a while for this topic and couldn't find one:

Starting slow I have gone through every process from extracting to sorting - torzdf needs cudos for documention - second I thought I read on a post (can't find it now..grr) that to simply swap faces in an image - no training was required for the convert. So to follow the process - do I make 2 libraries with single image (A->B) and the use the Alignment from the (Extracted, Sorted and Aligned) Faces folder?

I understand the process for videos just not when handling single images.And if the reply is "SAME PROCESS" - then I'm doing something very wrong.

If you already have this as an answer/solution posted - then apologies to any mod reading!

sergor
"Old - but not obsolete"

Re: Swapping face on image only... no luck.

Posted: Fri Jan 24, 2020 11:47 am
by torzdf
I'm not entirely clear on what you're trying to do.

Ultimately, to swap faces (be it a single image or a video) then you need a trained model.

To have a trained model you need many many faces for both A and B to train on... so yes, unfortunately, the process is still the same.

Re: Swapping face on image only... no luck.

Posted: Fri Jan 24, 2020 1:15 pm
by sergor
@torzdf Was trying to figure out how to replace face in an image.

You train two different models - how does that allow you changing one face in one image? (I only understand how that would work for video sequences)

I'll keep at it, I may find the answer.

Cheers.

Re: Swapping face on image only... no luck.

Posted: Tue Apr 07, 2020 9:40 pm
by Brigant
Have you figured it out yet?

I have the same problem. I do not want to convert videos. But swap out faces on images. I have no alignment files due to this, although I have trained models.

Without an alignment file, which I understand you get from scanning the video you cannot faceswap...I just try to figure it out also

Re: Swapping face on image only... no luck.

Posted: Tue Apr 07, 2020 9:50 pm
by Brigant
Got the solution:

Even if you don't use videos and only work with images, the alignment file is generated in the various directories that you extract your faces from. There they were sitting all along and with them it worked just fine.

Re: Swapping face on image only... no luck.

Posted: Wed Apr 08, 2020 7:04 pm
by sergor
Brigant wrote:
Tue Apr 07, 2020 9:50 pm
Got the solution:

Even if you don't use videos and only work with images, the alignment file is generated in the various directories that you extract your faces from. There they were sitting all along and with them it worked just fine.
Well - first I did what @torzdf told me to do - so with 20400 pictures I'm now training a model which currently is at 198000 iterations - from 17500 till now it's not really dropping in learning rate - still at 0.3800 at both folders (which suggests I've done something wrong or it hasn't "viewed" all faces enough times).

So at present I haven't tried changing a face in an image/video yet. Still tweaking the system. Installed a freeware program called cpuid - as I found out that batchsize was "killing" my system due to heat. So from 64 I turned it to 44 - system is stabile. A bit winded answer - but since starting I find the proverbial "bug" - within my own system.

And the program is so massive as to what it can actually do - that it's like looking a someone with a flight simulator and then shouting "I CAN FLY THE PLANE".

Oh one thing I can give you as tip - DO NOT DELETE alignment-backups - MERGE them!! I've had a few errors with "faces were found that doesn't exist in the alignments file. Nothing worked - until I merged the files (under Tools - Alignments - Merge)

Hope this can help
/sergor

Re: Swapping face on image only... no luck.

Posted: Wed Apr 29, 2020 7:11 am
by tweek_craigh
Hello,

This is thread is not that old and the subject is similar to mine i didn't want to create a new one (if it's considered hijacking please tell me so and i will create a new post).

So. I have two sources, trained a model exactly like the op. (I just want to swap faces on images to try DF).

My problem comes from Convert.
- Input dir is set as the Sources Images.
- Output dir is set as a new folder to get the result inside
- Model dir is the trained model
- Alignment file is the one in the extract folder of the source image.

Now i let everything on default and clicked on "Convert".

I have no errors, it says "complete" but the output dir is completly empty. Any clue ?

(Again apoligies if i should have made a new thread)

Re: Swapping face on image only... no luck.

Posted: Wed Apr 29, 2020 9:00 am
by torzdf
No. I would need to see a TRACE log to see the issue (enable it with loglevel). NB: It will slow the process down and generate a very large file.

Re: Swapping face on image only... no luck.

Posted: Wed Apr 29, 2020 10:15 am
by tweek_craigh
I do not know how to upload in this forum so here is a direct link.

https://lastterritory.com/text_file/log_test1.log

Re: Swapping face on image only... no luck.

Posted: Wed Apr 29, 2020 10:22 am
by torzdf
The input folder D:\Testing\faceswap\Extract\Source\source_test1 only has 2 files in it, none of which are images. It only contains the alignments.fsa file and another folder called "source_test1"

Re: Swapping face on image only... no luck.

Posted: Wed Apr 29, 2020 10:55 am
by tweek_craigh
Oh... There was a seconde source_test1 folder inside of it and when using browse it was stopping at the other :(

Thank you :)

Re: Swapping face on image only... no luck.

Posted: Wed Apr 29, 2020 1:20 pm
by sergor
tweek_craigh wrote:
Wed Apr 29, 2020 7:11 am
Hello,

This is thread is not that old and the subject is similar to mine i didn't want to create a new one (if it's considered hijacking please tell me so and i will create a new post).

So. I have two sources, trained a model exactly like the op. (I just want to swap faces on images to try DF).

My problem comes from Convert.
- Input dir is set as the Sources Images.
- Output dir is set as a new folder to get the result inside
- Model dir is the trained model
- Alignment file is the one in the extract folder of the source image.

Now i let everything on default and clicked on "Convert".

I have no errors, it says "complete" but the output dir is completly empty. Any clue ?

(Again apoligies if i should have made a new thread)
Hey there, I had the exact same problem today - so you also solved my issue by asking on this thread - I only think the DEVS (moderators) take issue if a topic is non-sensical ie. requests for anything other than FS questions. For me it was during convert - 95% of my time has been with data-sets and extraction, alignment-cleanup so I struggled with input/output-paths when I finally tried my first convert.

So thanks :))

Have a good one
/sergor