Faceswap Deepfakes Tutorial for Noob (AMD Radeon RX 570)
Vložit
- čas přidán 14. 05. 2020
- #DeepFakes #Faceswap #DeepFaceLab #PlaidML
The new updated Faceswap V2.0 tutorial:
• Faceswap V2.0 Deepfake...
Step by step FaceSwap Tutorial for deepfakes. Running on AMD Radeon RX 570 GPU.
Deepfakes Aviani Malik x Kim Da Mi (Jo Yi Seo from Itaewon Class)
Update Faceswap Version 2.00: In the newest version of Faceswap you have to input alignment file before training (Alignments A and Alignments B, see at 8:43 ). You can find alignments file in your project folder after extracting face from both videos. Alignments file named: videoname_alignments.fsa.
Faceswap Info:
github.com/deepfakes/faceswap
faceswap.dev/
Faceswap download:
github.com/deepfakes/faceswap...
Hardware:
CPU: AMD Ryzen 2400G
GPU: AMD Radeon RX 570 4GB
RAM: 8GB - Jak na to + styl
Thanks for the video! Very helpful for the actual step by step of the process. Update the video with a revised install and you're golden.....and yes you need a very good graphics card to make this worth your while.
That is quite some work and thank you very much being honest and generous to share the real time data
It's worth mentioning that the author of this video suggested removing all faces which have an obstruction or are not clear, this can help with the target face (B) but you should not do this with the source face (A). I found that removing these faces from A meant that the application did not replace the face for these deleted frames. A subsequent attempt keeping the faces in meant it was able to actually replace the face for these frames, you can play around with the masking tool in manual mode to erase around the obstruction but I found the AI is quite competent at recreating the obstructions itself.
How thank you for the informative video! Really appreciate it. thank you!
I have a few questions: you train the model to transform from source face (A) to target face (B). Are there any other conditions for the training faces, eg: they need to be roughly similar in pose for each frame? And once you've trained, can you take ANY video with the source face A and transform it to target face B? Thank you :)
Thats the part where machine learning comes in to play. Try to keep the two models generally looking the same, and as always the more pictures you have of each model the better. But in general, the AI will try to fill in those gaps of what it believes it should do make face A look as close to face B. This is also where time will come into play, the longer you allow it to train on the faces the more it will learn about each face and will produce a better product
my issue is the amount of training time it takes for accurate result. it wont fit a short production schedule live TV program sketches
1:51 I see AI Shoujo anjay man of culture
when i convert "ERROR No alignments file found. Please provide an alignments file for your destination video (recommended) or enable on-the-fly conversion (not recommended)." what should I do?
Thanks for sharing! Informative video 👍
Question; so if I stopped the training after only 8-10 hours and convert? and if it doesn't work or it is not how i want it, can I continue the training from where it left off even if it converted? I thought I posted the question already but it disappeared or something. Sorry if it does show up twice though!
So, I was facing the issue with the "alignments" file or whatever. First, try moving it from the source file to the extracted file. If that doesn't work, change the name from whatever it is to just "alignments.fsa". If both don't work, download another video, change the formatting from .mp4 to .mov, or just chose a totally different video.
So like what if we have to edit video taken from different angles? Do we need similar movements from face we wanna edit in place of orignal one?
Cool video... just installed the thing on my arch linux, will give it a try... Need to search for example videos...
Source and destination both looks the same exact face :) I don't see you can use pre-trained models. Theoretically this should save lots of time. Is there no interactive mixing option? Your choose the algorithm, like historically matched colors, and see the result only when it's done? Kinda wired doing it this way...
hi, i tried this but the face just ends up looking the same but a bit blurry? ive ran it for 3 hours and got 40000 iterations, do i need to run it longer? the face looks exactly the same as the original just blurry. i have an amd rx 6800 xt
Hello, I followed your tutorial and everything was perfect. I even already had a fairly trained model (60,000 iterations). But I tried to use that model in another project with another target video but with the same arranged faces of mine. and then when I started training my first model with that second video the program started to crash. and even though I configured the folders correctly, it kept crashing when training the model. so I chose to uninstall the program and reinstall it but now the program does not start, only the black screen of the program appears (like that of the windows cmd) but then it closes and does not start the program. do you know why that happens?
I have a GTX 1060 6Gb and I will upgrade to a newer GPU.
What is better to choose more Vram or more Cuda Cores?
In example RTX 3060 is 12gb but RTX 3060Ti has more Cuda Cores and 8gb Vram.
Go for the 12gb Vram or for more Cuda cores for faster Faceswap times?
at the end when u convert it doesnt show that stuff under analysis, those things with the little blue circular graph symbols is that a problem ? should they be there before converting?
whenever I select the Model Dir in the Convert Tab it dosent relaod the session stats causing it to not convert
I did the exact thing you did, but I get the alignments.fsa file cannot be found. For some reason it stores the alignments named wrong in the base folder... modelA_alignments.fsa for instance. I had to rename the file to alignments.fsa and move it into the correct face folder. and then the script complained about the misaligned/erroneous images I'd deleted, but it seems to be progressing.
Why is this happening? So far, I'm not impressed by faceswap compared to dfl.
how long is your video you used?
the one im doing is like 1 minute will the times be shorter?
i did a face swap of alexandra danddario and lana rhoades lmao. noice. thanks for the vid my man
@@scoot-casts my man is just a saying dont take it so literally
yo can u tell me the size of this after installation cause my internet sucks man i live in the countryside
how much time did it take
@@sooraja1104 one or two day if video is short but if pictures are a lot, it spend a lot of time. It took me a whole week for 70000 iterations. So it is based on computer speed too.
@@justmilkmeme3211 Wow thats bad my laptop can do 150K iterations in 8 hours but i have no idea what makes it faster or slower as far as video/frames
hi, where can i get those 2 sample videos? I'm stuck in trying those 2 examples videos. Can you give those 2 sample videos or any video?
Could you illustrate swapping between just two still images?
Yes, we need something besides a video, unless it works exactly the same...
Or even if you want to edit a face from a photo into a video, unless you need more angles.
Does the training ever end? or do you need to keep it as much as possible for better results?
how to know when stopping the training? Thank's a lot, it's very dificult to find something interesting about deepfake apps! 2nd thing, why i try to launch the "convert" option, that tell me "no alignement file found" i have look on all the faceswap folder but i don't found nothing :(
Stop the training when the images look good. If you save it, yo can restart it if it isn't good enough. There is no default number of iterations. generally, the more you do the better your video.
I'm having a problem when converting it says that no alignment found for unknow png skipping and when I go on preview it gives me another problem that faces can't be found error
do you have any tutorial por pictures instead of videos? cant get it to work
Well done, great video, it can work live too, once everything has been scanned?
I would like to know how to do, Face A from Video A and Face B from Video B, is that video B must be follow A movement to recording or , we can use the other video for capture?
Im now at 80000 iterations and when I convert the Video the face is blurred. Do I Have to train more or is there any other reason for this?
Hi, I followed the instruction to install the Faceswap with choosing "Setup for Nvidia GPU" .
When I train the video, the resource of CPU shown in Windows 10 was ocuppied in high level (almost 80%),
but the resource of the GPU is just occupied in 4 to 5%.
I ' m not sure the GPU is running to train the video or not .
Thank you very much.
U downloaded it for gpu or cpu?
i cant run faceswap even with the stuff that needs to be installed and it closes too fast that i cannot see the error message
In the end I only get low resolution individual frames and no video. How can I change this?
Error unserializing data for type : Error -5 while decompressing data: incomplete or truncated stream HOW TO FIX IT ?
What is the background music?
is there a way to remove bad faces or no faces from extracted files and update the alignments.fsa file after that?
what best software for amd gpu? Faceswap or deepfacelab? That more fast and more accurate. You not mention how many hours while using opencl deepfacelab. Please reply, many thanks
Nice, thanks!
on my converted video the face havent changed, after 76000 iterations...
Maybe you wrong? On Extract you use Output size = 256. In training you use Trainer = original that it work at 64px. What happen in this case? Loss only time?
I have no Alignments attachments in train category. There only input A and Input B in Faces category
where do you choose alignments?? i have two alignment files
This dude has over 500 games just on his desktop i wonder how much on his steam libary
LMAO FR
It's saying I have to have an alignment file in order to convert. On the conversion tab it's the 3rd file option. I see you didn't put anything in yours and I matched your video exactly and now I can't convert. What is that file and where is it located?
Yeh I had the same problem following this tut. Error no alignments file found.
I just found my alignment file. Make sure its in the same folder as the original video. Works now.
@@whovisionsCGI I think one of the issues I had was the converted faces, a and b, were different sizes. The program can't match different sizes like that.
Yes I found that out too. Still working on my first test. Not looking great yet but will let it keep training.
So all that work for 20 seconds? Can you reuse these 2 models to another longer video later? Or would you have to start all over again if you wanted do do a longer video?
Hi there, im getting the error 'status: failed train.py returned code: 1'. I've tried everything to fix it but nothing is working, can anyone help?
what is the music in the background?
the images after extracted from video didn't go to the output folder??
Any samples when using the RTX 4080 or a RTX 4090?
Awesome, thank you.
Training stops with error. And i don´t know why. I did the same like in this video. But i have a RX 580 8GB.
Hi I need help, There was an error importing Tensorflow. This is most likely because you do not have TensorFlow installed, or you are trying to run tensorflow-gpu on a system without an Nvidia graphics card. Original import error: No module named 'tensorflow'
I’d reinstall the program. I think you have the nvidia version.
Please, suggestion me. I was use AMD Radeon RX 570 too. But not have option like "Setup for AMD GPU", when I run faceswap_setup_x64.exe in my case. Can I choose middle option( "Setup for DirectML") for AMD Radeon RX 570?
how to do this if there are multiple faces in source video? I think it is only works for single face included videos.
I have an error in the program :
"Failed to get convolution algorithm. This is probably because cuDNN failed to initialize"
and i don't know what to do
Very easy problem to solve. It appears to be a Vram memory problem. I had it too. To solve it, place this code into your train, extract, and convert script files at ..\faceswap\scripts.
import tensorflow as tf
gpus = tf.config.experimental.list_physical_devices('GPU')
if gpus:
try:
# Currently, memory growth needs to be the same across GPUs
for gpu in gpus:
tf.config.experimental.set_memory_growth(gpu, True)
logical_gpus = tf.config.experimental.list_logical_devices('GPU')
print(len(gpus), "Physical GPUs,", len(logical_gpus), "Logical GPUs")
except RuntimeError as e:
# Memory growth must be set before GPUs have been initialized
print(e)
You can also go into settings-global and enable 'allow growth'
We about to have some fun Today!
Thanks for the tutorial ! Very nice ! Is the iteration faster when we have a lot of faces extracted ? If i have 300 faces each, is it ok ? I need more or less ?
Hi! You need more, some people used 3000 to get a satisfactory result.
@@nereaavinovelazquez3205 I did my own using a different method. Over 21,000 face images extracted from my video and the result was insane.
@@xXxPaRk0uRxXx lol thank you very much but you're almost 4 months late since I needed it. Anyway thanks for answering :3
@@nereaavinovelazquez3205 Did you get the result you wanted? I've been using nvidias DeepFace lab recently and it's really great, just takes a little longer to do!
@@xXxPaRk0uRxXx kinda, I worked on the project with a 4G laptop without a graphics card and still, I think I did a miracle with it
Not enough free VRAM for parallel processing. Switching to serial
how do i make this go away ?
I have the same problem
How did you solve the blur on the face? Even though I went over 100 hours, the blur on the face does not go away, although there are 3000 photos taken from different angles, I am waiting for your help.
So I did some research and it said around 40 000 iterations were needed. I did that, but damn, the final result is blurred and you can obviously tell the video was edited. Any suggestions?
After completing the convert process, the folder i selected for end result shows only pictures with merged faces and not video... Please help
Select Ffmpeg on convert section
excellent explanation. I didn't understand, however, why you stop the test after 70k iterations, is this a value that you consider optimal?
Just for a tutorial purpose, it doesn't seem necessary to go anymore higher considering he's spent several days on it as is.
i did the extract and the photos are in face a and face b but when i go to train and i open the folders they arent there
Friends, when trying to extract the faces, faceswap does not detect the images or the videos in the folder where I have them, how can I solve the problem?
When I'm running extract images from src video data_src it is showing this error cuda version is insufficient for cuda runtime version error in deepface...please help me to fix it
Hello. With gtx980 and i5 6600 I'm having around 70000 iterations in 3hrs. It's the same of the video but in 1/4 of the time. Wondering that in 35/45min you can have same performance with new Nvidia graphic cards.
depends on model type, learning rate for the model and amount of training pictures.
Very helpful video. Great work! Thank you.
Anyone knows how many extracted face files are sufficient to use in the output folders? or is it the more faces the better? since the folders are quite large (few hundred MB each)
Yes, many faces are great, but the more there are, the more time to train.
lorg0n ah ok thanks, so it’s a trade off i guess.
@@dingus42but the difference between 3000 faces and 6000 for one number of hours of training is not great. Search in google, there is an experiment with the number of faces.
[На русском/russian language because I'm not sure about the translation]@dingus, но разница между 3000 лиц и 6000 за одно количество часов обучения невелика. Поищи в гугле, есть эксперимент с количеством лиц.
@@dingus42 UPD: forum.faceswap.dev/viewtopic.php?f=6&t=831
If anyone uses Avast and is having issues with the file not saving and an error message amongst the lines of: Permission denied (...) try turning it off temporarily and it should work.
What can i do if i have 2 or more Faces in a clip? But only want one changed?
the program is not installed, everything was done as described, removed CUDA, the program gives an error when installing..
Why we can’t use A for video and B for 1 photo of face only? Why B must be video too? I tried other swaping software all can use 1 video and 1 photo.
i have a question. is it possible to save the current data of the project while your pc is turn off ?
i subscribed!!. one question, when insall, it says conda error, what can i do?
i stuck on inatlling the program it says i faill to install miniconda 3 ,what can i do?
Which is the source and destination? Is Face A source and Face B destination? Or does it even matter and it works either way?
Hi, nice video, but the installer does not want to install Miniconda. I says it got an error and that´s it. Any ideas ?
Where can I get some libraries of face images? I don't care who i'm just doing it for curiosity
Hey guys, I see some of you here in the comments have some trouble in the training time with Alignments A and B (videos A and B respectively), to fix it you should select the alignments files (.fsa) of each video, you can find the files in the original videos directory 🖖.
yo can u tell me the size of this after installation cause my internet sucks man i live in the countryside
Ahha on looking again, I see this. I just moved the fsa files into the appropriate folders and renamed them.
But if you get bad face extracts and delete some, the program still warns you which can be confusing to some people I guess...
@@parishna4882 Where can I get these fsa files?
@@user-ui4qd1kv8g They should be in the default main folder. for some reason they don't automatically go into the proper folders, where it looks for them. You can also select the location in the gui.
Once you've run the first steps, the .fsa file will be there.
@@parishna4882 thnx
If I have a video and there are 3 faces in the same frame and I want to change them, how do I change?
tq bruhh i want to this for my FYP pproject
When you press "Stop" when it is training, will it stop the process and hold on to it until you want to train it more, or will it completely start all over and you will have to start from the beginning?
Same question
It will stop the process and hold on to it until you want to train it more (Fortunately).
It will hold onto it as long as you save the project.
No alignments file found. Please provide an alignments file for your destination video (recommended) or enable on-the-fly conversion (not recommended
Same here, what do we do?
When ur extracting the images, you should see 2 alignment files created in your folder, just use them
During the Extract process, files are created in the directory with suffix *.fsa. This is the part skipped on 9:00 of this video. Select the Alignments A and B, don't skip over it.
@@V.Z.69 thanks mate, this lady just wasted 36 hours of my time
While training, the software is asking for the alignments file, and if I delete some unnecessary faces then giving the message that there are faces missing which are in the alignments file, what to do??
I can't resume the training even after saving the project, it is showing critical error, please help
I'm currently in the training process and have a question: Is it more about the iterations or the time that it's needing? I have a very good PC and have about 200,000 iterations now after aprox. 10 hrs. This should be enough for a 6 min video I suppose?
200,000 iterations in 10 hours, you have very powerful computer. May I ask how much memory your graphics card has please?
@@yangwei6910 Hey no problem, I have the NVIDIA RTX 3080 which has a memory size of 10GB. I can also really recommend to buy high end components in used condition. For about 2,000€ I was able to build a PC which would have costed around 3 - 4,000€ when all new
So uh, quick question, do I have to get rid of a second face being in FaceA before I train it?
Yes get rid of the face you don't want to convert
why you gave your link instead of original faceswap website?
Thanks you, SUBSCRIBED
Wait so do you need to wait for 1 Day - 1 Week for deepfake output?
hello, why i can't detect gpu use cpu when i use it? i'm sure i have gpu rtx2080
nice vid thx :)
Thank you for the video! It is quite informative and easy-to-follow. But after the extraction during the training process I've got a mistake "Error while reading image. This can be caused by special characters in the filename or a corrupt image file: "File name". Original error message: Image is None". I didn't find a solution surfing the net, so maybe you can help me with this case?
Hi, I have the same problem. Have you find a solution ?
@@Maxou_ unfortunately no
@@afapril ow 😟 Don’t have an another software ?
Train 20 hrs did not have a good result.
Need to leave 50 hrs?
It's not worth it ... a long time, is there a faster method?
Thanks
does not work so good on AMD cards. The last big update (august or so) crashed training or corrupted my models on my Vega 56. Everything OK since I switched to Nvidia 30x.
can you use this for photos? or only videos?
After deleting the pictures that you dont need. Do you need to cleanup the allignment file to?
forum.faceswap.dev/viewtopic.php?t=27#align
I think FS just throws out a warning about the missing files and then carries on.
Do I have to train a new MODEL for every new VIDEO I want to convert??
hi my comouter no GPU card , is there GPU card can compulsory?
plzz help amd error while open app .-there was an error importing tenserflow