Commit Graph

810 Commits

Author SHA1 Message Date
torzdf
917acaa452 bugfixes
- Fix MS-SSIM on multi-gpu
  - Swallow print bug on multi-gpu
2022-06-12 02:04:11 +01:00
torzdf
3d8e674adc convert - Fix affine borders 2022-06-08 12:44:05 +01:00
torzdf
73442b520c convert: remove box blend plugin 2022-06-08 00:54:47 +01:00
torzdf
20a657d6cf Bump minimum TF Version 2022-06-07 10:54:51 +01:00
torzdf
5c9fa1aa03 Train updates
- Output full model summary last
  - Fix activations in Phaze-A upscales
  - Phaze-A Add option to place some upscales in fc model
2022-06-07 01:11:26 +01:00
torzdf
c7e577e887 Phaze-A - Updates for future implementations 2022-06-06 13:15:21 +01:00
torzdf
a99049711f Model updates
- Increase model summary width
- Phaze A updates
  - Update some min/max values
  - Add Decoder Filter Slope Mode
  - Add additional arguments for Upsampling2D
  - Adjust upsampling method for multiple upsamples in FC layers
  - Typing
2022-06-06 11:50:05 +01:00
torzdf
8acf3228ad nn_blocks - linting 2022-06-06 09:50:44 +01:00
torzdf
3a9764da9e lib.model.nnblocks - typing + cleanup upscales 2022-06-06 09:29:36 +01:00
torzdf
1301959907 Bugfix: 2 tf loss functions 2022-05-29 18:16:06 +01:00
torzdf
afec523093 Bugfixes:
- Stats graph - Handle NaNs in data
  - logger - de-elevate matplotlib font messages
2022-05-29 13:13:45 +01:00
torzdf
a2b8e324ae bugfix: distibuted training with dssim 2022-05-28 01:46:46 +01:00
torzdf
c2595c46d4 bugfix - add missing mask key to alignments on legacy update 2022-05-20 17:06:25 +00:00
torzdf
a5a598539c Manual tool - More robust handling of videos with duped frames 2022-05-18 00:30:56 +01:00
torzdf
b7e680c5a0 linting 2022-05-15 16:59:11 +01:00
torzdf
d6a3372eb0 Update matplotlib requirement
- bump min requirement to 3.5.1
  - Fix custom toolbar for v3.5.1
  - Documentation + linting
2022-05-15 16:48:58 +01:00
torzdf
988a171f04 Merge branch 'master' into m1 2022-05-12 15:57:38 +01:00
torzdf
5dfc9c03c9 bugfix: fix import order 2022-05-12 15:57:07 +01:00
torzdf
d83a39716b minor cleanup
- Consistent naming for backend selection
- Remove apple-silicon from setup.py (not yet implemented)
2022-05-12 12:40:53 +01:00
torzdf
f8c1bf26df Refactor apple-silicon
- Merge metal/__init__ into gpu_stats.apple_silicon.py
  - Use psutil.virtual_memory().available to get free memory
2022-05-12 12:12:00 +01:00
torzdf
d3f72c5449 Merge branch 'master' into m1 2022-05-12 12:02:34 +01:00
torzdf
fdb0a33c8d typofix - lib.gpu_stats.amd 2022-05-12 12:01:14 +01:00
torzdf
bcadc13c6d typofix - lib.gpu_stats._base 2022-05-12 11:49:40 +01:00
torzdf
a3e8fdc252
Merge pull request #1216 from geewiz94/patch-1
Add Apple Silicon (M1) support
2022-05-12 10:46:06 +01:00
torzdf
b057b719ce bugfix: prevent error on python 3.7 2022-05-12 08:53:13 +01:00
geewiz94
948f0fb82e Rename Apple Silicon backend to apple_silicon 2022-05-12 01:33:56 +02:00
geewiz94
6d6903d2ce Linting 2022-05-12 01:24:39 +02:00
geewiz94
a8b2b0d48e Merge branch 'merge-upstream-changes2' into patch-1 2022-05-12 01:21:37 +02:00
torzdf
bdbbad4d31
Refactor lib.gpu_stats (#1218)
* inital gpu_stats refactor

* Add dummy CPU Backend

* Update Sphinx documentation
2022-05-11 17:36:07 +01:00
geewiz94
24ab822e64
Merge branch 'deepfakes:master' into patch-1 2022-05-11 10:21:07 +02:00
torzdf
b2cd8eb867 bugfix: Windows - Stop training when terminate button pressed 2022-05-09 10:29:47 +01:00
torzdf
8ab085fae0 bugfix: gui - settings popup. Always reload config 2022-05-08 14:18:50 +01:00
torzdf
adb5975c94 Graph popup - Always open in same position 2022-05-08 10:22:27 +01:00
geewiz94
faef5a683e Cleanup 2022-05-07 13:50:10 +02:00
geewiz94
03a8b6228e Merge branch 'merge-upstream-changes' into patch-1 2022-05-07 13:12:42 +02:00
torzdf
a046248389 BugFix - lib.keypress 2022-05-06 17:15:18 +01:00
Dhyey Patel
feac8a0108
trainer: add support for non-interactive jobs (#1193)
Add support for training in non-interactive shell environment such
as Sun Grid Engine, Univa Grid Engine and others.

Tested on Univa Grid Engine.

Reference: https://stackoverflow.com/questions/967369/python-find-out-if-running-in-shell-or-not-e-g-sun-grid-engine-queue.
2022-05-04 23:07:31 +01:00
torzdf
332394edbf bugfix: correct init for ms-ssim amd 2022-05-04 10:03:14 +01:00
torzdf
5569abbb63 training - Add MS-SSIM loss function 2022-05-04 01:58:00 +01:00
torzdf
aa39234538
Update all Keras Imports to be conditional (#1214)
* Remove custom keras importer

* first round keras imports fix

* launcher.py: Remove KerasFinder references

* 2nd round keras imports update (lib and extract)

* 3rd round keras imports update (train)

* remove KerasFinder from tests

* 4th round keras imports update (tests)
2022-05-03 20:18:39 +01:00
torzdf
5adc5c536b ssim loss - Scale back 2022-05-02 18:19:00 +01:00
torzdf
c1512fd41d
Update code to support Tensorflow versions up to 2.8 (#1213)
* Update maximum tf version in setup + requirements

* - bump max version of tf version in launcher
- standardise tf version check

* update keras get_custom_objects  for tf>2.6

* bugfix: force black text in GUI file dialogs (linux)

* dssim loss - Move to stock tf.ssim function

* Update optimizer imports for compatibility

* fix logging for tf2.8

* Fix GUI graphing for TF2.8

* update tests

* bump requirements.txt versions

* Remove limit on nvidia-ml-py

* Graphing bugfixes
  - Prevent live graph from displaying if data not yet available

* bugfix: Live graph. Collect loss labels correctly

* fix: live graph - swallow inconsistent loss errors

* Bugfix: Prevent live graph from clearing during training

* Fix graphing for AMD
2022-05-02 14:30:43 +01:00
torzdf
cda49b3c3c Bugfix - Fix graphing not always showing loss for both sides 2022-04-16 15:13:46 +01:00
geewiz94
7dd1122c1c
Get free VRAM from Metal 2022-03-29 17:48:51 +02:00
Daniel Livingston
d6eedb09ff added apple silicon backend 2022-03-19 15:43:21 -04:00
Daniel Livingston
a7ef098083 keras import errors fix 2022-03-19 15:31:42 -04:00
Daniel Livingston
444762114c Initial somewhat working version 2022-03-19 15:11:13 -04:00
torzdf
860ccb91ac Suppress Tensorflow stderr custom error messages 2021-09-08 00:23:01 +01:00
torzdf
24888f61c3 Suppress ptxas error in GUI on Windows 2021-09-08 00:18:33 +01:00
torzdf
cf4b567cc6
Tensorflow 2.6 Support (#1182)
* lib.cli.launcher - Bump max tf version to 2.6

* Remove pathlib requirement

* Update requirements files

* Update setup.py

* bugfix - GUI: Supress errors when attempting to load previews in extract

* GUI: Suppress ptxas error messages for Windows
2021-09-05 02:25:12 +01:00
torzdf
6f1e6743df Bugfixes:
- Gui - Stats - Return empty dict on state file look up error
  - Gui - Last Session - Don't load saved project information when loading project from last session
  - Train - Set default coverage to 87.5%
2021-08-28 10:40:01 +00:00
torzdf
7e7640e557 Bugfix: Convert - Fix predicted mask 2021-08-11 23:58:34 +01:00
torzdf
ac22d40a91 extract: mask - Delete any mask from outside of frame boundaries 2021-07-22 13:04:29 +01:00
torzdf
eb96da0346 Add Misalignment Detection
- lib.align.AlignedFace - Add average_distance property (distance from mean_face)
  - tools.manual - Add misaligned Faces filter
  - tools.sort - Add sort by distance (misaligned sort)Add "Misaligned Faces" filter to manual tool
2021-06-08 19:30:28 +01:00
torzdf
a26bc50891 Manual Tool - Update to support masks with different centering 2021-05-31 18:58:34 +01:00
torzdf
18e3139275 Updates
- Change shortcut key to M
  - Slight optimizations
  - GUI support for mask toggling
2021-05-28 19:41:11 +01:00
torzdf
8c87ac52b4 Update Travis Tests for optimizers 2021-05-25 13:12:18 +00:00
torzdf
4c1631b58e lib.model - Add AdaBelief Optimizer 2021-05-25 13:11:35 +01:00
torzdf
6ee896d175 lib.gui.stats - Read loss names from model config output rather than state file 2021-05-23 16:10:42 +01:00
torzdf
3d914ee382 bugfix: Convert - don't error if no mask is selected 2021-05-21 10:52:39 +01:00
torzdf
00544f432a Bugfix: Collect mask correctly in training and convert 2021-05-20 13:39:16 +01:00
torzdf
0526da38a0 lib.align.pose.offset - Add legacy parameter to dict 2021-05-20 11:19:50 +01:00
torzdf
6c439944cd Masks updates
- Add head centering support to training
  - Update helptext/tooltips
2021-05-17 18:20:08 +01:00
torzdf
58cedef281 bugfix: lib.convert - Correctly pass mask centering to mask plugin 2021-05-17 12:06:18 +01:00
torzdf
4f48e1c25b bugfix: Training, don't error on loading extracted faces without stored_centering 2021-05-16 16:11:02 +01:00
torzdf
40798fd27f core mask updates:
- Add support for different mask centering
  - Update legacy alignments to store mask centering
  - Bugfix: lib.image ImageIO. Ensure unique queues are created (fixes mask tool when Face is input and an output folder is provided)
2021-05-16 13:24:00 +01:00
torzdf
ecd17d4ba7 Bugfix: Training Generator - Output image name with NoneType errors 2021-05-14 11:59:00 +01:00
torzdf
3835f3959d bugfix: augmentation: Use np.any for truth value 2021-05-14 01:54:26 +01:00
torzdf
add2d10315 Bugfix: Augmentation - Correctly calculate Clahe chance 2021-05-14 01:46:57 +01:00
torzdf
38d77f5583 bugfix: Training Generator - Catch Nonetypes when loading images 2021-05-14 00:29:27 +01:00
torzdf
cc5bc8743f GUI - Plugin preset support
- Add ability to load and save presets for all existing faceswap plugins
  - Add phaze-a presets
2021-05-08 13:31:49 +01:00
torzdf
3301c1ee29 Bugfix - Training - Fix eye/mouth multiplier for some models 2021-05-06 11:02:15 +00:00
torzdf
29beb7a23d bugfix - Fix race condition when WTL is selected 2021-05-05 16:40:20 +00:00
torzdf
51705fadb0 lib.model.losses_tf - Add multiplier bug catching code 2021-05-05 16:47:26 +01:00
torzdf
3092d1421c GUI Bugfix - Handle underscores in config options correctly 2021-05-01 11:09:14 +01:00
torzdf
e0a98e9b69 Training bugfixes:
- lib.training.generator
      - Fix duplicate "legacy faceset" warning
      - Fix missing mask error message
  - gui: Fix bug in live stats when resuming an old session
2021-04-20 13:56:03 +01:00
torzdf
c900036a4e GUI - Analysis Bugfix
- Get correct length of loss labels when carrying over raw data
2021-04-15 18:17:05 +01:00
torzdf
094ea338f1 GUI - Bugfixes
- Swallow OSErrors when failing to load preview image
  - Fix event_reader mapping for model output to loss names
  - stats - Ensure that _tb_logs exists prior to calling stop training
2021-04-14 15:28:57 +01:00
torzdf
a9bc9fb114 GUI - Wrapper - bugfix
- Only reset session data at the end of a training session
2021-04-13 11:57:18 +01:00
torzdf
510b8ba051 gui.analysis.event_reader - bugfix
- return empty when no timestamps in cache
2021-04-13 01:00:37 +01:00
torzdf
25d1f1b159 gui.analysis - Fixups
- Refactor stats and analysis code
  - Fix rollover data bug on live training
  - Update documentation
2021-04-13 00:10:29 +01:00
torzdf
e682d0c467 lib.gui.stats - Add debug code to catch stats graphing bug 2021-04-08 14:36:39 +01:00
torzdf
5ac15f68d2 gui - Console - Only strip trailing new lines from output 2021-04-03 12:53:47 +01:00
torzdf
51b316ee6c lib.training.generator - Catch mismatched image sizes in training folder 2021-04-03 11:31:58 +01:00
torzdf
26e9e20922 lib.training.generator - Add debug error code 2021-04-02 22:05:52 +01:00
torzdf
616bd7c500 GUI fixes
- Split themes and styles to own module
  - Fix border on console window
  - variable name updates to make pep8 happy
2021-03-25 19:29:29 +00:00
torzdf
5f598ca825 Locales Update 2021-03-22 18:41:55 +00:00
torzdf
a49831fb26 GUI - Add theme support to console 2021-03-22 14:45:18 +00:00
torzdf
29cfdaad46 Training startup updates
- Remove alignments path option from cli
  - Restructure training_data.py
  - Load alignment data from PNG header during first epoch
  - lib.image.read_image_batch - Add option to return metadata
  - lib.utils.get_image_paths - Add option for explicit extension
  - plugins.train.trainer._base - remove pre-cache alignments code
  - scripts.train - Check first image in training folders for metadata
  - Documentation
2021-03-21 23:29:31 +00:00
torzdf
6872173d7e GUI - Add missing file 2021-03-20 14:08:53 +00:00
torzdf
a49f810e7c GUI - Make tooltips themeable 2021-03-20 14:08:07 +00:00
torzdf
46cb53e6f0 Training updates:
- Expose optimizer epsilon param
  - Add NaN protection
GUI - slider - add support for discreet values
2021-03-19 18:22:35 +00:00
torzdf
a656552204 Minor Updates
- GUI - Tweaks
    - Fix Analysis Slider background color
    - More granular theming controls
    - Standardize comboboxes and scrollbars
  - plugins.train.model._base
      - Catch more model corruption errors
2021-03-18 17:43:56 +00:00
mark-gargan
d0e9990870
Adding some defensive code to better identify which image is causing … (#1133)
* Adding some defensive code to better identify which image is causing issue when permission error is encountered.
2021-03-18 12:13:12 +00:00
torzdf
11009bf237 GUI Bugfix - Stop settings colors leaking into analysis. 2021-03-16 23:20:19 +00:00
torzdf
cff0f5698b GUI updates
- Control panel fixes
  - Basic themeing support
  - Fix tools to display more natively
  - Give all config items a group
2021-03-16 19:46:14 +00:00
torzdf
46edd5e5ae GUI fix - Make grey slider backgrounds go away 2021-03-15 00:38:18 +00:00
torzdf
1c0d112588 Minor GUI Updates
- Fix spacing between buttons on Control Panels
  - Configurable background on Control Panels
  - Fix background color of TreeView menu in settings pop up
  - Change TreeView selected item highlight color
  - Change console background color to match control panel
  - Fix unfilled color in control panel background
2021-03-14 23:16:08 +00:00
torzdf
7115ad3550 GUI - Minor Updates
- Add style support to control panel
  - Theme settings to red
  - Use standard tk buttons
  - Fix some graphical glitches
2021-03-14 20:27:04 +00:00
torzdf
5eea32833d GUI - Make groups collapsible 2021-03-14 02:50:06 +00:00
torzdf
caa6e541c6 Training - Load Weights
- Enable the loading of previously trained encoders for new models.
2021-03-12 14:48:59 +00:00
torzdf
a79b8c6905 Fixups
- Documentation - Update sphinx_requirements.txt
  - plugins.train.model - Add recursive keras model scanning
  - Change "freeze" option to "freeze-weights"
2021-03-12 09:48:00 +00:00
torzdf
52c10dcc35 scripts.train - Add freeze weights option
lib.config:
  - Better formatting for .ini files
  - Support multi-select options
gui - Add support for multi-select config items
2021-03-11 16:42:36 +00:00
torzdf
1d07dbaa5d train - Add option to output model summary and exit 2021-03-11 01:35:00 +00:00
torzdf
ea1f997850 Translations - Create .pot files for GUI Tooltips and tools 2021-03-10 17:04:58 +00:00
torzdf
6f4e8865c7 Bugfix - GUI Don't use group as widget name due to translation issues with TCL 2021-03-10 14:55:26 +00:00
torzdf
daac5dff31 Bugfix - lib.logger - Force file writing to urf-8 2021-03-10 14:36:49 +00:00
torzdf
06ecccf1b8 lib.gui.stats - Fix graphing for combined decoders 2021-03-08 13:54:38 +00:00
torzdf
e111355183 trainer - Add RGB model support 2021-03-04 17:44:22 +00:00
torzdf
8f499a44dd Fixups:
- lib.gui.display - Catch error when trying to delete non-existant notebook tabs
  - lib.model.nn_blocks.ResidualBlock: Remove first LeakyReLU (explicit > implicit)
  - lib.model.nn_blocks._get_default_initializer - Always use ConvAware if selected
  - plugins.model.model - Add explicit leakyReLUs for ResBlocks
2021-03-03 14:32:03 +00:00
torzdf
9d75564d3f typofix: lib.model.layers - remove indent 2021-03-01 18:02:23 +00:00
torzdf
3c9a0f9e53 lib.model.layers.KResizeImages - Add arbritary resize (tf) 2021-03-01 17:00:22 +00:00
torzdf
514f3d60a7 lib.gui - Restore settings window on click when hidden 2021-03-01 12:30:15 +00:00
torzdf
1d01af75a2 Bugfixes:
- plugins.train.trainer._base - Don't output error message for sides which have valid masks
  - lib.gui.menu - Fix project file saving extension on Linux
2021-02-28 12:32:55 +00:00
torzdf
790a094d34 Code updates:
- lib.image.update_existing_meta: optimize
  - plugins.tran.model._base - Capture corrupt model errors
2021-02-26 10:29:11 +00:00
torzdf
a2a53c553b bugfix - lib.align - Fix edge case aligned face sub crop 2021-02-24 23:55:32 +00:00
torzdf
2a4cfa0262 bugfix - lib.image.update_existing_metadata
- Correctly close png file
2021-02-24 10:50:28 +00:00
torzdf
0401dd15a5 tools.alignments - Update png header when removing faces 2021-02-23 19:23:11 +00:00
torzdf
4fe9974da4 bugfix: lib.gui.utils - Catch permission error on preview image load 2021-02-22 13:55:29 +00:00
torzdf
7c746fa18e lib.align.aligned_face.pose - Add pitch and yaw attributes 2021-02-22 12:27:07 +00:00
torzdf
78039d43ba Bugfix - lib.align.detected_face.Mask - Fix broadcast error when sub-cropping 2021-02-21 11:42:15 +00:00
torzdf
6ce09dbac6 Help text - Add "predicted" help tesk to convert mask option 2021-02-20 02:14:00 +00:00
torzdf
1f3e1b0656 Add Locale support for cli arguments 2021-02-18 23:53:01 +00:00
torzdf
a5e666fb79 Bugfix - Remove ability to execute arbritary code from png header data 2021-02-18 11:18:11 +00:00
torzdf
48ca4d1b0e bugfix - FIx rare bug that fails to load configuration files on some windows installs 2021-02-17 18:36:30 +00:00
torzdf
69813de15a Unit tests - lib.model.normalization
- __init__.py - Explicit imports (to fix pytests)
  - Add tests for all existing normalization layers
  - fix GroupNormalization for tensorflow backend
2021-02-17 12:19:11 +00:00
torzdf
7e563b275e typofix 2021-02-17 00:24:51 +00:00
torzdf
02336977dc lib.model.normalization:
- refactor
  - add LayerNorm
  - add RMSNorm
2021-02-17 00:21:18 +00:00
torzdf
b20ad26b8b lib.image - png header, handle pre-existing iTXt entries on load 2021-02-15 16:46:17 +00:00
torzdf
02b2ec25c0 minor fix 2021-02-15 12:47:24 +00:00
torzdf
14564bbc85 typofix 2021-02-15 12:46:42 +00:00
torzdf
407b71377f Bugfix: lib.image.read_image_meta - Read file for dimensions if not a png 2021-02-15 12:27:00 +00:00
torzdf
fcf6d8238c Bugfixes:
- lib.image Don't raise error if legacy non-png is found when reading header data
  - plugins.train.trainer._base - Correctly pass legacy alignments through to DetectedFace
2021-02-15 00:24:59 +00:00
torzdf
b1cfbe458c
Update extracted faces to use PNG EXIF data (#1123)
Documentation
  - Update Usage.md, align.rst and image.rst
lib.image.py
  - read_image - Remove hash return, add metadata return
  - Remove read_image_hash functions
  - Add read_image_meta functios
  - Replace encode_image_with_hash with encode_image (to store metadata)
  - Add png meta reading and writing functions
  - Update Image Loaders/Savers to handle metadata rather than hashes
lib.training_data
  - Naming updates to remove references to hashes
lib.align.Alignments
  - Add versioning notes
  - Increment alignments version to 2.1
  - Deprecate hashing lookup functions
  - Replace filter_hashes with filter_faces
lib.align.detected_face
  - DetectedFace
    - Remove hash property
    - Add png header data serializing/deserializing functions
  - Mask
    - Add png header data serializing/deserializing functions
  - add update_legacy_png_header function to update png meta data
lib.cli.args - Deprecate alignments files for training
- plugins.train.trainer
  - Update alignments/mask code to read png header data
- scripts.convert
  - Aligned images folder - read data from png headers
- scripts.extract
  - Write png header information and no longer store hash of face
- tools.alignments
  - remove leftover-faces, merge and update-hashes jobs
  - Update jobs to use png meta data rather than hashes
- tools.manual
  - Update extract code to output png meta data and don't store hashes
  - Perform check on launch that tool is not pointing at a faces folder
tools.mask
  - Update to use png meta data
tools.sort
  - Update to use png meta data
2021-02-14 16:49:55 +00:00
torzdf
a84462f4fa Training - Move disable warp option out of config 2021-02-11 10:24:03 +00:00
torzdf
ec3fb8b443 gui - bugfix: Clear recent files on data corruption 2021-02-10 13:51:30 +00:00
torzdf
d5ae59c6bf GUI - Add correctly pad status bar 2021-02-07 02:17:06 +00:00
torzdf
f32d714ab0 lib.model.nn_blocks - Maintenance
- Add additional activation functions
  - Add custom upscale block
2021-02-04 13:35:30 +00:00
torzdf
a62fddf786 lib.model - Maintenance
- Add Depthwise option to Conv Block
  - Add Swish Activation function
  - remove res_block_follows and add_instance_norm_args
  - Add explicit normalization and activation args
  - Add K.resize_images layer
plugins.train.model - Inference creation bugfix
2021-01-29 11:47:07 +00:00
torzdf
2208eb308b Bugfix: Edge case extracted face sub-cropping error 2021-01-23 15:55:52 +00:00
torzdf
163b8fe374 sysinfo/setup - Standardize cuda/cudnn checks 2021-01-08 23:43:22 +00:00
torzdf
3438198ac2 Merge branch 'master' into dev-tf2.4 2021-01-04 15:13:33 +00:00
torzdf
5a79a6f5e9 Bugfix - Warp to landmarks 2020-12-21 18:39:50 +00:00
torzdf
fa616ffea2 GUI: Display paths in tooltips 2020-12-20 14:11:55 +00:00
torzdf
9182c56921 Re-instate tf2.2 minimum version (2.3 not on Conda for Linux) 2020-12-20 13:37:59 +00:00
torzdf
7c296e6f7a training - bugfixes
- Correctly subcrop training images
  - type fix zoom_amount in transformations
2020-12-20 01:33:54 +00:00
torzdf
3b7535c732
Update to TF2.3 (#1100)
* Minimum requirements to tf2.3.
  - Handle upgrades for Windows users with tf2.2 installed by Pip
  - Handle windows upgrade from pip tf2.2
  - Explicitly install Cuda for Conda installs

* Update tensorflow errors api reference
* Suppress AutoGraph warning messages
* Update GUI Stats to work with tf2.3
* Fix live graph for tf2.3
* DSSIMObjective - autoGraph bugfix
* Update Travis test
2020-12-18 19:58:30 +00:00
torzdf
d392dfbdf7 Bugfixes
- Manual Tool:
    - Hide annotations for faces not meeting criteria
    - Update landmarks on face add/del
    - Clearer landmark annotations
    - Handle non-numerics in frame number box
  - Training
    - Fix mis-aligned preview images
    - Allows mixing legacy + new alignments for A and B
    - Catch non-training images in training folder
    - Catch inconsistently sized training images
    - Standardize coverage ratio calculation
    - lib.image - Add option to get image shape along with hash
Dfaker model:
  - Add 256px mode
2020-12-15 12:11:26 +00:00
Dominik Miszkiewicz
6279f85787
Update tensorflow to 2.4.0rc4 (#1086)
* Update tensorflow to 2.4.0rc1

* Update requirements_nvidia.txt

* Update requirements_nvidia.txt
2020-12-08 12:49:49 +00:00
torzdf
05018f6119
Extract - Increase area and move centering (#1095)
* Extract
  - Implement aligner re-feeding
  - Add extract type to pipeline.ExtractMedia
  - Add pose annotation to debug
* Convert
  - implement centering
  - remove usage of feed and reference face properties
  - Remove distributed option from convert
  - Force update of alignments file on legacy receive
* Train
  - Resize preview image to model output size
  - Force legacy centering if centering does not exist in model's state file
  - Enable training on legacy face sets

* Alignments Tool
  - Update draw to include head/pose
  - Remove DFL drop + linting
  - Remove remove-frames job
  - remove align-eyes option
  - Update legacy masks to new extract type
  - Exit if attempting to merge version 1.0 alignments files with version 2.0 alignments files
  - Re-generate thumbnails on legacy upgrade
* Mask Tool
  - Update for new extract + bugfix full frame
* Manual Tool
  - Update to new extraction method
   - Disable legacy alignments,
   - extract box bugfix
   - extract faces - size to 512 and center on head
* Preview Tool
  - Display based on model centering
* Sort Tool
  - Use alignments for sort by face

* lib.aligner
  - Add Pose Class
  - Add AlignedFace Class
  - center _MEAN_FACE on x
  - Add meta information with versioning to alignments file
  - lib.aligner.get_align_matrix to use landmarks not face
  - Refactor aligned faces in lib.faces_detect
* lib.logger
  - larger file log padding
* lib.config
  - Fix global changeable_items
* lib.face_filter
  - Use new extracted face images
* lib.image
  - bump thumbnail default size to 96px
2020-12-08 01:31:56 +00:00
torzdf
c24bf2b480 GUI - Revert Conda default font fix 2020-11-01 00:44:12 +00:00
torzdf
42d10bc991 Typo Fix 2020-10-24 00:31:57 +01:00
torzdf
b7ecad058d GUI: Consolidate settings to single menu 2020-10-24 00:06:52 +01:00
torzdf
3dbbac5a98 Convert - Move scaling option exclusively to config 2020-10-20 14:36:43 +01:00
torzdf
75db1bd41f GUI - Allow uppercase file extensions in Linux 2020-10-19 22:51:51 +00:00
torzdf
0532c22dbf Bugfix: Extract - Fix Skip Saving Faces 2020-10-19 18:30:56 +01:00
torzdf
b46c02d104 extract: S3FD - Convert to re-enable CPU 2020-10-18 23:35:50 +01:00
torzdf
edc3b96bba GUI Bugfix - Convert preview 2020-10-15 14:31:29 +01:00
torzdf
cbc55814c6 lib.model.nn_blocks fix 2020-10-14 16:51:01 +01:00
torzdf
8a4199e1b0 lib.model.normalization - Add ADAIN and Group Norm 2020-10-14 12:06:30 +01:00
torzdf
a655fbe343 Revert convert to BORDER_TRANSPARENT 2020-10-10 01:29:50 +01:00
torzdf
dee13ab43f bugfix: Correctly crop input image when disabling warp 2020-09-24 23:50:43 +01:00
torzdf
d3f30384f4 convert - Don't use buggy cv2.BODER_TRANSPARENT 2020-09-24 18:57:39 +01:00
torzdf
42495e71bb Hold error messages open when launching GUI in Windows 2020-09-24 12:43:03 +01:00
torzdf
961f8ff283 - Bugfix: Training - Disable loss multipliers if penalized loss not selected
- Training: Half mouth/eye multiplier defaults
- GUI: Remove analysis callback from convert tab
2020-09-24 11:31:54 +01:00
torzdf
f3227b7b62 Bugfix: GUI fullscreen support for macOS 2020-09-24 10:32:50 +01:00
torzdf
1daa7dc6f6
GUI - Stats optimization (#1067)
* Faster stat loading + caching

* Compress data in cache

* Optimize some calculations

* Vectorize smoothing

* stats.Calculations optimized

* Load latest training data from live iterator

* Add options to training graph
2020-09-24 01:23:25 +01:00
torzdf
49f86e13de training - Add config item to disable warp 2020-09-07 00:03:00 +01:00
torzdf
cd3fc8179a Training - Cache eye and mouth masks during first epoch rather than at startup 2020-09-06 15:31:21 +01:00
torzdf
29d2508099 GUI: Redirect read training images progress to stdout 2020-09-02 22:51:00 +01:00
torzdf
e6d62b8315 Bugfixes:
- dfl_h128 Legacy Weights update
  - lib.faces_detect - Logging fix
2020-08-30 23:43:08 +01:00
torzdf
3433928133
Add Mouth and Eye Priority to Loss options (#1054)
* Priority Training for Mouth and Eyes - Tensorflow

* Use chosen loss function for area multipliers

* loss multipliers for AMD

* Fix mask multipliers for plaid and roll PenalizedMaskLoss into LossWrapper

* losses_tf: roll PenalizedMaskLoss into LossWrapper
2020-08-27 16:49:57 +01:00
torzdf
1363fa85eb lib.image - More information on image read errors 2020-08-25 10:25:12 +01:00
torzdf
bab12efb7f Remove averaging from loss 2020-08-25 00:51:46 +01:00
torzdf
0e31b98d36 Training - Add L2 Regularization to Structural Losses 2020-08-23 23:08:19 +01:00
torzdf
8c8e1b2c14 Training Config - Split Loss to it's own section 2020-08-23 00:33:25 +01:00
torzdf
cbcd301150 GUI - Fonts
- Config - more sensible font selection list
  - Linux - Attempt to be more consistent on default font
2020-08-22 11:02:15 +00:00
torzdf
877b90b60a bugfix - losses - DSSIM - Don't reduce mean on output 2020-08-21 15:29:27 +01:00
torzdf
ebf84c59e9 GUI - Configs - Handle "None" options correctly 2020-08-20 12:17:03 +01:00
torzdf
d27b0798d3 Training - Catch AMD OOM Errors 2020-08-18 15:44:15 +01:00
torzdf
725d864975 Training - Move Mixed Precision to model config 2020-08-17 09:24:37 +01:00
torzdf
6b2aac65b1 Enable MTCNN for CPU extraction 2020-08-12 11:19:03 +01:00
torzdf
d8557c1970
Faceswap 2.0 (#1045)
* Core Updates
    - Remove lib.utils.keras_backend_quiet and replace with get_backend() where relevant
    - Document lib.gpu_stats and lib.sys_info
    - Remove call to GPUStats.is_plaidml from convert and replace with get_backend()
    - lib.gui.menu - typofix

* Update Dependencies
Bump Tensorflow Version Check

* Port extraction to tf2

* Add custom import finder for loading Keras or tf.keras depending on backend

* Add `tensorflow` to KerasFinder search path

* Basic TF2 training running

* model.initializers - docstring fix

* Fix and pass tests for tf2

* Replace Keras backend tests with faceswap backend tests

* Initial optimizers update

* Monkey patch tf.keras optimizer

* Remove custom Adam Optimizers and Memory Saving Gradients

* Remove multi-gpu option. Add Distribution to cli

* plugins.train.model._base: Add Mirror, Central and Default distribution strategies

* Update tensorboard kwargs for tf2

* Penalized Loss - Fix for TF2 and AMD

* Fix syntax for tf2.1

* requirements typo fix

* Explicit None for clipnorm if using a distribution strategy

* Fix penalized loss for distribution strategies

* Update Dlight

* typo fix

* Pin to TF2.2

* setup.py - Install tensorflow from pip if not available in Conda

* Add reduction options and set default for mirrored distribution strategy

* Explicitly use default strategy rather than nullcontext

* lib.model.backup_restore documentation

* Remove mirrored strategy reduction method and default based on OS

* Initial restructure - training

* Remove PingPong
Start model.base refactor

* Model saving and resuming enabled

* More tidying up of model.base

* Enable backup and snapshotting

* Re-enable state file
Remove loss names from state file
Fix print loss function
Set snapshot iterations correctly

* Revert original model to Keras Model structure rather than custom layer
Output full model and sub model summary
Change NNBlocks to callables rather than custom keras layers

* Apply custom Conv2D layer

* Finalize NNBlock restructure
Update Dfaker blocks

* Fix reloading model under a different distribution strategy

* Pass command line arguments through to trainer

* Remove training_opts from model and reference params directly

* Tidy up model __init__

* Re-enable tensorboard logging
Suppress "Model Not Compiled" warning

* Fix timelapse

* lib.model.nnblocks - Bugfix residual block
Port dfaker
bugfix original

* dfl-h128 ported

* DFL SAE ported

* IAE Ported

* dlight ported

* port lightweight

* realface ported

* unbalanced ported

* villain ported

* lib.cli.args - Update Batchsize + move allow_growth to config

* Remove output shape definition
Get image sizes per side rather than globally

* Strip mask input from encoder

* Fix learn mask and output learned mask to preview

* Trigger Allow Growth prior to setting strategy

* Fix GUI Graphing

* GUI - Display batchsize correctly + fix training graphs

* Fix penalized loss

* Enable mixed precision training

* Update analysis displayed batch to match input

* Penalized Loss - Multi-GPU Fix

* Fix all losses for TF2

* Fix Reflect Padding

* Allow different input size for each side of the model

* Fix conv-aware initialization on reload

* Switch allow_growth order

* Move mixed_precision to cli

* Remove distrubution strategies

* Compile penalized loss sub-function into LossContainer

* Bump default save interval to 250
Generate preview on first iteration but don't save
Fix iterations to start at 1 instead of 0
Remove training deprecation warnings
Bump some scripts.train loglevels

* Add ability to refresh preview on demand on pop-up window

* Enable refresh of training preview from GUI

* Fix Convert
Debug logging in Initializers

* Fix Preview Tool

* Update Legacy TF1 weights to TF2
Catch stats error on loading stats with missing logs

* lib.gui.popup_configure - Make more responsive + document

* Multiple Outputs supported in trainer
Original Model - Mask output bugfix

* Make universal inference model for convert
Remove scaling from penalized mask loss (now handled at input to y_true)

* Fix inference model to work properly with all models

* Fix multi-scale output for convert

* Fix clipnorm issue with distribution strategies
Edit error message on OOM

* Update plaidml losses

* Add missing file

* Disable gmsd loss for plaidnl

* PlaidML - Basic training working

* clipnorm rewriting for mixed-precision

* Inference model creation bugfixes

* Remove debug code

* Bugfix: Default clipnorm to 1.0

* Remove all mask inputs from training code

* Remove mask inputs from convert

* GUI - Analysis Tab - Docstrings

* Fix rate in totals row

* lib.gui - Only update display pages if they have focus

* Save the model on first iteration

* plaidml - Fix SSIM loss with penalized loss

* tools.alignments - Remove manual and fix jobs

* GUI - Remove case formatting on help text

* gui MultiSelect custom widget - Set default values on init

* vgg_face2 - Move to plugins.extract.recognition and use plugins._base base class
cli - Add global GPU Exclude Option
tools.sort - Use global GPU Exlude option for backend
lib.model.session - Exclude all GPUs when running in CPU mode
lib.cli.launcher - Set backend to CPU mode when all GPUs excluded

* Cascade excluded devices to GPU Stats

* Explicit GPU selection for Train and Convert

* Reduce Tensorflow Min GPU Multiprocessor Count to 4

* remove compat.v1 code from extract

* Force TF to skip mixed precision compatibility check if GPUs have been filtered

* Add notes to config for non-working AMD losses

* Rasie error if forcing extract to CPU mode

* Fix loading of legace dfl-sae weights + dfl-sae typo fix

* Remove unused requirements
Update sphinx requirements
Fix broken rst file locations

* docs: lib.gui.display

* clipnorm amd condition check

* documentation - gui.display_analysis

* Documentation - gui.popup_configure

* Documentation - lib.logger

* Documentation - lib.model.initializers

* Documentation - lib.model.layers

* Documentation - lib.model.losses

* Documentation - lib.model.nn_blocks

* Documetation - lib.model.normalization

* Documentation - lib.model.session

* Documentation - lib.plaidml_stats

* Documentation: lib.training_data

* Documentation: lib.utils

* Documentation: plugins.train.model._base

* GUI Stats: prevent stats from using GPU

* Documentation - Original Model

* Documentation: plugins.model.trainer._base

* linting

* unit tests: initializers + losses

* unit tests: nn_blocks

* bugfix - Exclude gpu devices in train, not include

* Enable Exclude-Gpus in Extract

* Enable exclude gpus in tools

* Disallow multiple plugin types in a single model folder

* Automatically add exclude_gpus argument in for cpu backends

* Cpu backend fixes

* Relax optimizer test threshold

* Default Train settings - Set mask to Extended

* Update Extractor cli help text
Update to Python 3.8

* Fix FAN to run on CPU

* lib.plaidml_tools - typofix

* Linux installer - check for curl

* linux installer - typo fix
2020-08-12 10:36:41 +01:00
torzdf
0e63c2967b documentation update 2020-07-25 09:09:38 +01:00
torzdf
339facf997 Remove debug code 2020-07-23 19:12:52 +01:00
torzdf
8a19d21ace setup.py - Fix conda-forge imports
Remove unused icons
2020-07-11 17:54:48 +01:00
torzdf
03d2d179a9 scripts.extract - Save jpg thumbnails to alignments file 2020-07-09 11:41:03 +00:00
torzdf
5f9d8fa0f8 lib.gui.custom_widgets - Force popup progress bar to top 2020-07-06 16:01:59 +00:00
torzdf
f634f52a1e lib.gui.utils - Spelling fixes
lib.gui.custom_widgets - popup progressbar
2020-07-06 11:00:17 +00:00
torzdf
59ade741a6 lib.alignments - Pad pts timestamps when video does not start on a keyframe 2020-07-04 17:11:15 +00:00
torzdf
30acca8541 Sort by face - Inherit allow_growth option from extract.ini 2020-07-04 10:38:46 +01:00
torzdf
6595cdf062 Add icons 2020-07-03 14:42:33 +00:00
torzdf
93aa2801a0 Minor core updates 2020-06-30 11:20:54 +00:00
torzdf
f19a04505c Core updates 2020-06-27 18:48:50 +00:00
torzdf
4a68b3f023 Move custom dlight blocks to nn_blocks 2020-06-07 17:06:00 +00:00
torzdf
ac40b0f52f
Remove subpixel upscaling option (#1024) 2020-05-13 13:50:48 +01:00
bryanlyon
92bc9af957
Extraction: Added an option to skip outputting face images (#1021) 2020-05-13 11:28:30 +00:00
torzdf
815c843f63
Simple backend unit tests (#1020)
* Add simple backend tests for lib.model
* Document lib.model
* Fix GMSD Loss for AMD
* Remove obsolete code from lib.model
2020-05-12 23:46:04 +01:00
torzdf
88f9092a10 AMD: Fix ICNR Initialization for PlaidML backend 2020-05-06 15:28:56 +00:00
torzdf
d5f42b63c8 Bugfix: lib.gui.project - Reset invalid choices to default if an invalid choice is discovered when loading a .fsw file 2020-04-26 14:40:35 +01:00