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.
[Guide] Extraction - A Workflow
Read the FAQs and search the forum before posting a new topic.
This forum is for discussing tips and understanding the process involved for Extracting and preparing face sets for training a model in Faceswap.
If you have found a bug are having issues with the Extraction process not working, then you should post in the Extract Support forum.
Please mark any answers that fixed your problems so others can find the solutions.
Re: [Guide] Extraction - A Workflow
bryanlyon wrote: ↑Mon Dec 16, 2019 3:49 pmNo, 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.
- dingdong420
- Posts: 10
- Joined: Sat Dec 21, 2019 3:43 am
Cleaning up
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?
- bryanlyon
- Site Admin
- Posts: 799
- Joined: Fri Jul 12, 2019 12:49 am
- Location: San Francisco
- Has thanked: 4 times
- Been thanked: 220 times
- Contact:
Re: [Guide] Extraction - A Workflow
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.
- dingdong420
- Posts: 10
- Joined: Sat Dec 21, 2019 3:43 am
No. json
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.
- bryanlyon
- Site Admin
- Posts: 799
- Joined: Fri Jul 12, 2019 12:49 am
- Location: San Francisco
- Has thanked: 4 times
- Been thanked: 220 times
- Contact:
Re: [Guide] Extraction - A Workflow
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
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
- bryanlyon
- Site Admin
- Posts: 799
- Joined: Fri Jul 12, 2019 12:49 am
- Location: San Francisco
- Has thanked: 4 times
- Been thanked: 220 times
- Contact:
Re: [Guide] Extraction - A Workflow
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.
- SmellyCheese
- Posts: 11
- Joined: Wed Jan 08, 2020 3:35 pm
- Has thanked: 7 times
Re: [Guide] Extraction - A Workflow
Is it okay to extract your input A and B with different masks? Is it detrimental?
The pursuit of knowledge and competence
- SmellyCheese
- Posts: 11
- Joined: Wed Jan 08, 2020 3:35 pm
- Has thanked: 7 times
Re: [Guide] Extraction - A Workflow
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!
The pursuit of knowledge and competence
Re: Cleaning up
dingdong420 wrote: ↑Sat Dec 21, 2019 5:56 amI 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
SmellyCheese wrote: ↑Sat Jan 18, 2020 4:46 amYou 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.
My word is final
Re: Cleaning up
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.
My word is final
- SmellyCheese
- Posts: 11
- Joined: Wed Jan 08, 2020 3:35 pm
- Has thanked: 7 times
Re: [Guide] Extraction - A Workflow
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
The pursuit of knowledge and competence
Re: [Guide] Extraction - A Workflow
不是很懂,能做一个视频教程吗?
[mod]Machine translation: Not very understanding, can you make a video tutorial?[/mod]
Re: [Guide] Extraction - A Workflow
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!
- deephomage
- Posts: 34
- Joined: Fri Jul 12, 2019 6:09 pm
- Has thanked: 2 times
- Been thanked: 8 times
Re: [Guide] Extraction - A Workflow
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.