Commit graph

341 commits

Author SHA1 Message Date
iperov
35877dbfd7 AMP, SAEHD: added option use_fp16: Increases training/inference speed, reduces model size. Model may crash. Enable it after 1-5k iters.
AMP: removed lr_dropout, now it is enabled by default;
2021-07-14 23:03:54 +04:00
iperov
ee1bc83a14 AMP, SAEHD: reverted GAN to december version. 2021-07-07 21:45:43 +04:00
iperov
446b95942f fix 2021-07-01 15:08:11 +04:00
iperov
0444a9a565 default morph factor is now 0.1 2021-07-01 14:29:11 +04:00
iperov
075422e0c5 amp: fixes, removed pretrain option 2021-07-01 14:25:54 +04:00
iperov
63c794b3d0 rename dump_dflive to export_dfm 2021-06-28 18:26:54 +04:00
iperov
9d6b6feb1f _ 2021-06-28 14:27:09 +04:00
iperov
90a74efd89 fix 2021-06-26 23:06:30 +04:00
iperov
3c6bbe22b9 AMP: added Inter dimensions param. The model is not changed. Should be equal or more than AutoEncoder dimensions. More dims are better, but require more VRAM. You can fine-tune model size to fit your GPU. 2021-06-26 10:55:33 +04:00
iperov
5783191849 AMP: code refactoring, fix preview history
added dumpdflive command
2021-06-26 10:44:41 +04:00
iperov
62f1d57871 AMP: fix a merge bug where morph_factor was always = 1.0 2021-06-14 17:58:01 +04:00
iperov
5fac5ee4f3 AMP model: added ‘morph_factor’ option. [0.1 .. 0.5]
The smaller the value, the more src-like facial expressions will appear.
The larger the value, the less space there is to train a large dst faceset in the neural network.
Typical fine value is 0.33

AMP model: added ‘pretrain’ mode as in SAEHD
Windows build: Default pretrain dataset is updated with applied Generic XSeg mask
2021-06-01 09:37:55 +04:00
iperov
34b62862e0 fix help msg 2021-06-01 09:36:53 +04:00
iperov
e52b53f87c AMP fix 2021-05-30 09:24:23 +04:00
iperov
11a7993238 fix 2021-05-29 22:23:07 +04:00
iperov
6f86c68e65 add AMP model 2021-05-29 18:57:35 +04:00
iperov
fdb143ff47 added AMD/Intel cards support via DirectX12 ( DirectML backend ) 2021-04-22 18:19:15 +04:00
iperov
93fe480eca revert 2021-04-19 13:35:14 +04:00
iperov
af0b3904fc XSeg trainer: additional dssim loss. 2021-04-15 21:43:47 +04:00
iperov
8d46cd94fd upd pretrain option help 2021-03-23 16:07:50 +04:00
iperov
e47b602ec8 SAEHD: random flip replaced with random SRC flip(default False) and random DST flip(default True) 2021-03-23 15:13:10 +04:00
iperov
b333fcea4b dump_ckpt 2021-03-23 15:00:24 +04:00
iperov
11add4cd4f update GAN model 2021-01-03 19:25:39 +04:00
iperov
54fc3162ed new gan 2021-01-03 01:08:20 +04:00
iperov
ad5733c5bb upd PatchDiscriminator 2020-12-31 17:38:41 +04:00
iperov
ae9e16b4a5 SAEHD: new GAN 2020-12-30 14:33:14 +04:00
iperov
db83a21244 Eyes priority is replaced with Eyes and mouth priority,
Helps to fix eye problems during training like "alien eyes" and wrong eyes direction.
Also makes the detail of the teeth higher.

New default values with new model:
Archi : ‘liae-ud’
AdaBelief : enabled
2020-12-20 09:45:22 +04:00
iperov
dd037d2dea SAEHD: lr_dropout now can be used with AdaBelief 2020-12-18 12:42:10 +04:00
iperov
40d18896b7 SAEHD: change help 2020-12-16 18:25:25 +04:00
iperov
da058cf17f remove lrcos from adabelief 2020-12-11 20:34:14 +04:00
iperov
26ed582aff fix xseg 2020-12-11 20:25:30 +04:00
iperov
1ee7798fb9 . 2020-12-11 17:56:39 +04:00
iperov
704b5dc072 SAEHD: added new option Use AdaBelief optimizer?
Experimental AdaBelief optimizer. It requires more VRAM, but the accuracy of the model is higher, and lr_dropout is not needed.
2020-12-11 15:48:27 +04:00
iperov
254a7cf5cf fix xseg training 2020-12-11 15:47:11 +04:00
iperov
35945b257c fix dimensions error 2020-12-11 14:34:37 +04:00
iperov
b9c9e7cffd fix depth_to_space for tf2.4.0. Removing compute_output_shape in leras, because it uses CPU device, which does not support all ops. 2020-12-11 11:28:33 +04:00
Colombo
6134e57762 options_show_override{} for model summary in pretrain mode 2020-07-27 16:37:13 +04:00
Colombo
1435dd3dd1 SAEHD: now random_warp is disabled for pretraining mode by default 2020-07-26 16:11:08 +04:00
Colombo
ce95af9068 SAEHD: write_preview_history now works faster
The frequency at which the preview is saved now depends on the resolution.
For example 64x64 – every 10 iters. 448x448 – every 70 iters.
2020-07-18 11:03:13 +04:00
Colombo
58670722dc fix 2020-07-17 17:40:32 +04:00
Colombo
b9b97861e1 fix mask for style losses 2020-07-17 17:34:07 +04:00
Colombo
e8b04053e4 SAEHD:
Changed help for “Learning rate dropout” option:

When the face is trained enough, you can enable this option to get extra sharpness and reduce subpixel shake for less amount of iterations.

Enabled it before “disable random warp” and before GAN. n disabled. y enabled

cpu enabled on CPU. This allows not to use extra VRAM, sacrificing 20% time of iteration.

 Changed help for GAN option:

Train the network in Generative Adversarial manner.

Forces the neural network to learn small details of the face.

Enable it only when the face is trained enough and don't disable.

Typical value is 0.1

improved GAN. Now it produces better skin detail, less patterned aggressive artifacts, works faster.
https://i.imgur.com/Nbh3mw1.png
2020-07-16 22:19:17 +04:00
Colombo
44e6970dc5 changed help for gan_power 2020-06-30 12:37:12 +04:00
Colombo
4e998aff93 . 2020-06-24 10:06:31 +04:00
Colombo
f90723c9f9 SAEHD: ‘uniform_yaw’ now always enabled in pretrain mode. 2020-06-21 00:57:48 +04:00
Colombo
53222839c6 SAEHD: for -d archis resolution should be divided by 32 2020-06-19 14:21:41 +04:00
Colombo
0c2e1c3944 SAEHD:
Maximum resolution is increased to 640.

‘hd’ archi is removed. ‘hd’ was experimental archi created to remove subpixel shake, but ‘lr_dropout’ and ‘disable random warping’ do that better.

‘uhd’ is renamed to ‘-u’
dfuhd and liaeuhd will be automatically renamed to df-u and liae-u in existing models.

Added new experimental archi (key -d) which doubles the resolution using the same computation cost.
It is mean same configs will be x2 faster, or for example you can set 448 resolution and it will train as 224.
Strongly recommended not to train from scratch and use pretrained models.

New archi naming:
'df' keeps more identity-preserved face.
'liae' can fix overly different face shapes.
'-u' increased likeness of the face.
'-d' (experimental) doubling the resolution using the same computation cost
Examples: df, liae, df-d, df-ud, liae-ud, ...

Improved GAN training (GAN_power option).  It was used for dst model, but actually we don’t need it for dst.
Instead, a second src GAN model with x2 smaller patch size was added, so the overall quality for hi-res models should be higher.

Added option ‘Uniform yaw distribution of samples (y/n)’:
	Helps to fix blurry side faces due to small amount of them in the faceset.

Quick96:
	Now based on df-ud archi and 20% faster.

XSeg trainer:
	Improved sample generator.
Now it randomly adds the background from other samples.
Result is reduced chance of random mask noise on the area outside the face.
Now you can specify ‘batch_size’ in range 2-16.

Reduced size of samples with applied XSeg mask. Thus size of packed samples with applied xseg mask is also reduced.
2020-06-19 09:45:55 +04:00
Colombo
7f11713730 fix 2020-06-11 21:29:39 +04:00
Colombo
82f405ed49 Trainer: fixed "Choose image for the preview history". Now you can switch between subpreviews using 'space' key.
Fixed "Write preview history". Now it writes all subpreviews in separated folders
https://i.imgur.com/IszifCJ.jpg
also the last preview saved as _last.jpg before the first file
https://i.imgur.com/Ls1AOK4.jpg
thus you can easily check the changes with the first file in photo viewer
2020-06-10 10:20:13 +04:00
Colombo
af98407f06 SAEHD: lr_dropout now can be ‘n’, ‘y’, ‘cpu’. ‘n’ and ’y’ are the same as before.
‘cpu’ mean enabled on CPU. This allows not to use extra VRAM, sacrificing 20% time of iteration.

SAEHD: resolution >= 256 now has second dssim loss function
2020-06-08 14:18:33 +04:00