Mr DeepFakes Forums
  • New and improved dark forum theme!
  • Guests can now comment on videos on the tube.
   
Total Likes Received: 99 (0.31 per day | 23.46 percent of total 422)
(Find All Threads Liked ForFind All Posts Liked For) Total Likes Given: 90 (0.28 per day | 21.33 percent of total 422)
(Find All Liked ThreadsFind All Liked Posts)
Reputation:  50
Details

dpfks
(Administrator)
Administrator

Registration Date: 02-25-2018
Date of Birth: Not Specified
Local Time: 01-16-2019 at 12:31 AM
Status:

dpfks's Most Liked Post
Post Subject Numbers of Likes
DeepFaceLab Explained and Usage Tutorial 6
Thread Subject Forum Name
DeepFaceLab Explained and Usage Tutorial Guides
Post Message
DeepFaceLab

NOTE: Making DeepFakes require a NVIDIA GPU with 2GB+ vRAM

I have moved from Faceswap to DeepFaceLab due to ease of use, better outcomes, and a lot of time saved. This tutorial will be a mix of the creator's instructions, and how I use and understand the program. The GitHub can be found here: You are not allowed to view links. Register or Login to view.

You are not allowed to view links. Register or Login to view.
(Choose the latest version based on date)

Features:
  • Available as standalone with zero dependencies, ready to be used with prebult binary for all windows versions.
  • New models (H64, H128, DF, LIAEF128, MIAEF128, AVATAR)
  • New architecture, easy to experiement with models
  • Works on 2GB old cards, such as GT730. Example of a deepfake trained on a 2GB gtx850m notebook in 18 hours: You are not allowed to view links. Register or Login to view.
  • Face data embedded in png files
  • Automatically manage GPU by choosing the best GPU(s) and also supports multi GPUs (only for identical cards) - do not use cards in SLI mode.
  • New preview window
  • Extractor in parallel
  • Converter in parallel
  • Added debug option for all stages
  • Added MTCNN extractor which reduces less jitter aligned faces complared to DLIBCNN; however this can produce more false positives in facial recognition.
[Image: You are not allowed to view links. Register or Login to view.]
Left = dlib
Right = MTCNN
  • Manual extractor allows you to fix missed faces, manually, or do full manual extract
[Image: You are not allowed to view links. Register or Login to view.]
[Image: You are not allowed to view links. Register or Login to view.]

Models Types:

H64 (2GB+): 64x64 face resolution, which is used in the original FakeApp or FaceSwap app, but this model in DeepFaceLab uses TensorFlow 1.8 DSSIM Loss function and separated mask decoder and better ConverterMasked. For 2GB and 3GB VRAM model works in reduced mode. This is also a good option for straight face-on scenes.

H64 example: Robert Downey Jr

[Image: You are not allowed to view links. Register or Login to view.]

[Image: You are not allowed to view links. Register or Login to view.]

H128 (3GB+): Same as above; however the resolution is improved 128x128 which conserves better face details, and will perform better with higher resolution videos and close-up shots. For 3GB and 4GB VRAM model works in reduced mode. Also great for direct face-on scenes and gives the highest resolution and details. Best option for Asian faces because of their relatively flat faces and even lighting on clear skin.

H128 example: Nicholas Cage

[Image: You are not allowed to view links. Register or Login to view.]

H128 example: Asian face on blurry target

[Image: You are not allowed to view links. Register or Login to view.]

[Image: You are not allowed to view links. Register or Login to view.]

DF (5+GB): dfaker model. Has 128x128 resolution with a full face model. When using this model, it is recommended not to mix src faces with different lighting conditions. Great for side faces but provides lower resolution and detail. This model covers a more "full" face which often expands and covers more areas of the cheeks. It keeps the face unmorphed giving a convincing face swap; however the dst face will have to have a similar shape.

DF example: Nicholas Cage

[Image: You are not allowed to view links. Register or Login to view.]

LIAEF (5GB+): New model which combines DF, IAE and experiments. The model tries to morph the src face into dst while keeping the facial features of src face but less aggressive morphine. This model has problems with closed eyes recognition. This model can partially fix dissimilar face shapes, but will result in a less recognizable face.

LIAEF128 example: Nicholas Cage

[Image: You are not allowed to view links. Register or Login to view.]

[Image: You are not allowed to view links. Register or Login to view.]

LIAEF128: Trump to Nicholas Cage example video

[Video: You are not allowed to view links. Register or Login to view.]

LIAEF128YAW (5GB+): Currently testing, but useful for when your src has too many side faces against dst faces. It feeds NN by sorted samples by yaw.

MIAEF128 (5GB+): Same as the model above, but it also tries to match brightness and color features.
This model has been discontinued by the developer

AVATAR (4GB+): non GAN, 256x256 face controlling model.
This model has been discontinued by the developer


AVATAR video example:

[Video: You are not allowed to view links. Register or Login to view.]

SAE (2GB+): Styled AutoEncoder that is similar to LIAEF but with a new face style loss. The SAE model is like a face morpher/stylizer instead to a direct swapper. Since this model is a face morpher, the results often produce unrecognizable results. The model can collapse on some scenes.

[Image: You are not allowed to view links. Register or Login to view.]
[Image: You are not allowed to view links. Register or Login to view.]
[Image: You are not allowed to view links. Register or Login to view.]

SAE model example of Cage-Trump:
[Video: You are not allowed to view links. Register or Login to view.]

General Overview of how DeepFaceLab Works:

Main Concept:

Taking the original dst face, aligning the predicted src face, and creating a masked area to swap or overlay the src face.

[Image: You are not allowed to view links. Register or Login to view.]

Convert Modes:

[Image: You are not allowed to view links. Register or Login to view.]

Convert Options:

Use predicted mask? (yes/no): (default = yes)

[Image: You are not allowed to view links. Register or Login to view.]

Erosion (-100 to +100): (default = 0)

A negative erosion number will essentially increase the area of the src face when converting onto the dst face. A positive number is "eroding" the src face, which reduces the are of the src face when converting onto the dst face.

[Image: You are not allowed to view links. Register or Login to view.]

Seamless Erosion (0 to 40): (default = 0)

Similar to the description above for erosion, but in seamless mode.

[Image: You are not allowed to view links. Register or Login to view.]

Blur (-200 to +200): (default = 0)

A negative blue will make the boarder of the cropped faceset more defined (a sharper line). This will make it look like you literally cut and pasted your src onto your dst face. Adding a positive blur will essentially blur or smooth the transition of the src face onto the dst face, making the boarder less noticeable. 

[Image: You are not allowed to view links. Register or Login to view.]

Hist-match threshold (0 to 255): (default = 255)


This option will only be available if you select the hist-match mode. The default threshold is 255 which can cause some highlights to be blown out. Modifying the histogram is essentially adjusting the darks and the lights. A higher threshold here will allow a wider dynamic range, often causing highlights to be blown (bright white). A lower threshold will crush the whites, dulling brightness.

[Image: You are not allowed to view links. Register or Login to view.]

Face Scale (-50 to +50): (default = 0)

A negative face scale number will shrink your src face proportionally towards the center of the dst face. Adding a positive face scale will enlarge your src face.

[Image: You are not allowed to view links. Register or Login to view.]

Transfer Color from DST image to Final Converted Face (yes/no): (default = no)

Stated no will keep the original color of your src faceset. Depending on where you got your src videos and images from to create your faceset, it may have different skin tones compared to the rest of the dst face color. Choosing yes will make the skin colors more similar, on the final converted images/video.

[Image: You are not allowed to view links. Register or Login to view.]

Degrade Color Power of Final Image: (default = 0)

Adding a positive number will cause the colors of the final converted image to be less "intense" usually making the video quality look more vintage and not as vibrant in colors.

[Image: You are not allowed to view links. Register or Login to view.]

Tips to creating a good DeepFake
  • Choose the correct model for your scene - Each model has it's advantages and disadvantages depending on the particular scene you're trying to make a deepfake with. Some models may work better with less powerful GPUs. See each model description above for recommended scenes, and vRAM suggestions.
  • Quality over quantity - Using a src faceset with quality images will give you better results. In general, try to keep only clear images with no obstructions of the src face unless it is a very odd angle that you do not have a lot of images of. Try to delete duplicates and blurry images.
  • Use less images if possible - The smaller amount of images you use for both src and dst while training, the faster the process is. Be sure to have enough images and facial expressions to cover the entire scene. Typically a src faceset of 1000-5000 is enough. Any more and you're likely adding training time without benefits. You can also work will <1000 photos as well, but results may vary.
  • Models with a narrow face are easier to deepfake compared to wider faces.
  • Generally, the longer the trained model, the better the results.

dpfks's Forum Info
Joined:
02-25-2018
Last Visit:
14 minutes ago
Total Posts:
495 (1.53 posts per day | 22.57 percent of total posts) Find All Posts
Total Threads:
129 (0.4 threads per day | 17.99 percent of total threads) Find All Threads
Time Spent Online:
1 Week, 3 Days
Thanks/Likes:
Given: 90 | Recieved: 99
Members Referred:
2
dpfks's Contact Details
Additional Info About dpfks
Sex:
Undisclosed