DeepFaceLab 1.0 - Usage tutorial (partially outdated)
This guide is partially outdated as it was written with DFL 1.0 in mind.
DFL 2.0 guide: https://mrdeepfakes.com/forums/thread-guide-deepfacelab-2-0-explained-and-tutorials-recommended
Most of the information in here is still valid but many options have different names and many models/features are no longer available.
Also all pretrained models (be it H128/DF/LIAE/SAE/old or new SAEHD) are not compatible anymore with the new version.
Old version of DFL will still be available but won't be supported.
What is DeepFaceLab?
DeepFaceLab is a tool/app utilizing machine learning to swap faces in videos.
DeepFaceLab is compatible with AMD, NVIDIA, IntelHD graphics and all OpenCL 1.2 compatibile video cards with at least 256M video memory.
NOTE: For better results an NVIDIA or AMD GPU with 2GB+ vRAM is recommended. The more memory available, the better quality the results.
The GitHub can be found here (contains newest version as well as all current updates): https://github.com/iperov/DeepFaceLab[/SIZE]
Stable releases:
(Choose the latest version based on date)
DeepFaceLab_CUDA - for GTX/RTX NVIDIA graphics cards
DeepFaceLab_OpenCL - for AMD/IntelHD graphics cards
DOWNLOAD HERE
If you get info about download quota exceeded, right click -> add to my drive then in your drive make a copy of it (right click -> copy) and download the copy.
NOTE: CUDA version requires CUDA Compute Compability version 3.5
CUDA Compute Capability list: Supported NVIDIA GPUs
Features:
DeepFaceLab consists of selection of .bat files used to run various models, extractions and conversions needed in the process of creating a deepfake, they are located in the main folder along with two subfolders:
1. Workspace cleanup/deletion:
1) Clear Workspace - self explanatory, it deletes all data like datasets, models and videos stored in "workspace" folder, it is recommended to delete it to prevent accidental deletion.
2. Frames extraction from source video (data_src.mp4)
2) Extract images from video data_src - cuts data_src.mp4 video file into individual frames and puts it into automatically created "data_src" folder, available options:
- FPS - skip for videos default frame rate, enter numerical value for other frame rate (for example entering 5 will only render the video as it was 5 frames per second, meaning less images will be extracted)
- JPG/PNG - choose the format of extracted frames, jpgs are smaller and generally good quality so they are recommended, pngs are large but may be preferred in certain situations
3.1. Video cutting
3.1) cut video (drop video on me) - allows to quickly cut the video to desired length by dropping it onto that .bat file. Useful if you don't have video editing software and want to quickly cut the video, options:
From time - start of the video
End time - end of the video
Audio track - leave at default
Bitrate - leave at default
3.2. Frames extraction from destination video (data_dst.mp4)
3.2) extract images from video data_dst FULL FPS - cuts data_dst.mp4 video file into individual frames and puts it into automatically created "data_dst" folder, available options:
- JPG/PNG - same as in 2).
4. Data_src preparation:
First stage of preparing source dataset is to align the landmarks and produce 256x256 face images from the extracted frames located inside "data_src" folder.
Automatic extraction methods:
- S3FD Extraction: More accurate with less false positives compared to MT extraction. Possibly slightly smoother. Slower. Recommended.
- MTCNN (MT) Extraction: Not available anymore/legacy
Left = S3FD
Right = MTNCC
Manual Extractor: This uses a preview GUI and is used to manually fix false positive/incorrectly aligned faces.
Options to choose from:
4) data_src extract faces MANUAL - manual extractions, only used when you have short data_dst.mp4 and want to align them all by hand.
4) data_src extract faces S3FD all GPU debug
4) data_src extract faces S3FD all GPU
4) data_src extract faces S3FD best GPU
There are also two extract unaligned faces .bat files and those for preparing datasets to be trained with AVATAR reenactment/puppet model.
4) data_src mark faces S3FD all GPU (avatar only)
4) data_src mark faces S3FD best GPU (avatar only)
all GPU means it will try to use all compatible GPUs, debug means it will automatically create an "aligned_debug" folder where you can check alignments by looking at landmarks imposed over faces. If you want to create that folder after you already aligned faces you can run: 4.2.other) data_src util add landmarks debug images
4.1 - 4.2.other Data_src cleanup:
After that is finished next step is to clean the dataset of false positives/incorrectly aligned faces, for a detailed info check this thread: https://mrdeepfakes.com/forums/thre...set-creation-how-to-create-celebrity-facesets
First you have:
4.1) data_src check result - opens up external app that allows to quickly go through the contents of data_src/aligned folder for false positives and incorrectly aligned source face images so you can delete them.
Then there are various sorting algorithms to help you find bad face images and delete them:
4.2.1) data_src sort by blur - sort by blur (contrast in the image)
4.2.2) data_src sort by similar histogram - sort by similar image, good for sorting individual people and bad images out.
4.2.4) data_src sort by dissimilar face - based on the landmarks
4.2.4) data_src sort by dissimilar histogram - same as by similar histogram except reversed order
4.2.5) data_src sort by face pitch - by pitch (face looking up/down)
4.2.5) data_src sort by face yaw - by yaw (face looking left/right)
4.2.6) data_src sort by best - (will update later)
4.2.other) data_src sort by black - if the face is cutoff, pure black bars will be visible, thats what this sorts by, more black bars at the end of the list
4.2.other) data_src sort by brightness - by brightness
4.2.other) data_src sort by hue - by hue/colors
4.2.other) data_src sort by one face in image - by images that originally had only one person in the frame, if you had more people in the frame then those will be at the end of the list
4.2.other) data_src sort by original filename - reverts to original order/filename
4.2.other) data_src sort by vggface - different and slower than "by similar histogram" sorting algorithm
4.2.other) data_src util recover original filename - reverts to original order/filename
4.2.other Further Data_src cleanup and check of alignments:
4.2.other) data_src util add landmarks debug images - creates "aligned_debug" folder inside "data_src" with landmarks of face which you can browse to find faces that may not be aligned properly despite looking fine when you just look at them inside "aligned" folder or when using 4.1) data_src check result
4.3 Data_src enhacements:
Faceset enhance - uses upscaling (similar to Gigapixel) to enhance source dataset for better quality, runs on GPU and CPU (CPU in OpenCL).
4.2.other) data_src util faceset enhance best GPU
4.2.other) data_src util faceset enhance multi GPU
Relight - adds artificial shadows on the faces to help the model train/learn shadows better if all your source material is frontally/uniformly lit
4.3) data_src add relighted faces - generates new faces with added shadows (you can specify it in the preview windows that opens up when you run it).
4.3) data_src delete relighted faces - deletes those new generated faces
FaceRelighter seems to be removed, at least for the time, will update later once I got info from iperov.
5. Data_dst preparation:
Here steps are pretty much the same as with source dataset, with few exceptions, let's start with face images alignment/landmarking process. Here we also have Manual, MT and S3FD extraction method, this time no + debug since "aligned_debug" folder is created always with data_dst processing, overall we have:
5) data_dst extract faces MANUAL
5) data_dst extract faces S3FD all GPU
5) data_dst extract faces S3FD best GPU
then there is "+ manual fix" variant that basically runs automatic alignment and after it is finished it opens up the preview where you can manually fix those landmarks/alignments it wasn't sure of.
5) data_dst extract faces S3FD all GPU + manual fix
5) data_dst extract faces S3FD best GPU + manual fix
There are also two extract unaligned faces .bat files and those similar to mark faces in src are for preparing datasets to be trained with AVATAR reenactment/puppet model.
5) data_dst extract unaligned faces S3FD all GPU (avatar only)
5) data_dst extract unaligned faces S3FD best GPU (avatar only)
5.1 - 5.3.other Data_dst cleanup:
After we aligned faces from data_dst frames we have to clean them up, similar to how we did it with source dataset we have a selection of sorting methods which I'm not going to explain as they work exactly the same as ones for src.
However cleaning up the destination dataset is different than source because we want to have all the faces aligned for all the frames where they are present.
That's what 5) data_dst extract faces MANUAL RE-EXTRACT DELETED RESULTS DEBUG and 5.1) data_dst check results debug are.
More detailed info is in the FAQ: https://mrdeepfakes.com/forums/thre...d-tips-for-making-deepfakes-using-deepfacelab
In short, run sorting by histogram to group faces, delete all false positives and faces of other people as well as all incorrectly aligned faces (basically any face that is rotated, very zoomed in/out or cut out). After that you may still have some faces missing that the extractor might have missed so you should use 5.1) data_dst check results debug to further search for bad alignments by looking at landmarks and also look for faces with missing landmarks, select them all and delete.
At the end run 5) data_dst extract faces MANUAL RE-EXTRACT DELETED RESULTS DEBUG which will scan "aligned_debug" for missing images and let you manually align/landmark them. At the end you can also run 5.1) data_dst check results to quickly look through data_dst/aligned folder to see if all faces look correctly aligned.
5.4 Data_dst enhacements:
Same as with source, you can use relight to generate shadows to help train shadows with frontal only/uniformly lit faces:
Relight - adds artificial shadows on the faces to help the model train/learn shadows better if all your source material is frontally/uniformly lit
4.3) data_src add relighted faces - generates new faces with added shadows (you can specify it in the preview windows that opens up when you run it).
4.3) data_src delete relighted faces - deletes those new generated faces
FaceRelighter seems to be removed, at least for the time, will update later once I got info from iperov.
5.other Advanced Mask Editor:
Allows you to manually edit mask of the data_dst aligned faces (so you can exclude parts of the face from training and also use this mask when converting final image to show the original face in that place).
Results of edited mask training + merging (conversion with dst mask):
It's a very tedious and time consuming process, instead if you want to get rid of obstructions in the deepfake you may want to give FANseg masks a go during merging/conversion.
FANseg conversion:
In the converter (or interactive converter which we recommend) you can select various mask modes like fan-prd, fan-dst, fan-prd * fan-dst, learned * fan-prd * fan-dst) which can be used to automatically mask out obstructions from faces (like glasses, hands that are covering/obstructing data_dst faces). These masks will then mask this parts out and show the original frame in that spot like in the image below:
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
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
H128 example: Asian face on blurry target
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
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
AVATAR (4GB+): non GAN, 256x256 face controlling model.
AVATAR video example:
[video=youtube]
SAE (2GB+): Styled AutoEncoder. Previous "superior" model, can run in half face and full face mode, can use DF and LIAE architecture + style powers (style transfer). It's still a good choice if you can't run much heavier but also improved SAEHD model. We also have an actively updated SAE+ mod for it that adds some features of SAEHD to it such as TrueFace, Random Warp, lr_dropout and more.
SAE example: Nicholas Cage on Trump
SAE example: Asian kpop star
SAE example: Alexei Navalny
SAE example: Nicholas Cage in obstructed magneto helmet
SAE model example of Cage-Trump:
[video=youtube]
SAEHD (6GB+): High Definition Styled AutoEncoder - new and improved version of SAE, it's much more heavy to run than SAE but provides even better quality.
New features include: new encoder that produces more stable face and less jitter, new decoder that produces cleaner subpixel results, pixel loss and dssim loss are merged together to achieve both training speed and pixel trueness, by default networks are initialized with CA weights, new neural network optimizer consumes less VRAM, encoder and decoder dims are merged to one parameter encoder/decoder dims, contains new mid-full face mode which covers 30% more area than half face, other notable new features are: true face, random warp, lr_dropout and more color transfer modes during training (rct, lct, mkl, idt, sot).
SAEHD example:
[video=youtube]
Example of the preview trained on RTX2080TI, 128 resolution, 512-21 dims, 8 batch size, 700ms per iteration.
- without trueface:
- with trueface:
GUIDE IS BEING FIXED/UPDATED, FROM HERE IT'S THE OLD ONE TILL THE END. EXPECT UPDATES SOON.
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.
[img=739x200]
[size=medium]Convert Modes:
[img=776x600]https://i.imgur.com/9Y9g9th.jpg[/img][/SIZE]
Convert Options:
Use predicted mask? (yes/no): (default = yes)
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.
Seamless Erosion (0 to 40): (default = 0)
Similar to the description above for erosion, but in seamless mode.
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.
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.
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.
Transfer Color from predicted face? (LCT/RCT/no): (default = no)
Selecting 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 LCT or RCT method to transfer color may make skin tones more similar and realistic.
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.
Tips to creating a good DeepFake
This guide is partially outdated as it was written with DFL 1.0 in mind.
DFL 2.0 guide: https://mrdeepfakes.com/forums/thread-guide-deepfacelab-2-0-explained-and-tutorials-recommended
Most of the information in here is still valid but many options have different names and many models/features are no longer available.
Also all pretrained models (be it H128/DF/LIAE/SAE/old or new SAEHD) are not compatible anymore with the new version.
Old version of DFL will still be available but won't be supported.
What is DeepFaceLab?
DeepFaceLab is a tool/app utilizing machine learning to swap faces in videos.
DeepFaceLab is compatible with AMD, NVIDIA, IntelHD graphics and all OpenCL 1.2 compatibile video cards with at least 256M video memory.
NOTE: For better results an NVIDIA or AMD GPU with 2GB+ vRAM is recommended. The more memory available, the better quality the results.
The GitHub can be found here (contains newest version as well as all current updates): https://github.com/iperov/DeepFaceLab[/SIZE]
Stable releases:
(Choose the latest version based on date)
DeepFaceLab_CUDA - for GTX/RTX NVIDIA graphics cards
DeepFaceLab_OpenCL - for AMD/IntelHD graphics cards
DOWNLOAD HERE
If you get info about download quota exceeded, right click -> add to my drive then in your drive make a copy of it (right click -> copy) and download the copy.
NOTE: CUDA version requires CUDA Compute Compability version 3.5
CUDA Compute Capability list: Supported NVIDIA GPUs
Features:
- Available as standalone app with zero dependencies for all windows versions.
- Includes various models (H64, H128, DF, LIAEF128, SAE, SAEHD, AVATAR).
- Easy to use.
- Works on 2GB old cards, such as GT730. Example of a deepfake trained on a 2GB gtx850m notebook in 18 hours:
[*][size=small]Face landmark/position data embedded in face image files, no separate landmark file. - Automatical choice of the best GPU.
- Training preview window.
- Interactive converter.
- Debug (face landmark preview) option for source and destination (data_src/dst) datasets.
- Automatic face extraction utilizing S3FD and manual extraction.
- Training at any resolution in increments of 16. Possibility of training models at resolutions up to 256 thanks to optimization settings (optimizer mode)
DeepFaceLab consists of selection of .bat files used to run various models, extractions and conversions needed in the process of creating a deepfake, they are located in the main folder along with two subfolders:
- _internal (that's where all the models/converters and other files necessary to for DFLs operation are)
- workspace (this is where your models, videos, datasets and final deepfake outputs are)
1. Workspace cleanup/deletion:
1) Clear Workspace - self explanatory, it deletes all data like datasets, models and videos stored in "workspace" folder, it is recommended to delete it to prevent accidental deletion.
2. Frames extraction from source video (data_src.mp4)
2) Extract images from video data_src - cuts data_src.mp4 video file into individual frames and puts it into automatically created "data_src" folder, available options:
- FPS - skip for videos default frame rate, enter numerical value for other frame rate (for example entering 5 will only render the video as it was 5 frames per second, meaning less images will be extracted)
- JPG/PNG - choose the format of extracted frames, jpgs are smaller and generally good quality so they are recommended, pngs are large but may be preferred in certain situations
3.1. Video cutting
3.1) cut video (drop video on me) - allows to quickly cut the video to desired length by dropping it onto that .bat file. Useful if you don't have video editing software and want to quickly cut the video, options:
From time - start of the video
End time - end of the video
Audio track - leave at default
Bitrate - leave at default
3.2. Frames extraction from destination video (data_dst.mp4)
3.2) extract images from video data_dst FULL FPS - cuts data_dst.mp4 video file into individual frames and puts it into automatically created "data_dst" folder, available options:
- JPG/PNG - same as in 2).
4. Data_src preparation:
First stage of preparing source dataset is to align the landmarks and produce 256x256 face images from the extracted frames located inside "data_src" folder.
Automatic extraction methods:
- S3FD Extraction: More accurate with less false positives compared to MT extraction. Possibly slightly smoother. Slower. Recommended.
- MTCNN (MT) Extraction: Not available anymore/legacy
Left = S3FD
Right = MTNCC
Manual Extractor: This uses a preview GUI and is used to manually fix false positive/incorrectly aligned faces.
Options to choose from:
4) data_src extract faces MANUAL - manual extractions, only used when you have short data_dst.mp4 and want to align them all by hand.
4) data_src extract faces S3FD all GPU debug
4) data_src extract faces S3FD all GPU
4) data_src extract faces S3FD best GPU
There are also two extract unaligned faces .bat files and those for preparing datasets to be trained with AVATAR reenactment/puppet model.
4) data_src mark faces S3FD all GPU (avatar only)
4) data_src mark faces S3FD best GPU (avatar only)
all GPU means it will try to use all compatible GPUs, debug means it will automatically create an "aligned_debug" folder where you can check alignments by looking at landmarks imposed over faces. If you want to create that folder after you already aligned faces you can run: 4.2.other) data_src util add landmarks debug images
4.1 - 4.2.other Data_src cleanup:
After that is finished next step is to clean the dataset of false positives/incorrectly aligned faces, for a detailed info check this thread: https://mrdeepfakes.com/forums/thre...set-creation-how-to-create-celebrity-facesets
First you have:
4.1) data_src check result - opens up external app that allows to quickly go through the contents of data_src/aligned folder for false positives and incorrectly aligned source face images so you can delete them.
Then there are various sorting algorithms to help you find bad face images and delete them:
4.2.1) data_src sort by blur - sort by blur (contrast in the image)
4.2.2) data_src sort by similar histogram - sort by similar image, good for sorting individual people and bad images out.
4.2.4) data_src sort by dissimilar face - based on the landmarks
4.2.4) data_src sort by dissimilar histogram - same as by similar histogram except reversed order
4.2.5) data_src sort by face pitch - by pitch (face looking up/down)
4.2.5) data_src sort by face yaw - by yaw (face looking left/right)
4.2.6) data_src sort by best - (will update later)
4.2.other) data_src sort by black - if the face is cutoff, pure black bars will be visible, thats what this sorts by, more black bars at the end of the list
4.2.other) data_src sort by brightness - by brightness
4.2.other) data_src sort by hue - by hue/colors
4.2.other) data_src sort by one face in image - by images that originally had only one person in the frame, if you had more people in the frame then those will be at the end of the list
4.2.other) data_src sort by original filename - reverts to original order/filename
4.2.other) data_src sort by vggface - different and slower than "by similar histogram" sorting algorithm
4.2.other) data_src util recover original filename - reverts to original order/filename
4.2.other Further Data_src cleanup and check of alignments:
4.2.other) data_src util add landmarks debug images - creates "aligned_debug" folder inside "data_src" with landmarks of face which you can browse to find faces that may not be aligned properly despite looking fine when you just look at them inside "aligned" folder or when using 4.1) data_src check result
4.3 Data_src enhacements:
Faceset enhance - uses upscaling (similar to Gigapixel) to enhance source dataset for better quality, runs on GPU and CPU (CPU in OpenCL).
4.2.other) data_src util faceset enhance best GPU
4.2.other) data_src util faceset enhance multi GPU
FaceRelighter seems to be removed, at least for the time, will update later once I got info from iperov.
5. Data_dst preparation:
Here steps are pretty much the same as with source dataset, with few exceptions, let's start with face images alignment/landmarking process. Here we also have Manual, MT and S3FD extraction method, this time no + debug since "aligned_debug" folder is created always with data_dst processing, overall we have:
5) data_dst extract faces MANUAL
5) data_dst extract faces S3FD all GPU
5) data_dst extract faces S3FD best GPU
then there is "+ manual fix" variant that basically runs automatic alignment and after it is finished it opens up the preview where you can manually fix those landmarks/alignments it wasn't sure of.
5) data_dst extract faces S3FD all GPU + manual fix
5) data_dst extract faces S3FD best GPU + manual fix
There are also two extract unaligned faces .bat files and those similar to mark faces in src are for preparing datasets to be trained with AVATAR reenactment/puppet model.
5) data_dst extract unaligned faces S3FD all GPU (avatar only)
5) data_dst extract unaligned faces S3FD best GPU (avatar only)
5.1 - 5.3.other Data_dst cleanup:
After we aligned faces from data_dst frames we have to clean them up, similar to how we did it with source dataset we have a selection of sorting methods which I'm not going to explain as they work exactly the same as ones for src.
However cleaning up the destination dataset is different than source because we want to have all the faces aligned for all the frames where they are present.
That's what 5) data_dst extract faces MANUAL RE-EXTRACT DELETED RESULTS DEBUG and 5.1) data_dst check results debug are.
More detailed info is in the FAQ: https://mrdeepfakes.com/forums/thre...d-tips-for-making-deepfakes-using-deepfacelab
In short, run sorting by histogram to group faces, delete all false positives and faces of other people as well as all incorrectly aligned faces (basically any face that is rotated, very zoomed in/out or cut out). After that you may still have some faces missing that the extractor might have missed so you should use 5.1) data_dst check results debug to further search for bad alignments by looking at landmarks and also look for faces with missing landmarks, select them all and delete.
At the end run 5) data_dst extract faces MANUAL RE-EXTRACT DELETED RESULTS DEBUG which will scan "aligned_debug" for missing images and let you manually align/landmark them. At the end you can also run 5.1) data_dst check results to quickly look through data_dst/aligned folder to see if all faces look correctly aligned.
5.4 Data_dst enhacements:
FaceRelighter seems to be removed, at least for the time, will update later once I got info from iperov.
5.other Advanced Mask Editor:
Allows you to manually edit mask of the data_dst aligned faces (so you can exclude parts of the face from training and also use this mask when converting final image to show the original face in that place).
Results of edited mask training + merging (conversion with dst mask):
It's a very tedious and time consuming process, instead if you want to get rid of obstructions in the deepfake you may want to give FANseg masks a go during merging/conversion.
FANseg conversion:
In the converter (or interactive converter which we recommend) you can select various mask modes like fan-prd, fan-dst, fan-prd * fan-dst, learned * fan-prd * fan-dst) which can be used to automatically mask out obstructions from faces (like glasses, hands that are covering/obstructing data_dst faces). These masks will then mask this parts out and show the original frame in that spot like in the image below:
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
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
H128 example: Asian face on blurry target
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
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
AVATAR (4GB+): non GAN, 256x256 face controlling model.
AVATAR video example:
[video=youtube]
SAE (2GB+): Styled AutoEncoder. Previous "superior" model, can run in half face and full face mode, can use DF and LIAE architecture + style powers (style transfer). It's still a good choice if you can't run much heavier but also improved SAEHD model. We also have an actively updated SAE+ mod for it that adds some features of SAEHD to it such as TrueFace, Random Warp, lr_dropout and more.
SAE example: Nicholas Cage on Trump
SAE example: Asian kpop star
SAE example: Alexei Navalny
SAE example: Nicholas Cage in obstructed magneto helmet
SAE model example of Cage-Trump:
[video=youtube]
SAEHD (6GB+): High Definition Styled AutoEncoder - new and improved version of SAE, it's much more heavy to run than SAE but provides even better quality.
New features include: new encoder that produces more stable face and less jitter, new decoder that produces cleaner subpixel results, pixel loss and dssim loss are merged together to achieve both training speed and pixel trueness, by default networks are initialized with CA weights, new neural network optimizer consumes less VRAM, encoder and decoder dims are merged to one parameter encoder/decoder dims, contains new mid-full face mode which covers 30% more area than half face, other notable new features are: true face, random warp, lr_dropout and more color transfer modes during training (rct, lct, mkl, idt, sot).
SAEHD example:
[video=youtube]
Example of the preview trained on RTX2080TI, 128 resolution, 512-21 dims, 8 batch size, 700ms per iteration.
- without trueface:
- with trueface:
GUIDE IS BEING FIXED/UPDATED, FROM HERE IT'S THE OLD ONE TILL THE END. EXPECT UPDATES SOON.
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.
[img=739x200]
[size=medium]Convert Modes:
[img=776x600]https://i.imgur.com/9Y9g9th.jpg[/img][/SIZE]
Convert Options:
Use predicted mask? (yes/no): (default = yes)
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.
Seamless Erosion (0 to 40): (default = 0)
Similar to the description above for erosion, but in seamless mode.
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.
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.
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.
Transfer Color from predicted face? (LCT/RCT/no): (default = no)
Selecting 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 LCT or RCT method to transfer color may make skin tones more similar and realistic.
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.
Tips to creating a good DeepFake
- A narrow src face is better for deepfakes compared to a wide face.
- 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. See descriptions above in the model section for a quick explanation.
- 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.
- Generally, the longer the trained model, the better the results.
Code:
== 26.12.2019 ==
fixed mask editor
added FacesetEnhancer
4.2.other) data_src util faceset enhance best GPU.bat
4.2.other) data_src util faceset enhance multi GPU.bat
FacesetEnhancer greatly increases details in your source face set,
same as Gigapixel enhancer, but in fully automatic mode.
In OpenCL build works on CPU only.
Please consider a donation.
== 23.12.2019 ==
Extractor: 2nd pass now faster on frames where faces are not found
all models: removed options 'src_scale_mod', and 'sort samples by yaw as target'
If you want, you can manually remove unnecessary angles from src faceset after sort by yaw.
Optimized sample generators (CPU workers). Now they consume less amount of RAM and work faster.
added
4.2.other) data_src/dst util faceset pack.bat
Packs /aligned/ samples into one /aligned/samples.pak file.
After that, all faces will be deleted.
4.2.other) data_src/dst util faceset unpack.bat
unpacks faces from /aligned/samples.pak to /aligned/ dir.
After that, samples.pak will be deleted.
Packed faceset load and work faster.
== 20.12.2019 ==
fix 3rd pass of extractor for some systems
More stable and precise version of the face transformation matrix
SAEHD: lr_dropout now as an option, and disabled by default
When the face is trained enough, you can enable this option to get extra sharpness for less amount of iterations
added
4.2.other) data_src util faceset metadata save.bat
saves metadata of data_src\aligned\ faces into data_src\aligned\meta.dat
4.2.other) data_src util faceset metadata restore.bat
restore metadata from 'meta.dat' to images
if image size different from original, then it will be automatically resized
You can greatly enhance face details of src faceset by using Topaz Gigapixel software.
example before/after https://i.imgur.com/Gwee99L.jpg
Download it from torrent https://rutracker.org/forum/viewtopic.php?t=5757118
Example of workflow:
1) run 'data_src util faceset metadata save.bat'
2) launch Topaz Gigapixel
3) open 'data_src\aligned\' and select all images
4) set output folder to 'data_src\aligned_topaz' (create folder in save dialog)
5) set settings as on screenshot https://i.imgur.com/kAVWMQG.jpg
you can choose 2x, 4x, or 6x upscale rate
6) start process images and wait full process
7) rename folders:
data_src\aligned -> data_src\aligned_original
data_src\aligned_topaz -> data_src\aligned
8) copy 'data_src\aligned_original\meta.dat' to 'data_src\aligned\'
9) run 'data_src util faceset metadata restore.bat'
images will be downscaled back to original size (256x256) preserving details
metadata will be restored
10) now your new enhanced faceset is ready to use !
== 15.12.2019 ==
SAEHD,Quick96:
improved model generalization, overall accuracy and sharpness
by using new 'Learning rate dropout' technique from the paper https://arxiv.org/abs/1912.00144
An example of a loss histogram where this function is enabled after the red arrow:
https://i.imgur.com/3olskOd.jpg
== 12.12.2019 ==
removed FacesetRelighter due to low quality of the result
added sort by absdiff
This is sort method by absolute per pixel difference between all faces.
options:
Sort by similar? ( y/n ?:help skip:y ) :
if you choose 'n', then most dissimilar faces will be placed first.
'sort by final' renamed to 'sort by best'
OpenCL: fix extractor for some amd cards
== 14.11.2019 ==
Converter: added new color transfer mode: mix-m
== 13.11.2019 ==
SAE,SAEHD,Converter:
added sot-m color transfer
Converter:
removed seamless2 mode
FacesetRelighter:
Added intensity parameter to the manual picker.
'One random direction' and 'predefined 7 directions' use random intensity from 0.3 to 0.6.
== 12.11.2019 ==
FacesetRelighter fixes and improvements:
now you have 3 ways:
1) define light directions manually (not for google colab)
watch demo https://youtu.be/79xz7yEO5Jw
2) relight faceset with one random direction
3) relight faceset with predefined 7 directions
== 11.11.2019 ==
added FacesetRelighter:
Synthesize new faces from existing ones by relighting them using DeepPortraitRelighter network.
With the relighted faces neural network will better reproduce face shadows.
Therefore you can synthsize shadowed faces from fully lit faceset.
https://i.imgur.com/wxcmQoi.jpg
as a result, better fakes on dark faces:
https://i.imgur.com/5xXIbz5.jpg
operate via
data_x add relighted faces.bat
data_x delete relighted faces.bat
in OpenCL build Relighter runs on CPU
== 09.11.2019 ==
extractor: removed "increased speed of S3FD" for compatibility reasons
converter:
fixed crashes
removed useless 'ebs' color transfer
changed keys for color degrade
added image degrade via denoise - same as denoise extracted data_dst.bat ,
but you can control this option directly in the interactive converter
added image degrade via bicubic downscale/upscale
SAEHD:
default ae_dims for df now 256. It is safe to train SAEHD on 256 ae_dims and higher resolution.
Example of recent fake: https://youtu.be/_lxOGLj-MC8
added Quick96 model.
This is the fastest model for low-end 2GB+ NVidia and 4GB+ AMD cards.
Model has zero options and trains a 96pix fullface.
It is good for quick deepfake demo.
Example of the preview trained in 15 minutes on RTX2080Ti:
https://i.imgur.com/oRMvZFP.jpg
== 27.10.2019 ==
Extractor: fix for AMD cards
== 26.10.2019 ==
red square of face alignment now contains the arrow that shows the up direction of an image
fix alignment of side faces
Before https://i.imgur.com/pEoZ6Mu.mp4
after https://i.imgur.com/wO2Guo7.mp4
fix message when no training data provided
== 23.10.2019 ==
enhanced sort by final: now faces are evenly distributed not only in the direction of yaw,
but also in pitch
added 'sort by vggface': sorting by face similarity using VGGFace model.
Requires 4GB+ VRAM and internet connection for the first run.
== 19.10.2019 ==
fix extractor bug for 11GB+ cards
== 15.10.2019 ==
removed fix "fixed bug when the same face could be detected twice"
SAE/SAEHD:
removed option 'apply random ct'
added option
Color transfer mode apply to src faceset. ( none/rct/lct/mkl/idt, ?:help skip: none )
Change color distribution of src samples close to dst samples. Try all modes to find the best.
before was lct mode, but sometime it does not work properly for some facesets.
== 14.10.2019 ==
fixed bug when the same face could be detected twice
Extractor now produces a less shaked face. but second pass is now slower by 25%
before/after: https://imgur.com/L77puLH
SAE, SAEHD: 'random flip' and 'learn mask' options now can be overridden.
It is recommended to start training for first 20k iters always with 'learn_mask'
SAEHD: added option Enable random warp of samples, default is on
Random warp is required to generalize facial expressions of both faces.
When the face is trained enough, you can disable it to get extra sharpness for less amount of iterations.
== 10.10.2019 ==
fixed wrong NVIDIA GPU detection in extraction and training processes
increased speed of S3FD 1st pass extraction for GPU with >= 11GB vram.
== 09.10.2019 ==
fixed wrong NVIDIA GPU indexes in a systems with two or more GPU
fixed wrong NVIDIA GPU detection on the laptops
removed TrueFace model.
added SAEHD model ( High Definition Styled AutoEncoder )
Compare with SAE: https://i.imgur.com/3QJAHj7.jpg
This is a new heavyweight model for high-end cards to achieve maximum possible deepfake quality in 2020.
Differences from SAE:
+ new encoder produces more stable face and less scale jitter
+ new decoder produces subpixel clear result
+ pixel loss and dssim loss are merged together to achieve both training speed and pixel trueness
+ by default networks will be initialized with CA weights, but only after first successful iteration
therefore you can test network size and batch size before weights initialization process
+ new neural network optimizer consumes less VRAM than before
+ added option <Enable 'true face' training>
The result face will be more like src and will get extra sharpness.
Enable it for last 30k iterations before conversion.
+ encoder and decoder dims are merged to one parameter encoder/decoder dims
+ added mid-full face, which covers 30% more area than half face.
example of the preview trained on RTX2080TI, 128 resolution, 512-21 dims, 8 batch size, 700ms per iteration:
without trueface : https://i.imgur.com/MPPKWil.jpg
with trueface +23k iters : https://i.imgur.com/dV5Ofo9.jpg
== 24.09.2019 ==
fix TrueFace model, required retraining
== 21.09.2019 ==
fix avatar model
== 19.09.2019 ==
SAE : WARNING, RETRAIN IS REQUIRED !
fixed model sizes from previous update.
avoided bug in ML framework(keras) that forces to train the model on random noise.
Converter: added blur on the same keys as sharpness
Added new model 'TrueFace'. Only for NVIDIA cards.
This is a GAN model ported from https://github.com/NVlabs/FUNIT
Model produces near zero morphing and high detail face.
Model has higher failure rate than other models.
It does not learn the mask, so fan-x mask modes should be used in the converter.
Keep src and dst faceset in same lighting conditions.
== 13.09.2019 ==
Converter: added new color transfer modes: mkl, mkl-m, idt, idt-m
SAE: removed multiscale decoder, because it's not effective
== 07.09.2019 ==
Extractor: fixed bug with grayscale images.
Converter:
Session is now saved to the model folder.
blur and erode ranges are increased to -400+400
hist-match-bw is now replaced with seamless2 mode.
Added 'ebs' color transfer mode (works only on Windows).
FANSEG model (used in FAN-x mask modes) is retrained with new model configuration
and now produces better precision and less jitter
== 30.08.2019 ==
interactive converter now saves the session.
if input frames are changed (amount or filenames)
then interactive converter automatically starts a new session.
if model is more trained then all frames will be recomputed again with their saved configs.
== 28.08.2019 ==
removed landmarks of lips which are used in face aligning
result is less scale jittering
before https://i.imgur.com/gJaW5Y4.gifv
after https://i.imgur.com/Vq7gvhY.gifv
converter: fixed merged\ filenames, now they are 100% same as input from data_dst\
converted to X.bat : now properly eats any filenames from merged\ dir as input
== 27.08.2019 ==
fixed converter navigation logic and output filenames in merge folder
added EbSynth program. It is located in _internal\EbSynth\ folder
Start it via 10) EbSynth.bat
It starts with sample project loaded from _internal\EbSynth\SampleProject
EbSynth is mainly used to create painted video, but with EbSynth you can fix some weird frames produced by deepfake process.
before: https://i.imgur.com/9xnLAL4.gifv
after: https://i.imgur.com/f0Lbiwf.gifv
official tutorial for EbSynth : https://www.youtube.com/watch?v=0RLtHuu5jV4
== 26.08.2019 ==
updated pdf manuals for AVATAR model.
Avatar converter: added super resolution option.
All converters:
fixes and optimizations
super resolution DCSCN network is now replaced by RankSRGAN
added new option sharpen_mode and sharpen_amount
== 25.08.2019 ==
Converter: FAN-dst mask mode now works for half face models.
AVATAR Model: default avatar_type option on first startup is now HEAD.
Head produces much more stable result than source.
updated usage of AVATAR model:
Usage:
1) place data_src.mp4 10-20min square resolution video of news reporter sitting at the table with static background,
other faces should not appear in frames.
2) process "extract images from video data_src.bat" with FULL fps
3) place data_dst.mp4 square resolution video of face who will control the src face
4) process "extract images from video data_dst FULL FPS.bat"
5) process "data_src mark faces S3FD best GPU.bat"
6) process "data_dst extract unaligned faces S3FD best GPU.bat"
7) train AVATAR.bat stage 1, tune batch size to maximum for your card (32 for 6GB), train to 50k+ iters.
8) train AVATAR.bat stage 2, tune batch size to maximum for your card (4 for 6GB), train to decent sharpness.
9) convert AVATAR.bat
10) converted to mp4.bat
== 24.08.2019 ==
Added interactive converter.
With interactive converter you can change any parameter of any frame and see the result in real time.
Converter: added motion_blur_power param.
Motion blur is applied by precomputed motion vectors.
So the moving face will look more realistic.
RecycleGAN model is removed.
Added experimental AVATAR model. Minimum required VRAM is 6GB for NVIDIA and 12GB for AMD.
== 16.08.2019 ==
fixed error "Failed to get convolution algorithm" on some systems
fixed error "dll load failed" on some systems
model summary is now better formatted
Expanded eyebrows line of face masks. It does not affect mask of FAN-x converter mode.
ConverterMasked: added mask gradient of bottom area, same as side gradient
== 23.07.2019 ==
OpenCL : update versions of internal libraries
== 20.06.2019 ==
Trainer: added option for all models
Enable autobackup? (y/n ?:help skip:%s) :
Autobackup model files with preview every hour for last 15 hours. Latest backup located in model/<>_autobackups/01
SAE: added option only for CUDA builds:
Enable gradient clipping? (y/n, ?:help skip:%s) :
Gradient clipping reduces chance of model collapse, sacrificing speed of training.
== 02.06.2019 ==
fix error on typing uppercase values
== 24.05.2019 ==
OpenCL : fix FAN-x converter
== 20.05.2019 ==
OpenCL : fixed bug when analysing ops was repeated after each save of the model
== 10.05.2019 ==
fixed work of model pretraining
== 08.05.2019 ==
SAE: added new option
Apply random color transfer to src faceset? (y/n, ?:help skip:%s) :
Increase variativity of src samples by apply LCT color transfer from random dst samples.
It is like 'face_style' learning, but more precise color transfer and without risk of model collapse,
also it does not require additional GPU resources, but the training time may be longer, due to the src faceset is becoming more diverse.
== 05.05.2019 ==
OpenCL: SAE model now works properly
== 05.03.2019 ==
fixes
SAE: additional info in help for options:
Use pixel loss - Enabling this option too early increases the chance of model collapse.
Face style power - Enabling this option increases the chance of model collapse.
Background style power - Enabling this option increases the chance of model collapse.
== 05.01.2019 ==
SAE: added option 'Pretrain the model?'
Pretrain the model with large amount of various faces.
This technique may help to train the fake with overly different face shapes and light conditions of src/dst data.
Face will be look more like a morphed. To reduce the morph effect,
some model files will be initialized but not be updated after pretrain: LIAE: inter_AB.h5 DF: encoder.h5.
The longer you pretrain the model the more morphed face will look. After that, save and run the training again.
== 04.28.2019 ==
fix 3rd pass extractor hang on AMD 8+ core processors
Converter: fixed error with degrade color after applying 'lct' color transfer
added option at first run for all models: Choose image for the preview history? (y/n skip:n)
Controls: [p] - next, [enter] - confirm.
fixed error with option sort by yaw. Remember, do not use sort by yaw if the dst face has hair that covers the jaw.
== 04.24.2019 ==
SAE: finally the collapses were fixed
added option 'Use CA weights? (y/n, ?:help skip: %s ) :
Initialize network with 'Convolution Aware' weights from paper https://arxiv.org/abs/1702.06295.
This may help to achieve a higher accuracy model, but consumes a time at first run.
== 04.23.2019 ==
SAE: training should be restarted
remove option 'Remove gray border' because it makes the model very resource intensive.
== 04.21.2019 ==
SAE:
fix multiscale decoder.
training with liae archi should be restarted
changed help for 'sort by yaw' option:
NN will not learn src face directions that don't match dst face directions. Do not use if the dst face has hair that covers the jaw.
== 04.20.2019 ==
fixed work with NVIDIA cards in TCC mode
Converter: improved FAN-x masking mode.
Now it excludes face obstructions such as hair, fingers, glasses, microphones, etc.
example https://i.imgur.com/x4qroPp.gifv
It works only for full face models, because there were glitches in half face version.
Fanseg is trained by using manually refined by MaskEditor >3000 various faces with obstructions.
Accuracy of fanseg to handle complex obstructions can be improved by adding more samples to dataset, but I have no time for that :(
Dataset is located in the official mega.nz folder.
If your fake has some complex obstructions that incorrectly recognized by fanseg,
you can add manually masked samples from your fake to the dataset
and retrain it by using --model DEV_FANSEG argument in bat file. Read more info in dataset archive.
Minimum recommended VRAM is 6GB and batch size 24 to train fanseg.
Result model\FANSeg_256_full_face.h5 should be placed to DeepFacelab\facelib\ folder
Google Colab now works on Tesla T4 16GB.
With Google Colaboratory you can freely train your model for 12 hours per session, then reset session and continue with last save.
more info how to work with Colab: https://github.com/chervonij/DFL-Colab
== 04.07.2019 ==
Extractor: added warning if aligned folder contains files that will be deleted.
Converter subprocesses limited to maximum 6
== 04.06.2019 ==
added experimental mask editor.
It is created to improve FANSeg model, but you can try to use it in fakes.
But remember: it does not guarantee quality improvement.
usage:
run 5.4) data_dst mask editor.bat
edit the mask of dst faces with obstructions
train SAE either with 'learn mask' or with 'style values'
Screenshot of mask editor: https://i.imgur.com/SaVpxVn.jpg
result of training and merging using edited mask: https://i.imgur.com/QJi9Myd.jpg
Complex masks are harder to train.
SAE:
previous SAE model will not work with this update.
Greatly decreased chance of model collapse.
Increased model accuracy.
Residual blocks now default and this option has been removed.
Improved 'learn mask'.
Added masked preview (switch by space key)
Converter:
fixed rct/lct in seamless mode
added mask mode (6) learned*FAN-prd*FAN-dst
changed help message for pixel loss:
Pixel loss may help to enhance fine details and stabilize face color. Use it only if quality does not improve over time.
fixed ctrl-c exit in no-preview mode
== 03.31.2019 ==
Converter: fix blur region of seamless.
== 03.30.2019 ==
fixed seamless face jitter
removed options Suppress seamless jitter, seamless erode mask modifier.
seamlessed face now properly uses blur modifier
added option 'FAN-prd&dst' - using multiplied FAN prd and dst mask,
== 03.29.2019 ==
Converter: refactorings and optimizations
added new option
Apply super resolution? (y/n skip:n) : Enhance details by applying DCSCN network.
before/after gif - https://i.imgur.com/jJA71Vy.gif
== 03.26.2019 ==
SAE: removed lightweight encoder.
optimizer mode now can be overriden each run
Trainer: the loss line now shows the average loss values after saving
Converter: fixed bug with copying files without faces.
XNViewMP : updated version
fixed cut video.bat for paths with spaces
== 03.24.2019 ==
old SAE model will not work with this update.
Fixed bug when SAE can be collapsed during a time.
SAE: removed CA weights and encoder/decoder dims.
added new options:
Encoder dims per channel (21-85 ?:help skip:%d)
More encoder dims help to recognize more facial features, but require more VRAM. You can fine-tune model size to fit your GPU.
Decoder dims per channel (11-85 ?:help skip:%d)
More decoder dims help to get better details, but require more VRAM. You can fine-tune model size to fit your GPU.
Add residual blocks to decoder? (y/n, ?:help skip:n) :
These blocks help to get better details, but require more computing time.
Remove gray border? (y/n, ?:help skip:n) :
Removes gray border of predicted face, but requires more computing resources.
Extract images from video: added option
Output image format? ( jpg png ?:help skip:png ) :
PNG is lossless, but produces images with size x10 larger than JPG.
JPG extraction is faster, especially on HDD instead of SSD.
== 03.21.2019 ==
OpenCL build: fixed, now works on most video cards again.
old SAE model will not work with this update.
Fixed bug when SAE can be collapsed during a time
Added option
Use CA weights? (y/n, ?:help skip: n ) :
Initialize network with 'Convolution Aware' weights.
This may help to achieve a higher accuracy model, but consumes time at first run.
Extractor:
removed DLIB extractor
greatly increased accuracy of landmarks extraction, especially with S3FD detector, but speed of 2nd pass now slower.
From this point on, it is recommended to use only the S3FD detector.
before https://i.imgur.com/SPGeJCm.gif
after https://i.imgur.com/VmmAm8p.gif
Converter: added new option to choose type of mask for full-face models.
Mask mode: (1) learned, (2) dst, (3) FAN-prd, (4) FAN-dst (?) help. Default - 1 :
Learned – Learned mask, if you choose option 'Learn mask' in model. The contours are fairly smooth, but can be wobbly.
Dst – raw mask from dst face, wobbly contours.
FAN-prd – mask from pretrained FAN model from predicted face. Very smooth not shaky countours.
FAN-dst – mask from pretrained FAN model from dst face. Very smooth not shaky countours.
Advantages of FAN mask: you can get a not wobbly shaky without learning it by model.
Disadvantage of FAN mask: may produce artifacts on the contours if the face is obstructed.
== 03.13.2019 ==
SAE: added new option
Optimizer mode? ( 1,2,3 ?:help skip:1) :
this option only for NVIDIA cards. Optimizer mode of neural network.
1 - default.
2 - allows you to train x2 bigger network, uses a lot of RAM.
3 - allows you to train x3 bigger network, uses huge amount of RAM and 30% slower.
Epoch term renamed to iteration term.
added showing timestamp in string of training in console
== 03.11.2019 ==
CUDA10.1AVX users - update your video drivers from geforce.com site
face extractor:
added new extractor S3FD - more precise, produces less false-positive faces, accelerated by AMD/IntelHD GPU (while MT is not)
speed of 1st pass with DLIB significantly increased
decreased amount of false-positive faces for all extractors
manual extractor: added 'h' button to hide the help information
fix DFL conflict with system python installation
removed unwanted tensorflow info from console log
updated manual_ru
== 03.07.2019 ==
fixes
upgrade to python 3.6.8
Reorganized structure of DFL folder. Removed unnecessary files and other trash.
Current available builds now:
DeepFaceLabCUDA9.2SSE - for NVIDIA cards up to GTX10x0 series and any 64-bit CPU
DeepFaceLabCUDA10.1AVX - for NVIDIA cards up to RTX and CPU with AVX instructions support
DeepFaceLabOpenCLSSE - for AMD/IntelHD cards and any 64-bit CPU
== 03.04.2019 ==
added
4.2.other) data_src util recover original filename.bat
5.3.other) data_dst util recover original filename.bat
== 03.03.2019 ==
Convertor: fix seamless
== for older changelog see github page ==