Page 2 of 4

Re: [Guide] Extraction - A Workflow

Posted: Sat Dec 21, 2019 6:04 am
by bryanlyon

It's more art than science. Find the best images you can but don't go to in depth in your filtering, it's very easy to delete data that the ai might need to get a good swap.

I recommend removing only the wrong faces, misaligned faces, or really poor quality ones. You never know what the ai might need in order to learn.


No. json

Posted: Sat Dec 21, 2019 7:50 am
by dingdong420

When I extract faces I don't seem to be creating an alignments.json file.

A couple things :

I did have "openfaceswap" installed previously. I uninstalled it before playing with "faceswap". Is this terminal? Like, do I need to reinstall windows terminal?

I meet exceed any hardware requirements, but Is there any software requisites we should be aware of before diving in? Like cuda versions and the like?

Thank you for taking the time to respond.


Re: [Guide] Extraction - A Workflow

Posted: Sat Dec 21, 2019 8:08 am
by bryanlyon

Faceswap doesn't use Json anymore, and saves alignments in .fsa format. Please read the guide which mentions fsa files and how to use them.


Re: [Guide] Extraction - A Workflow

Posted: Sat Dec 21, 2019 10:13 am
by BLACKPINK

I can’t hold shift to select all, it only allows me to select one only. And is it ok if I rename the alignment files? Now they got the same name inside the subfolders


Re: [Guide] Extraction - A Workflow

Posted: Sat Dec 21, 2019 5:15 pm
by bryanlyon

Yes you can rename files. If shift isn't working for you, try holding ctrl. Both work slightly differently but let you select now than one file. Worst case scenario is select one file at a time, copy the box into a new window, as you add each file then copy the whole collection back.


Re: [Guide] Extraction - A Workflow

Posted: Sat Jan 04, 2020 7:04 pm
by Now

can anyone help with "return code 1" when merging alignments


Re: [Guide] Extraction - A Workflow

Posted: Sun Jan 05, 2020 12:28 pm
by torzdf

Does a crash report get generated?

Can you hit the "Generate" button and post the command?


Re: [Guide] Extraction - A Workflow

Posted: Fri Jan 17, 2020 6:38 pm
by SmellyCheese

Is it okay to extract your input A and B with different masks? Is it detrimental?


Re: [Guide] Extraction - A Workflow

Posted: Fri Jan 17, 2020 8:12 pm
by torzdf

Should be fine. You can also add additional masks with the mask tool


Re: [Guide] Extraction - A Workflow

Posted: Sat Jan 18, 2020 4:46 am
by SmellyCheese

You can use several masks for one faceset? Hm, have you noticed better results with that? And would you have to restart training?

Also, if you find the time, could you write out a brief workflow on how to use several masks. Thanks!


Re: Cleaning up

Posted: Sat Jan 18, 2020 10:05 am
by sergor
dingdong420 wrote: Sat Dec 21, 2019 5:56 am

I can not find directions on what makes a "clean" set of images. Could you eleborate on what should and shouldn't be deleted when cleaning up an extraction folder?

Hi there, I myself is one noob that would drive a moderator nuts - however first and foremost the first set of data (pictures) are of the outmost importance - with that said:

When extraction is complete -most often you don't know what the machine recognizes BUT let's say you have five photos of faces it will have the file name XX_0.JPG - in cases where the machine can't define the input (false positive) - it could be a warped frame, hand, butt (whatever) - and in my case 97% (out of 3000 images) it will have the following extension XX_1.jpg.

So to rough-cut your extraction - use command prompt in your extraction directory and use the "del *_1.jpg" - BUT DON'T FORGET to follow the guide for sorting when photos are deleted.

Hope that helps you out a bit.


Re: [Guide] Extraction - A Workflow

Posted: Sat Jan 18, 2020 12:24 pm
by torzdf
SmellyCheese wrote: Sat Jan 18, 2020 4:46 am

You can use several masks for one faceset? Hm, have you noticed better results with that? And would you have to restart training?

Also, if you find the time, could you write out a brief workflow on how to use several masks. Thanks!

I mean you can "store" several masks per faceset, not that you can use them. You can only use the same mask for training A and B (at the moment).

I haven't had a chance to assess the newer masks yet.


Re: Cleaning up

Posted: Sat Jan 18, 2020 12:27 pm
by torzdf
sergor wrote: Sat Jan 18, 2020 10:05 am

So to rough-cut your extraction - use command prompt in your extraction directory and use the "del *_1.jpg" - BUT DON'T FORGET to follow the guide for sorting when photos are deleted.

Hope that helps you out a bit.

I don't recommend this. The order that detectors find faces is entirely arbitrary. Let's say it finds 2 faces in a frame, 1 of which is a false positive. The correct face could be in any of position of 0 and 1. By deleting all of the faces in position 1, you are giving yourself a 50/50 chance of either deleting a face or a false positive.


Re: [Guide] Extraction - A Workflow

Posted: Sun Jan 19, 2020 2:40 am
by SmellyCheese

I extracted my A with components and my B with vgg-obstructed and got poor results. Could that have been why? This is before I read you can only train with one mask


Re: [Guide] Extraction - A Workflow

Posted: Sun Jan 19, 2020 11:06 pm
by 9112097

不是很懂,能做一个视频教程吗?

[mod]Machine translation: Not very understanding, can you make a video tutorial?[/mod]


Re: [Guide] Extraction - A Workflow

Posted: Wed Jan 22, 2020 3:17 am
by omniplex

hey this looks like a lot of work to put all this together so first off thanks. second though ive read through this a few times and I thought I understood, and then I started having very basic questions that don't seem to be addressed in simple terms. during the extraction are we extracting the face that we want to use, or are we extracting the face we don't want to use, that we then replace later? I know its probably an obvious thing for most but the answer to that simple question would help me a lot! thanks!


Re: [Guide] Extraction - A Workflow

Posted: Thu Jan 23, 2020 6:47 pm
by deephomage

To train a model, you need to extract both pairs of faces from video clips, to make a face set. For example, to swap Keanu Reeves and Nic Cage, you would extract Keanu and Nic faces from a variety of sources, to make a training set for each. If the video clips also contain unwanted faces, just delete the unwanted faces.


Re: [Guide] Extraction - A Workflow

Posted: Wed Feb 12, 2020 6:59 pm
by korrupt78

I'm confused: What's the purpose of merging alignment files when merging training sets given that alignment files aren't actually used during training?


Re: [Guide] Extraction - A Workflow

Posted: Wed Feb 12, 2020 8:07 pm
by deephomage

In a broad sense, a clean set of images means keeping the extracted faces you want to swap, deleting unwanted faces extracted from the video clip and also deleting any extracted objects falsely identified as faces.


Re: [Guide] Extraction - A Workflow

Posted: Wed Feb 12, 2020 8:52 pm
by korrupt78
deephomage wrote: Wed Feb 12, 2020 8:07 pm

In a broad sense, a clean set of images means keeping the extracted faces you want to swap, deleting unwanted faces extracted from the video clip and also deleting any extracted objects falsely identified as faces.

Was that in response to me? Not trying to be rude, but genuinely confused because it doesn't seem to be answering the question I was asking at all. Maybe I did a bad job explaining. From the top:

  1. Sometimes I extract for conversion, in which case I extract every frame, and keep the alignments file, as the alignments file is what will be used for the conversion process.

  2. Sometimes I extract for training, in which case I'll only extract every 10-15 frames, and discard the alignments file, because the training phase only makes use of the images, not the alignment files.

  3. Sometimes I build a training set from images extracted from multiple videos, which means multiple extraction steps, followed by copy the contents of multiple image folders into one image folder.

The above Extract guide explains how to merge the alignment files from multiple extractions into a single alignment file, which only makes sense in the context of assembling a training set - you would never need to merge alignment files for a conversion, because conversions are done on single videos.

But if I'm not using the alignment file for training, then what need is there to merge them? Why bother merging alignment files into a single alignment file that you won't be using for anything?

It doesn't make sense, which to me is a red flag that I'm misunderstanding something potentially important.