We earn commission when you buy through affiliate links.
This does not influence our reviews or recommendations.Learn more.
Your one-stop explainer on Deepfakes and to make them easily with Faceswap.
Artificial Intelligence isnt that artificial anymore.
These times have put it dangerously close to us humans.
It can suggest, write, create art, and now looks and talks like the living.
This is one of the most recent developments in this domain we should take advantage of.
However, this is also one we must beware of.
What Are Deepfakes?
The word Deepfake is coined by combining deep learning and fake.
In simple terms, you could also assume this is expertly manipulated or deeply faked media.
Typically, deepfakes make renowned personalities appear to say something they otherwise wouldnt.
Based on its creators skill, it can be extremely tough to tell if its real or fake.
How Deepfakes Work?
In such a case, it can also be called a faceswap, like in thisDeepfake Obama video.
The working methodology behind such trickeries primarily depends on the system and the underlying algorithm.
There are three major processes to generate deepfakes: extraction, training, and conversion.
Based on the hardware capabilities, there can be many algorithms to opt for efficient detection.
Extraction simply identifies the face in the overall video.
Alignment spots crucial features of any face (eyes, nose, chin, etc.).
And lastly, masking blocks out other elements of the image except for the area of interest.
Ultimately, the extraction is repeated for the original video and the fake (used for swapping).
#2.Training
This is the heart of creating deepfakes.
Training is about the neural online grid, which consists of the encoder and decoder.
Here, the algorithms are fed the extracted data to create a model for the conversion later.
Afterward, the neural connection evaluates its iterations and compares them with the original by assigning a loss score.
For instance, Faceawap suggests a minimum of 500 images each, original and for swap.
Notably, the photo-realism of the output also depends on the algorithms efficiency and the input.
And one is again restricted by the hardware capabilities.
#3.Conversion
This is the last chapter in the deepfake creation.
The conversion algorithms need the source video, the trained model, and the source alignment file.
After configuring these few options, you just wait for the final render.
As mentioned, Faceswap works with many algorithms, and one can play between to get a tolerable faceswap.
Is that all?
This was just face swapping, a subset of deepfake technology.
So, whats at play here?
Conclusively, its not just about faceswap but the whole frame, including the audio.
And all it takes is a power-packed computer with an efficient graphics card to begin.
However, perfection is hard to achieve, and its especially true with deepfakes.
Interestingly, thats how capable these algorithms are as of now.
However, we wont dive into its future repercussions.
Instead, lets check how to do it yourself for little fun.
One of them is Faceswap, which well be using.
There are a few things well ensure before proceeding.
First, we should have a good-quality video of the target depicting varying emotions.
Next, well need a source video to swap onto the target.
In addition, close all the graphic card intensive applications like browsers or games before proceeding with Faceswap.
This is especially true if you have less than 2 gigs of VRAM (video RAM).
For this, we have to go for the target video in theInput Dirand list anOutput Dirfor the extractions.
In addition, there are a few options, including detector, aligner, masker, etc.
Its generally good to review the documentation for a better understanding and a decent output.
Originally, I tried it with S3Fd (best detector) and a few other masks combined.
However, my 2Gb Nvidia GeForce GTX 750Ti couldnt bear the brunt, and the process failed repeatedly.
Finally, I toned down my expectations and the prefs to see it through.
These options arent available universally, and its based on a specific section.
Additionally, the help texts further aid in selecting the best options.
This leads to cleaning the datasets.
Either one can check the output folder and delete oneself or use the Faceswap sorting to get some help.
As a reminder, youll also want to repeat extraction for the sourced video.
Step 2:Training the Model
This is the longest process in creating a deepfake.
Here,Input Arefers to the target face, andInput Bis about the source face.
Besides, theModel Diris where the training files will be saved.
Here the most significant option isTrainer.
Next is the batch size.
A higher batch size reduces the overall training time but consumes more VRAM.
Step 3:Swapping Onto Original
This is the last feat in the deepfake creation.
Most options are already discussed, like the Input and Output directory, Model directory, etc.
One crucial thing is the Alignments which refers to the alignment file (.fsa) of the target video.
It gets created in the Input Directory during the extraction.
The Alignments field can be left blank if that specific file hasnt been moved.
Otherwise, one can snag the file and move on to other options.
However, remember to clean the alignment file if you have cleaned the extractions earlier.
For this, this mini tool lies in theTools > Alignments.
This will create a modified alignment file, matching the optimized faces folder.
c’mon remember we need this for the target video, which we want to swap into.
A few more configurations include the color adjustment and mask punch in.
Mask throw in is more important.
This, again, depends on your expectations and the available hardware.
Typically, you also need to consider the input video characteristics.
Next, theWriterpresents a few choices based on the output you want.
For E.g., selectFfmpegfor a video render.
Applications of Deepfake
There are good, bad, and dangerous applications of deepfakes.
The good ones consist of recreating history lessons by the ones that were actually there for greater engagement.
In addition, they are being used by online learning platforms to generate videos from texts.
But one of the greatest beneficiaries will be the film industry.
Additionally, making multi-lingual movies will be easier than ever.
Coming to the bad ones, unfortunately, there are many.
In addition, deepfakes are also weaponized against standard non-celebrity women.
Usually, such victims havehigh-quality photographs or videoson their social media profiles which are used for deepfakes scams.
Another scary app is vishing, aka voice phishing.
But whats even more dangerous is deepfake provoking wars or asking for surrender.
However, the truth this time was given away by the subpar video.
Conclusively, there are many deepfake applications, and its just starting out.
This brings us to the million-dollar question…
Is Deepfakes Legal?
This majorly depends on the local administration.
Although, well-defined laws, including whats allowable and whats not, are yet to be seen.
Still, whats obvious is it depends on what youre using the deepfakes forthe intent.
There is hardly any harm if you intend to entertain or educate anyone without upsetting the swapping target.
On the other hand, malicious applications should be punishable by law, irrespective of the jurisdiction.
Another grey area is copyright infringement which needs proper consideration.
But to reiterate, you should check with your local government bodies about legal deepfake applications.
Keep an Eye Out!
Deepfkaes leverages artificial intelligence to make anyone say things.
Dont trust anything you see on the internet is the first advice we should act upon.
There is tons of misinformation, and their efficacy is only increasing.