[Guide] Extraction - A Workflow

Extracting faces for training and converting
Forum rules
Read the FAQs and search the forum before posting a new topic.

Please mark any answers that fixed your problems so others can find the solutions.
User avatar
bryanlyon
Site Admin
Posts: 155
Joined: Fri Jul 12, 2019 12:49 am
Answers: 15
Location: San Francisco
Has thanked: 3 times
Been thanked: 42 times
Contact:

Re: [Guide] Extraction - A Workflow

Post by bryanlyon » Sat Dec 21, 2019 6:04 am

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.

Tags:

User avatar
dingdong420
Posts: 5
Joined: Sat Dec 21, 2019 3:43 am

No. json

Post by dingdong420 » Sat Dec 21, 2019 7:50 am

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.

User avatar
bryanlyon
Site Admin
Posts: 155
Joined: Fri Jul 12, 2019 12:49 am
Answers: 15
Location: San Francisco
Has thanked: 3 times
Been thanked: 42 times
Contact:

Re: [Guide] Extraction - A Workflow

Post by bryanlyon » Sat Dec 21, 2019 8:08 am

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.

User avatar
BLACKPINK
Posts: 13
Joined: Mon Dec 09, 2019 2:06 pm
Has thanked: 3 times

Re: [Guide] Extraction - A Workflow

Post by BLACKPINK » Sat Dec 21, 2019 10:13 am

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

User avatar
bryanlyon
Site Admin
Posts: 155
Joined: Fri Jul 12, 2019 12:49 am
Answers: 15
Location: San Francisco
Has thanked: 3 times
Been thanked: 42 times
Contact:

Re: [Guide] Extraction - A Workflow

Post by bryanlyon » Sat Dec 21, 2019 5:15 pm

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.

User avatar
Now
Posts: 10
Joined: Sat Jan 04, 2020 6:30 pm
Has thanked: 6 times

Re: [Guide] Extraction - A Workflow

Post by Now » Sat Jan 04, 2020 7:04 pm

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

User avatar
torzdf
Posts: 304
Joined: Fri Jul 12, 2019 12:53 am
Answers: 66
Has thanked: 10 times
Been thanked: 69 times

Re: [Guide] Extraction - A Workflow

Post by torzdf » Sun Jan 05, 2020 12:28 pm

Does a crash report get generated?

Can you hit the "Generate" button and post the command?
My word is final

User avatar
SmellyCheese
Posts: 10
Joined: Wed Jan 08, 2020 3:35 pm
Has thanked: 7 times

Re: [Guide] Extraction - A Workflow

Post by SmellyCheese » Fri Jan 17, 2020 6:38 pm

Is it okay to extract your input A and B with different masks? Is it detrimental?
The pursuit of knowledge and competence

User avatar
torzdf
Posts: 304
Joined: Fri Jul 12, 2019 12:53 am
Answers: 66
Has thanked: 10 times
Been thanked: 69 times

Re: [Guide] Extraction - A Workflow

Post by torzdf » Fri Jan 17, 2020 8:12 pm

Should be fine. You can also add additional masks with the mask tool
My word is final

User avatar
SmellyCheese
Posts: 10
Joined: Wed Jan 08, 2020 3:35 pm
Has thanked: 7 times

Re: [Guide] Extraction - A Workflow

Post by SmellyCheese » 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!
The pursuit of knowledge and competence

User avatar
sergor
Posts: 3
Joined: Wed Jan 15, 2020 7:59 pm
Has thanked: 3 times

Re: Cleaning up

Post by sergor » Sat Jan 18, 2020 10:05 am

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.

User avatar
torzdf
Posts: 304
Joined: Fri Jul 12, 2019 12:53 am
Answers: 66
Has thanked: 10 times
Been thanked: 69 times

Re: [Guide] Extraction - A Workflow

Post by torzdf » Sat Jan 18, 2020 12:24 pm

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.
My word is final

User avatar
torzdf
Posts: 304
Joined: Fri Jul 12, 2019 12:53 am
Answers: 66
Has thanked: 10 times
Been thanked: 69 times

Re: Cleaning up

Post by torzdf » Sat Jan 18, 2020 12:27 pm

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.
My word is final

User avatar
SmellyCheese
Posts: 10
Joined: Wed Jan 08, 2020 3:35 pm
Has thanked: 7 times

Re: [Guide] Extraction - A Workflow

Post by SmellyCheese » Sun Jan 19, 2020 2:40 am

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

User avatar
9112097
Posts: 2
Joined: Sun Jan 19, 2020 11:02 pm

Re: [Guide] Extraction - A Workflow

Post by 9112097 » Sun Jan 19, 2020 11:06 pm

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

Message from moderator

Machine translation: Not very understanding, can you make a video tutorial?

User avatar
omniplex
Posts: 1
Joined: Wed Jan 22, 2020 2:34 am

Re: [Guide] Extraction - A Workflow

Post by omniplex » Wed Jan 22, 2020 3:17 am

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!

User avatar
deephomage
Posts: 6
Joined: Fri Jul 12, 2019 6:09 pm
Has thanked: 1 time
Been thanked: 3 times

Re: [Guide] Extraction - A Workflow

Post by deephomage » Thu Jan 23, 2020 6:47 pm

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.

Post Reply