How to convert after training

Converting source frames into swapped frames
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.
Locked
User avatar
rokh
Posts: 2
Joined: Sat Nov 09, 2019 8:40 pm

How to convert after training

Post by rokh »

OK so I trained the models, using extracted frames one set (A) for source Video and another set (B) for the swap. Training took longer than expected (over 20 hrs.) and I had to terminate early and then tried again, and again I had to terminate after several hours. 1th question: Is it OK to use the data from a terminated early training or do you have to have a completely finished training which could take days?
So I went ahead and used the early terminated training data to try to convert my project. So I put in my input directory path and my output directory path and specified my model directory (which again contained logs from the early terminated training) and I used all the default settings except I changed the Writer to Ffmpeg and I checked the box next to Swap model. The resulted converted video was the original video with the faces blured and the second try was even worse.
Unfortunately there isn't a thoroughly explained Convert process explanation on the forum like the other processes such as extraction and training which are clearly explained in their own chapters. And it also puzzles me what happens to my B folder containing the pictures that I like to replace the originals with because during conversion I don't see a file path for those and I am just guessing that the Model directory would lead the program to that file.
Having said all that my 2nd question is: "what exactly am I not doing right?"

Tags:

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

Re: How to convert after training

Post by bryanlyon »

As long as training doesn't corrupt (for example by the PC crashing during saving) you are fine. In fact, clicking "terminate" is the proper way of stopping training and continuing it is the recommended way of running faceswap over multiple training sessions.

We are working on a full Convert guide, but it is a pretty self explanatory process compared to the others. My recommendation is to start with the Preview tool, make sure the results look good, then read the tooltips in the convert tab. The process is quite simple and I think you'll be able to figure that out (and you can ask questions if you run into a problem).

You do not need to put the source faces into convert at all. You need to provide the frames you want the faces swapped, the alignments for that source video, and the trained model. The model does the swap from "memory" (this is the point of the training) so it doesn't need to see the separated faces in order to convert.

User avatar
rokh
Posts: 2
Joined: Sat Nov 09, 2019 8:40 pm

Re: How to convert after training

Post by rokh »

Thank you for replying. It just gets confusing when you have checked or unchecked a box here and there that might get you in trouble along the way. I'm still having problems with the conversion process and my next step is to go back to the beginning and try to do everything by the book and by reading the forums posts to find out where the problem is. Meanwhile I look forward to the new convert guide when it becomes available. Thanks again.

User avatar
RaynnXD
Posts: 2
Joined: Mon Feb 10, 2020 5:46 pm
Has thanked: 1 time

Re: How to convert after training

Post by RaynnXD »

hello :3 im new with this faceswap thing and yeah i read this section and how to do it but i still dnt know what to apply in the conversion page

!! Convert !!
for example :: " Input Dir" -> should i select the folder with the extracted faces "A" of me or the ones i want to fake Input folder "B"?
->should i select the folder with the trained faces?
Image
i watched a video on youtube with a guy saying i have to select a input folder with a video
but here it says : Input directory or video, Either a directory containing the image files you wish to process or path to a video file ,NB: This should be the source video/frames not the source frames" <--- so whats that???? i have to select the original video frames i extracted that are in Input folder B or the actual video? or its something else i dnt know?
!!Efffmpeg
i followed the tutorials extracting/training (actually im training something right now) but i wish to know how to do to save my work into an actual video format i can watch outside the application(faceswap)
Image
!!!!!!!please aswer when u can!!!

User avatar
torzdf
Posts: 650
Joined: Fri Jul 12, 2019 12:53 am
Answers: 95
Has thanked: 17 times
Been thanked: 131 times

Re: How to convert after training

Post by torzdf »

RaynnXD wrote:
Mon Feb 10, 2020 6:17 pm
for example :: " Input Dir" -> should i select the folder with the extracted faces "A" of me or the ones i want to fake Input folder "B"?
->should i select the folder with the trained faces?
This is the video/folder of frames that you want to put the face onto. (For example if you have Trump making a speech and you want to swap Trump's face with Nicholas Cage, this would be the path to the Trump speech video).

You should make sure you have generated an alignments file for this video (see the extract guide).
RaynnXD wrote:
Mon Feb 10, 2020 6:17 pm
i watched a video on youtube with a guy saying i have to select a input folder with a video
Have you got a link to this video? I can tell what is right/wrong if I view it.
RaynnXD wrote:
Mon Feb 10, 2020 6:17 pm
but here it says : Input directory or video, Either a directory containing the image files you wish to process or path to a video file ,NB: This should be the source video/frames not the source frames" <--- so whats that????
You've misread this, it says: NB: This should be the source video/frames not the source faces.
RaynnXD wrote:
Mon Feb 10, 2020 6:17 pm
i followed the tutorials extracting/training (actually im training something right now) but i wish to know how to do to save my work into an actual video format i can watch outside the application(faceswap)
Don't use Effmpeg. We still have it from when Faceswap couldn't output video, but we keep the tool around as it is still useful to have.

Instead, select the "ffmpeg" writer plugin in the convert settings to convert straight to video.
My word is final

User avatar
RaynnXD
Posts: 2
Joined: Mon Feb 10, 2020 5:46 pm
Has thanked: 1 time

Re: How to convert after training

Post by RaynnXD »

Don't use Effmpeg. We still have it from when Faceswap couldn't output video, but we keep the tool around as it is still useful to have.

Instead, select the "ffmpeg" writer plugin in the convert settings to convert straight to video.








yeah imissread that thing but everything expect this part with converting i did right

so yeah thanks for helping ,now i know how to convert into a video

but seems like i need the original video aligmen file which i somehow manage to get ,maybe luck :D
and i converted my first faceswap try :3(not the best just 4-5hrs on a 3m video) but looks ok somehow
hm im thinking of testing some masks,maybe it will improve the edges of the swapped face :3

Locked