Commit graph

49 commits

Author SHA1 Message Date
Colombo
f95682f616 fix 2020-01-02 21:19:19 +04:00
Colombo
8153e90ba3 refactoring 2019-12-22 14:05:41 +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
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
e013cb0f6b moving some files 2019-10-14 09:34:44 +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
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
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
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
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
a88ee7d093 fix 2019-04-06 17:48:33 +04:00
iperov
fe40a46933 limiting converter subprocesses to max 6 2019-04-05 21:43:24 +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
689aefeb2f Converter: fix for input images with ch > 3 2019-03-28 11:12:19 +04:00
iperov
009af42617 fix converter issue #205 2019-03-26 18:23:39 +04:00
iperov
b03b147bae refactoring 2019-03-26 11:09:44 +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
a3df04999c removing trailing spaces 2019-03-19 23:53:27 +04:00
iperov
31c2298b5f Converter: added option for seamless to supress jittering,
Lenx,leny region now averaged by grayscale gradients,
now uses all CPU.
SAE: multiscale_decoder option default = False
update readme and manual_ru.pdf
2019-03-03 15:33:52 +04:00
iperov
438213e97c manual extractor: increased FPS,
sort by final : now you can specify target number of images,
converter: fix seamless mask and exception,
huge refactoring
2019-02-28 11:56:31 +04:00
iperov
72ba6b103c added support of AMD videocards
added Intel's plaidML backend to use OpenCL engine. Check new requirements.
smart choosing of backend in device.py
env var 'force_plaidML' can be choosed to forced using plaidML
all tf functions transferred to pure keras
MTCNN transferred to pure keras, but it works slow on plaidML (forced to CPU in this case)
default batch size for all models and VRAMs now 4, feel free to adjust it on your own
SAE: default style options now ZERO, because there are no best values for all scenes, set them on your own.
SAE: return back option pixel_loss, feel free to enable it on your own.
SAE: added option multiscale_decoder default is true, but you can disable it to get 100% same as H,DF,LIAEF model behaviour.
fix converter output to .png
added linux fork reference to doc/doc_build_and_repository_info.md
2019-02-19 17:33:12 +04:00
iperov
72a640c66c fox Converter.py for debug 2019-02-07 11:29:20 +04:00
iperov
5a1fb199f4 added support of non-english characters in paths 2019-02-05 19:33:55 +04:00
iperov
6d95dd4a99 DFL now works with JPG files by default. Old PNG files also supported. Added util convertor PNG to JPG. 2019-02-04 19:47:24 +04:00
iperov
72646becd1 forcing all tqdm's to ascii in order to work properly on Chinese windows 2019-01-24 21:32:07 +04:00
iperov
e8620919a7 update devicelib/nnlib to detect compute capability 2019-01-08 10:48:06 +04:00
iperov
b5ba7d52cb increased speed of sort by hist sim for ten thousands of faces 2019-01-04 22:54:09 +04:00
iperov
7b70e7eec1 added new model U-net Face Morpher.
removed AVATAR - useless model was just for demo
removed MIAEF128 - use UFM insted
removed LIAEF128YAW - use model option sort by yaw on start for any model
All models now ask some options on start.
Session options (such as target epoch, batch_size, write_preview_history etc) can be overrided by special command arg.
Converter now always ask options and no more support to define options via command line.
fix bug when ConverterMasked always used not predicted mask.
SampleGenerator now always generate samples with replicated border, exclude mask samples.
refactorings
2019-01-02 17:26:12 +04:00
iperov
f8824f9601 refactoring. Added RecycleGAN for testing. 2018-12-28 19:38:52 +04:00
iperov
9926dc626a refactorings, improved sort by hist-dissim 2018-12-20 12:43:00 +04:00
iperov
4ff67ad26b fix --aligned-dir arg 2018-12-20 04:14:42 +04:00
iperov
98ee1bb339 Added option hist-match threshold, used for decrease artifacts of hist-match.
Fix terminating converter thread in debug mode.
Added DeepFaceLab converter overview to readme.
2018-12-14 10:40:46 +04:00
iperov
1bd3a8e0c1 fix error on small mask region size in converter,
error catching on convert face
2018-12-12 20:48:30 +04:00
iperov
b52793218e fix 2018-12-08 10:44:46 +04:00
iperov
d11637ec55 limiting max convert subprocessors to 6 2018-12-08 10:12:41 +04:00
iperov
52f2be80d7 print filename if exception occurs while converting 2018-12-04 22:23:02 +04:00
iperov
5c43f4245e transfercolor via lab converter now implemented by tensorflow-cpu, which is x2 faster than skimage.
We cannot use GPU for lab converter in converter multiprocesses, because almost all VRAM ate by model process, so even 300Mb free VRAM not enough for tensorflow lab converter.
Removed skimage dependency.
Refactorings.
2018-12-01 12:11:54 +04:00
iperov
6bd5a44264 initial 2018-06-04 17:12:43 +04:00