Commit Graph

594 Commits

Author SHA1 Message Date
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
iperov 23854ac8bc removing landmarks of lips which are used in face aligning, and leave only corners of mouth landmarks,
result: less scale jittering aligning that will be feeded into AE and produce more stable face
before: https://i.imgur.com/gJaW5Y4.gifv
after: https://i.imgur.com/Vq7gvhY.gifv
2019-08-26 19:36:41 +04:00
iperov fb4837b3cb fix converter 2019-08-26 11:03:57 +04:00
iperov 78ddd51ffc fix interactive converter 2019-08-26 10:47:20 +04:00
iperov 96d0e3fbee converter output filename - fixed indexing, now starts from 00001 as extracted frames 2019-08-26 10:39:04 +04:00
iperov 029cabea3d minor fix 2019-08-26 10:03:10 +04:00
iperov d3eadbf5f3 upd readme 2019-08-26 09:51:32 +04:00
iperov 6243190f74 fix help screen 2019-08-26 08:14:31 +04:00
iperov 25da22fdc9 minor fix 2019-08-25 22:32:21 +04:00
iperov 63d30c49ae fixes and optimizations,
converters: added new option sharpen_mode and sharpen_amount
2019-08-25 19:18:51 +04:00
iperov c39ed9d9c9 updated pdf manuals for AVATAR model.
Avatar converter: added super resolution option.
All converters: super resolution DCSCN network is now replaced by RankSRGAN
2019-08-25 17:43:52 +04:00
iperov 19c66286da fix gen_warp_params now accepts any square images 2019-08-25 14:06:33 +04:00
iperov 6c66495bcf default avatar type option is now HEAD. Head produces stable result. 2019-08-25 08:16:54 +04:00
iperov d129b5dd7f sort data for CAInitializerMP 2019-08-25 07:50:27 +04:00
iperov 00dce38187 fix 2019-08-25 07:43:22 +04:00
iperov b572b8f4d4 fix ConverterConfig 2019-08-25 00:30:05 +04:00