Commit graph

265 commits

Author SHA1 Message Date
Colombo
006233656b facerelighther: added intensity param 2019-11-13 00:19:26 +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
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
f6f8f8ee5d change default jpg face extractor quality to 100 2019-11-11 09:13:42 +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
71a98e2ee4 compatibility fix 2019-11-04 02:01:28 +04:00
Colombo
410b8e98a0 fix manual extractor 2019-10-27 18:53:01 +04:00
Colombo
75eeef0a96 fix for amd 2019-10-24 21:59:13 +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
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
kcimit
d26ac4896e Restore mask functionality in mask editor (#442)
* Restore mask functionality

Once mask is saved (using 'c'), mask tool can apply same modifications to the next alignment (by pressing 'r'). Thus some routine work is decreased.

* Mask edit added function to re-apply changes
2019-10-14 17:14:57 +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
63ecd4ec34 speed up S3FD extraction for GPU with >= 11GB vram 2019-10-10 13:22:14 +04:00
Colombo
d9d10f91c2 S3FD and 2DFAN-4 were improperly ported from pytorch. now fixed. 2019-09-20 17:16:37 +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
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
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
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
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
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
6243190f74 fix help screen 2019-08-26 08:14:31 +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
2a9a579436 fix 2019-08-24 13:23:15 +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
Luke Barr
a33ef50da5 Long startup time on Linux (#356) 2019-08-19 22:56:54 +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
8294feca24 extractior: fix extract from already extracted dflimg 2019-05-11 17:36:22 +04:00
iperov
35ab63f752 add launch prog by timer repeatedly for colab 2019-05-05 17:05:03 +04:00
iperov
54fa75aa13 fix 2019-05-02 00:39:18 +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
e58197ca22 initial code to extract umdfaces.io dataset and train pose estimator 2019-04-23 08:14:09 +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
2276f5eb73 fix zoom keys 2019-04-08 17:35:06 +04:00
iperov
8561c1a931 fix MaskEditor, upd manual ru 2019-04-08 14:13:36 +04:00
iperov
7c930121e9 MaskEditor: added window zoom 2019-04-08 10:30:59 +04:00
iperov
a88ee7d093 fix 2019-04-06 17:48:33 +04:00