Commit Graph
100 Commits
Author SHA1 Message Date
Colombo dd1d5e8909 improved face align,
More stable and precise version of the face transformation matrix.
Now full_faces are aligned with the upper and lateral boundaries of the frame,
result: fix of cutted mouth, increase area of the cheeks of side faces
before/after https://i.imgur.com/t9IyGZv.jpg
therefore, additional training is required for existing models.
Optionally, you can re-extract dst faces of your project, if they have problems with cutted mouth or cheeks.
2019-12-19 18:33:04 +04:00
Colombo 9e9dc364c9 temporary revert fix 2019-12-19 15:46:50 +04:00
Colombo 853a056769 more stable and precise version of face transformation matrix 2019-12-19 15:25:06 +04:00
Colombo c04740eac1 1 2019-12-17 09:53:17 +04:00
Colombo 28b948888c fix extractor for some systems 2019-12-17 09:52:48 +04:00
Colombo 71ebf06c89 SAEHD,Quick96:
improved model generalization, overall accuracy and sharpness
by using new 'Learning rate dropout' technique from 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
2019-12-15 15:53:06 +04:00
Colombo c866448645 clean 2019-12-11 22:34:22 +04:00
Colombo d4745b5cf8 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.
2019-12-11 22:33:49 +04:00
Colombo e8673e3fcc nothing interesting 2019-12-11 22:33:23 +04:00
Colombo 154820a954 ConvertMasked: fix color bug for superresolution 2019-12-06 16:49:27 +04:00
Colombo f7920d3880 1 2019-11-24 20:33:34 +04:00
Colombo 77b390c04b 1 2019-11-24 19:51:07 +04:00
Colombo 1bfd65abe5 extractor for AMD gpu: increase no response time 2019-11-24 19:37:21 +04:00
Colombo 6b14741160 1 2019-11-21 11:40:55 +04:00
Colombo 668513a507 1 2019-11-16 16:54:10 +04:00
Colombo b74c2b1f9a Converter: added new color transfer mode: mix-m 2019-11-14 12:08:27 +04:00
Colombo 1cc24f2a75 1 2019-11-13 10:31:04 +04:00
Colombo 0a1a9b4fed fix 2019-11-13 00:29:41 +04:00
Colombo 006233656b facerelighther: added intensity param 2019-11-13 00:19:26 +04:00
Colombo 54786848bc fix converterconfig 2019-11-13 00:19:01 +04:00
Colombo 8c3fa3baa5 fix 2019-11-12 18:02:23 +04:00
Colombo 2167c5cbcb fix of converter when using relighted faces in dst 2019-11-12 17:37:13 +04:00
Colombo 4868bd1324 upd doc/doc_prebuilt_windows_app.md 2019-11-12 09:16:42 +04:00
Colombo c0f258c336 SAE,SAEHD,Converter:
added sot-m color transfer

Converter:
removed seamless2 mode
2019-11-12 09:07:50 +04:00
Colombo 05153d9ba5 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 8 directions
2019-11-11 19:56:36 +04:00
Colombo fe58459f36 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

in OpenCL build Relighter runs on CPU,

install pytorch directly via pip install, look at requirements
2019-11-11 11:42:52 +04:00
Colombo b9c0815d17 added random shuffle to samples in SampleGeneratorFace.py 2019-11-11 11:35:46 +04:00
Colombo f6f8f8ee5d change default jpg face extractor quality to 100 2019-11-11 09:13:42 +04:00
Colombo 7d389718fe added Quick96 model
This is the fastest model for low-end 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
2019-11-09 19:24:31 +04:00
Colombo 1f350ae413 1 2019-11-09 19:23:55 +04:00
Colombo 770c70d778 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 and upscale

SAEHD: default ae_dims for df now 256.
2019-11-09 15:12:35 +04:00
Colombo 374d8c2388 fix denoise_image_sequence 2019-11-08 23:04:51 +04:00
Colombo d897893fd5 fix denoise-image-sequence for jpg files 2019-11-08 22:58:39 +04:00
Colombo 2ecf603d96 update prebuilt app info page 2019-11-07 15:07:22 +04:00
Colombo e65e74ac2d converter: removed 'ebs' color transfer 2019-11-04 14:52:18 +04:00
Colombo 71a98e2ee4 compatibility fix 2019-11-04 02:01:28 +04:00
Colombo a8a822fe68 added official telegram channel 2019-10-30 22:17:45 +04:00
Colombo 410b8e98a0 fix manual extractor 2019-10-27 18:53:01 +04:00
Colombo 2fd6616765 Merge branch 'master' of https://github.com/iperov/DeepFaceLab 2019-10-27 12:47:21 +04:00
Colombo 8035325f92 extractor: fix for amd 2019-10-27 12:47:12 +04:00
iperovandGitHub 6861e858fa 1 2019-10-25 14:09:03 +04:00
Colombo f17a54b23a nothing interesting 2019-10-25 11:19:23 +04:00
Colombo b9c41a269d fix check no training data provided 2019-10-25 00:27:34 +04:00
Colombo 75eeef0a96 fix for amd 2019-10-24 21:59:13 +04:00
Colombo 0448a461f5 fix umeyama for landmark alignment of side faces
Before https://i.imgur.com/pEoZ6Mu.mp4
after https://i.imgur.com/wO2Guo7.mp4
2019-10-24 21:46:54 +04:00
Colombo 59d6fada23 draw up arrow in the red landmark debug square 2019-10-24 10:09:51 +04:00
Colombo 734d97d729 added 'sort by vggface': sorting by face similarity using VGGFace model.
Requires 4GB+ VRAM and internet connection for the first run.
2019-10-23 15:06:39 +04:00
Colombo 0d3b25812d fix 2019-10-20 18:02:23 +04:00
Colombo d3e35c8ce6 enhanced sort by final: now faces are evenly distributed not only in the direction of yaw, but also in pitch 2019-10-20 14:18:14 +04:00
Colombo e63e89c305 fix s3fd extractor bug for 11GB+ cards 2019-10-17 22:25:23 +04:00
Colombo e3f63a7b40 fix 2019-10-15 17:37:16 +04:00
Colombo 73511a072a 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.
2019-10-15 11:22:19 +04:00
Colombo 5a2eefaa5b removed last fix 2019-10-14 20:31:11 +04:00
Colombo e18b07549b new fix of "fixed bug when the same face could be detected twice" 2019-10-14 20:26:53 +04:00
Colombo 85cbdcd290 revert fix "face could be detected twice" 2019-10-14 19:11:49 +04:00
Colombo 5ad4b1011c refactoring after @kcimit 2019-10-14 17:20:43 +04:00
Colombo 24eac44dd9 fix random_flip option bug 2019-10-14 14:08:36 +04:00
Colombo 1de1e0029f Extractor now produces a less shaked face. but second pass is now slower by 25%,
before/after: https://imgur.com/L77puLH
2019-10-14 12:09:32 +04:00
Colombo e013cb0f6b moving some files 2019-10-14 09:34:44 +04:00
Colombo 2b264da86b fixed bug when same face can be detected twice 2019-10-13 14:59:50 +04:00
Colombo aa523b3f2e change name 2019-10-12 16:13:23 +04:00
Colombo 91d2391ac9 fix 2019-10-12 14:09:48 +04:00
Colombo 8595c757ad change options order 2019-10-12 10:39:48 +04:00
Colombo 92f14dee70 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.
2019-10-12 10:31:50 +04:00
Colombo e15f846d08 SAE, SAEHD: random flip and learn mask options now can be overridden 2019-10-10 22:56:57 +04:00
Colombo 1f27d13f61 clip border for midface 2019-10-10 14:48:51 +04:00
Colombo 63ecd4ec34 speed up S3FD extraction for GPU with >= 11GB vram 2019-10-10 13:22:14 +04:00
Colombo 59ad734b6c fixed GPU indexing 2019-10-10 13:13:36 +04:00
Colombo d2d0dcb5e7 fix multigpu extractor 2019-10-10 13:01:57 +04:00
Colombo 9b08199e87 upd .md 2019-10-09 12:01:37 +04:00
Colombo 3f23135982 SAEHD: speed up for nvidia, duplicate code clean up 2019-10-08 21:02:20 +04:00
Colombo 627df082d7 fix for plaidml 2019-10-08 16:55:21 +04:00
Colombo ac7725163d removed SAEv2,
added SAEHD model ( High Definition Styled AutoEncoder )
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
  before: https://i.imgur.com/4jUcol8.gifv
  after:  https://i.imgur.com/lyiax49.gifv - scale of the face is less changed within frame size
+ 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.
  example: https://i.imgur.com/ME3A7dI.gifv
  Enable it for last 15-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.
2019-10-08 15:09:28 +04:00
Colombo cbc18b2d41 nothing interesting 2019-10-06 17:55:32 +04:00
Colombo 4c2cb44643 upd liae loss 2019-10-06 10:06:22 +04:00
Colombo e4a360e5ff upd loss 2019-10-06 01:00:34 +04:00
Colombo d781af3d1f fixed GPU detection and indexes, got rid of using nvml, now using direct cuda lib to determine gpu info that match tensorflow indexes,
removed TrueFace model.

added SAEv2 model. Differences from SAE:
+ default e_ch_dims is now 21
+ new encoder produces more stable face and less scale jitter
  before: https://i.imgur.com/4jUcol8.gifv
  after:  https://i.imgur.com/lyiax49.gifv - scale of the face is less changed within frame size
+ decoder now has only 1 residual block instead of 2, result is same quality with less decoder size
+ added mid-full face, which covers 30% more area than half face.
+ added option " Enable 'true face' training "
  Enable it only after 50k iters, when the face is sharp enough.
  the result face will be more like src.
  The most src-like face with 'true-face-training' you can achieve with DF architecture.
2019-10-05 16:26:23 +04:00
Colombo 353bcdf80f cuda_cache_max_size 2019-10-02 20:17:56 +04:00
Colombo 09a990852f funits models: cleaning code 2019-09-27 18:48:01 +04:00
Colombo 8041ee959a nnlib initialization: fix choosing best gpu when indexes of gpu are different in tf and nvsmi 2019-09-27 18:47:18 +04:00
Colombo 4a2203cc35 adding kernel initializer option to FUNITAdain block 2019-09-24 21:30:28 +04:00
Colombo deeb98474b fix funit 2019-09-23 18:54:37 +04:00
Colombo 9e80bbc917 1 2019-09-21 15:19:58 +04:00
Colombo 62682351ac fix avatar model 2019-09-21 14:48:40 +04:00
Colombo 2a3b3f0021 added tf_cpu_mode option for funit models 2019-09-21 09:44:34 +04:00
Colombo d9d10f91c2 S3FD and 2DFAN-4 were improperly ported from pytorch. now fixed. 2019-09-20 17:16:37 +04:00
Colombo e928ee0d30 1 2019-09-19 19:36:46 +04:00
Colombo ef90316f27 1 2019-09-19 17:29:12 +04:00
Colombo a325d0353b fix 2019-09-19 11:20:30 +04:00
Colombo c06d073936 1 2019-09-19 11:16:35 +04:00
Colombo dc11ec32be 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'. 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.
Keep src and dst faceset in same lighting conditions.
2019-09-19 11:13:56 +04:00
Colombo 201b762541 SAE: fix 2019-09-14 16:39:47 +04:00
Colombo b6b92bded0 converter: now writes a filename of current frame config,
SAE: removed multiscale decoder, because it's not effective
2019-09-13 08:59:00 +04:00
Colombo bef4e5d33c Converter: added new color transfer modes: mkl, mkl-m, idt, idt-m 2019-09-07 22:01:01 +04:00
Colombo 7ed38a8097 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
2019-09-07 13:57:42 +04:00
Colombo 70dada42ea fix 2019-09-06 14:52:46 +04:00
Colombo faa14c4e59 fix extractor error on load grayscale images 2019-09-06 11:54:49 +04:00
Colombo bc0b25cdda 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.
2019-08-30 16:19:41 +04:00
Colombo bac9d5a99d nothing interesting 2019-08-30 09:49:07 +04:00
Colombo 9f58d160a0 Converter: fix output names of merged files, now its 100% same as input,
ConvertAvatar: fix input image after fix landmarks face align,
VideoEd: video_from_sequence now uses pipe input to input any filenames instead of %.5d. formatted
2019-08-27 22:05:22 +04:00