Commit graph

99 commits

Author SHA1 Message Date
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
iperov
407ce3b1ca 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 (NVIDIA), 12GB (AMD)
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 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

updated versions of modules
2019-08-24 12:57:29 +04:00
iperov
b72d5a3f9a fixed error "Failed to get convolution algorithm" on some systems
fixed error "dll load failed" on some systems
Expanded eyebrows line of face masks. It does not affect mask of FAN-x converter mode.
2019-08-11 11:17:22 +04:00
iperov
8484060e01 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.
2019-06-20 10:42:55 +04:00
iperov
39809ff7dc upd 2019-05-11 16:15:16 +04:00
iperov
6143962248 SAE: option apply_random_ct now True by default 2019-05-10 19:50:19 +04:00
iperov
d2011f8c32 upd doc 2019-05-08 09:32:32 +04:00
iperov
d8c1e2e58b change help for apply_random_ct option 2019-05-07 10:47:29 +04:00
iperov
a805f81142 SAE: added test option: 'Apply random color transfer to src faceset' 2019-05-06 11:34:56 +04:00
iperov
f26267fddf sae: upd help 2019-05-02 09:06:22 +04:00
iperov
54fa75aa13 fix 2019-05-02 00:39:18 +04:00
iperov
6dc1d43fe9 fix 2019-05-01 20:03:15 +04:00
iperov
9577c2d254 fix 2019-05-01 19:59:43 +04:00
iperov
2a8dd788dc 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: both decoders.h5. The longer you pretrain the model the more morphed face will look. After that, save and run the training again.
2019-05-01 19:55:27 +04:00
iperov
9e05e58ac4 _ 2019-04-26 21:43:43 +04:00
iperov
9535a657d2 SAE: revert back CA weights option 2019-04-24 13:44:12 +04:00
iperov
b6711b97a3 SAE added CA weights 2019-04-24 11:38:45 +04:00
iperov
947feac047 refactorings 2019-04-24 11:28:58 +04:00
iperov
e1da9c56b4
SAE collapse fix (#245)
* test

* _

* _

* upd dev_poseest

* SAE: finally collapses are fixed

* fix batch size help
2019-04-24 09:38:26 +04:00
iperov
d62785ca5a _ 2019-04-24 00:36:09 +04:00
iperov
385d5dabbf remove df-s and liae-s 2019-04-23 18:28:17 +04:00
iperov
47f9bad42b SAE: df-s liae-s archis 2019-04-23 17:03:30 +04:00
iperov
565c131b97 SAE: removed option 'remove gray border', because it makes the model very resource intensive 2019-04-23 08:31:13 +04:00
iperov
51a917facc back to 100* loss 2019-04-22 10:42:17 +04:00
iperov
cd2767cca0 SAE: back to batchnormalization 2019-04-22 10:28:01 +04:00
iperov
f54cc744bd SAE fix model crashes 2019-04-22 00:40:23 +04:00
iperov
5e3bd75007 fix 2019-04-21 22:28:25 +04:00
iperov
16053c4ae6 SAE: revert back to batchnormalization 2019-04-21 22:17:41 +04:00
iperov
63beb3afd2 SAE: revert back df model from prev commit. LIAE should be restarted. 2019-04-21 08:31:05 +04:00
iperov
2cdf2745a2 SAE: model will not work with this update, you should to restart training,
applied paper https://arxiv.org/abs/1807.01442 https://github.com/aditya-grover/uae
2019-04-20 22:33:28 +04:00
iperov
7c5f762e78 SAE:fix multiscale decoder 2019-04-20 21:30:40 +04:00
iperov
046649e6be
update == 04.20.2019 == (#242)
* superb improved fanseg

* _

* _

* added FANseg extractor for src and dst faces to use it in training

* -

* _

* _

* update to 'partial' func

* _

* trained FANSeg_256_full_face.h5,
new experimental models: AVATAR, RecycleGAN

* _

* _

* _

* fix for TCC mode cards(tesla), was conflict with plaidML initialization.

* _

* update manuals

* _
2019-04-20 08:23:08 +04:00
iperov
58d7e990f4 refactorings, added motion blur to SampleProcessor for FANSegmentator trainer 2019-04-07 23:08:00 +04:00
iperov
5ac7e5d7f1 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.

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

added mask editor, its created for refining dataset for FANSeg model, and not for production, but you can spend your time and test it in regular fakes with face obstructions
2019-04-04 10:22:53 +04:00
iperov
01e98cde8e upd pixel_loss help message 2019-03-31 19:21:04 +04:00
iperov
85c01e3b4a Converter: added Apply super resolution? (y/n skip:n) : , Enhance details by applying DCSCN network.
refactorings
2019-03-28 21:50:27 +04:00
iperov
3cf3bb786e rename samples to samplelib 2019-03-27 10:44:13 +04:00
iperov
aa58d9e563 SAE: removed lightweight encoder 2019-03-25 10:05:30 +04:00
iperov
54239f8edf sae: optimizer mode now can be overrided 2019-03-24 16:25:30 +04:00
iperov
37505d88e3 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.
2019-03-24 15:35:02 +04:00
iperov
cbe2ebca7f SAE: removed random normal initialization 2019-03-23 14:57:30 +04:00
iperov
97008291b8 fix 2019-03-20 14:43:02 +04:00
iperov
a3df04999c removing trailing spaces 2019-03-19 23:53:27 +04:00
iperov
d71a310fd7 SAE: forgot to remove normalizing from tanh 2019-03-17 13:03:49 +04:00
iperov
d6a45763a2 SAE: added option "Use CA weights":
Initialize network with 'Convolution Aware' weights. This may help to achieve a higher accuracy model, but consumes time at first run.
2019-03-16 12:54:36 +04:00
iperov
5076feb90f SAE: revert back to sigmoid. Trainings must be restarted. 2019-03-16 09:01:11 +04:00
iperov
8da47fec13 fix ModelBase, nnlib 2019-03-13 20:53:59 +04:00
iperov
3375088669 SAE: optimizer_mode option now cannot be overridden by restart 2019-03-13 20:00:16 +04:00
iperov
58763756f5 SAE: removed simple_optimizer . Added optimizer mode for tensorflow only (NVIDIA cards), allows to train x2-x3 bigger networks with normal Adam optimizer, consuming VRAM and CPU power. 2019-03-13 11:54:17 +04:00
iperov
97b6fabaab change 'epoch' to 'iter',
added timestamp prefix to training string
2019-03-12 19:23:52 +04:00