Page 2 of 4

Re: [Guide] Extraction - A Workflow

Posted: Mon Dec 16, 2019 3:49 pm
by bryanlyon

No, this is really not how the alignments are used. Even when copying from a previous frame, we recommend just using that as the starting point of detecting so that you get valid alignments for the face, otherwise you are just adding bad data that will confuse the model.


Re: [Guide] Extraction - A Workflow

Posted: Mon Dec 16, 2019 4:50 pm
by tokafondo
bryanlyon wrote: Mon Dec 16, 2019 3:49 pm

No, this is really not how the alignments are used. Even when copying from a previous frame, we recommend just using that as the starting point of detecting so that you get valid alignments for the face, otherwise you are just adding bad data that will confuse the model.

Thanks. I understand what you say. That 'copy-drag' thing is what I thought as the solution to have faces swapped in takes where the face appears from one side of the screen, when the camera is panning. The first frame would show the ear, the following one, the ear and the cheek, the next one, the ear, cheek and half the nose... you know what I mean, don't you?

I haven't been able to get face recognition get those right, so I thought that just getting the landmarks from a few frames later, and copy to the former, it could do the trick.


Cleaning up

Posted: Sat Dec 21, 2019 5:56 am
by dingdong420

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?


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.