Commit Graph

810 Commits

Author SHA1 Message Date
torzdf
b16b755d55 lr-finder: Log error on NaN 2025-10-23 18:18:39 +01:00
torzdf
3f53ee9cec Bugfix: Convert - Correctly error if a valid mask has not been selected 2024-08-02 18:35:34 +01:00
torzdf
b6ac7b8039 bugfix: Manual tool. Allow working with image folders at EEN values > 1 2024-07-05 18:46:10 +01:00
torzdf
1f4fcff5dd bugfix: Alignments, prevent duplicate backup alignment file names 2024-05-19 11:04:48 +01:00
torzdf
13dd5b3a90 bugfix: Alignments - correctly update keys for multiple underscores in the filename 2024-04-26 17:39:46 +01:00
torzdf
0f947791f5 bugfix: Alignments remove version check for video file extension update
- Typofixes
2024-04-21 20:03:42 +01:00
torzdf
be42b04064 Bugfix: Alignment file video key lookup for very old alignment files 2024-04-21 19:55:45 +01:00
torzdf
696692dc08 Fixups
- Deprecations - display correct long argument
  - Minor spelling + linting
2024-04-21 16:22:42 +01:00
torzdf
dce7d98302 lib.align: Split lib.align.alignments to smaller modules:
- Move update objects to own module
  - Move Thumbnails to own module
  - docs update + linting/typing
2024-04-19 13:45:30 +01:00
torzdf
96528ee3e8 lib.align.detected_face: Split Mask objects to own aligned_mask module 2024-04-19 12:25:00 +01:00
torzdf
2bad105dc8 bugfix: Alignment tool, auto-detect alignments
- Random linting and typing
2024-04-19 11:33:52 +01:00
torzdf
957734dfc0 convert: Bugfix: Update legacy .png video alignments to include video file extension 2024-04-17 12:37:47 +01:00
torzdf
1c081aea7d
Add ability to export and import alignment data (#1383)
* tools.alignments - add export job

* plugins.extract: Update __repr__ for ExtractorBatch dataclass

* plugins.extract: Initial implementation of external import plugins

* plugins.extract: Disable lm masks on ROI alignment data import

* lib.align: Add `landmark_type` property to AlignedFace and return dummy data for ROI Landmarks pose estimate

* plugins.extract: Add centering config item for align import and fix filename mapping for images

* plugins.extract: Log warning on downstream plugins on limited alignment data

* tools: Fix plugins for 4 point ROI landmarks (alignments, sort, mask)

* tools.manual: Fix for 2D-4 ROI landmarks

* training: Fix for 4 point ROI landmarks

* lib.convert: Average color plugin. Avoid divide by zero errors

* extract - external:
  - Default detector to 'external' when importing alignments
  - Handle different frame origin co-ordinates

* alignments: Store video extension in alignments file

* plugins.extract.external: Handle video file keys

* plugins.extract.external: Output warning if missing data

* locales + docs

* plugins.extract.align.external: Roll the corner points to top-left for different origins

* Clean up

* linting fix
2024-04-15 12:19:15 +01:00
torzdf
95b4431c57 Deprecate multi-character cli switches 2024-04-05 13:51:57 +01:00
torzdf
70c064ca7d Minor fixups and linting 2024-04-03 15:14:32 +01:00
torzdf
983901466f linting: Reduce Class min-public-methods and fix spacing 2024-04-03 14:37:48 +01:00
torzdf
a9d87ae007 linting: Remove pylint hint for logger 2024-04-03 14:03:54 +01:00
torzdf
97a842112c lib.align.aligned_face - Add split_mask method 2024-04-03 13:57:19 +01:00
torzdf
4502824481 Add mask dilation/erosion option for training 2024-03-26 18:06:48 +00:00
torzdf
180fe97a52 lib.training - Outpu useful error message if non-faceswap training images used 2024-03-22 12:51:50 +00:00
torzdf
aaa63ff896 bugfix: logger, don't import numpy unless required 2024-03-21 11:56:01 +00:00
torzdf
9ddc838e68 Bugfix: Correct loss labels when graphing 2024-03-20 17:08:39 +00:00
torzdf
1009254c57 logging
- Add standardized class __init__ log function
  - Import logger from lib.__init__ to prevent custom log level errors when running non-fs scripts
2024-03-20 14:19:23 +00:00
torzdf
7a16f753cc
Add Mask importing to the mask tool (#1376)
* lib.align.alignments: expose count_faces_in_frame
* tools.mask: refactor and fix frame output to display all masks in a single frame
* tools.mask: add import mask process
* manual tool: Remove NN masks on landmark edit
2024-03-12 13:17:35 +00:00
torzdf
2a3845152b bugfix: Convert - patch writer. Fix TIFF metadata 2024-01-07 14:58:48 +00:00
torzdf
e80ae046d5
Convert - Patch writer (#1352)
* Add cli-args and config opts for patch writer
* Add supporting code to convert funcs
* writers
  - move frame count functions to _base
  - Add kwargs for pre_encode
* scripts/lib convert - add code for patch writer
* lib.image.encode_image - Add cv2.imencode args
* patch_defaults: Add face index location option
* Add patch writer with PNG support
* Send correct matrix to patch plugin
* Add canvas origin option
* Add Tiff format to Patch Writer
* Docs and locales
* Add ROI to output
* convert: choose warp border by face count
2023-09-28 11:55:38 +01:00
torzdf
a660eda8e1 Convert: Add face scale option 2023-09-09 18:40:36 +01:00
torzdf
48aca1462a bugfix: LR finder. Reset optimizer state 2023-09-08 09:48:09 +01:00
torzdf
8388241db9 bugfix: Always load images as 3 channel color 2023-09-01 22:36:31 +01:00
torzdf
4588adbd16 remove debug code 2023-09-01 19:44:57 +01:00
torzdf
460a229e79 bugfix: edge case NaN in pose estimation 2023-09-01 19:43:05 +01:00
torzdf
5d00025884 bugfix: error loading images with special chars 2023-08-27 02:15:55 +01:00
torzdf
cf0efff6ba
Learning Rate finder (#1341)
* Add LR Finder support structure

* Move trainer.Feeder to lib.training.generator

* Expose model.io

* Add lr_finder

* Update docs and locales

* Pre-PR fixups
  - Fix training graph not displaying
  - CI fixes
  - Switch lr finder progress to tqdm
  - Exit lr finder early on NaN
  - Display lr finder progress in GUI
2023-08-22 17:07:36 +01:00
torzdf
c34756c828 fixes
- Farl weight name fix
  - Embedding layers to fp32
  - nn_blocks - unique names for conv_output
  - Phaze-A - Add clipfaker presets
2023-07-11 23:11:47 +01:00
torzdf
c4204c7d8a Updates:
- Remove clipfaker
    - Add clip to Phaze-A
    - streamline clip to vision only
    - update lib.model.networks
    - Docs and tests update
    - Phaze-A - add option to flatten bottleneck
2023-07-08 17:20:39 +01:00
torzdf
6a3b4ed4b3 Training fixes:
- Fix mixed precision layer storing and switching
  - typofix in _requirements_base.txt
  - lib.model.layers - cleanup, docs and tests fixes
  - lib.model.nn_blocks - typing fixes
2023-07-08 16:47:25 +01:00
torzdf
93d5a1a031 bugfix: DirectML backend GPU stats 2023-07-06 11:34:03 +01:00
torzdf
1bcc151cc5 bugfix: lib.gui.wrapper - Allow errors in stdout 2023-07-01 10:45:38 +01:00
torzdf
f4c912e273 bugfix: GUI force stdout/stderr reading to utf-8 2023-06-30 11:52:58 +01:00
torzdf
4e7e5fe308 bugfix: graph pop-up - log/linear switching 2023-06-30 09:30:21 +01:00
torzdf
ce86d091db bugfix: git communication fixes 2023-06-30 02:45:19 +01:00
torzdf
efa4471243 typing:
- tools.manual.detected_faces
  - tools.manual.thumbnails
2023-06-28 18:30:17 +01:00
torzdf
6a3b674bef
Rebase code (#1326)
* Remove tensorflow_probability requirement

* setup.py - fix progress bars

* requirements.txt: Remove pre python 3.9 packages

* update apple requirements.txt

* update INSTALL.md

* Remove python<3.9 code

* setup.py - fix Windows Installer

* typing: python3.9 compliant

* Update pytest and readthedocs python versions

* typing fixes

* Python Version updates
  - Reduce max version to 3.10
  - Default to 3.10 in installers
  - Remove incompatible 3.11 tests

* Update dependencies

* Downgrade imageio dep for Windows

* typing: merge optional unions and fixes

* Updates
  - min python version 3.10
  - typing to python 3.10 spec
  - remove pre-tf2.10 code
  - Add conda tests

* train: re-enable optimizer saving

* Update dockerfiles

* Update setup.py
  - Apple Conda deps to setup.py
  - Better Cuda + dependency handling

* bugfix: Patch logging to prevent Autograph errors

* Update dockerfiles

* Setup.py - Setup.py - stdout to utf-8

* Add more OSes to github Actions

* suppress mac-os end to end test
2023-06-27 11:27:47 +01:00
torzdf
a903a55837 bugfix: Correctly read event data in GUI 2023-06-21 22:45:40 +01:00
torzdf
03f5c671bc
Remove plaidML support (#1325)
* Remove PlaidML reference from readme files

* Remove AMD option from installers

* remove amd requirements and update setup.py

* remove plaidml test from CI workflow

* gpustats: remove plaidml backend

* plaid removals:
  - faceswap.py - python version check
  - setup.cfg - plaidml typing ignore
  - lib.keras_utils - All plaid code
  - lib.launcher.py - All plaidml checks and configuration

* remove tf2.2 specific code from GUI event reader

* lib.model - remove all plaidml implementations

* plugins.extract - remove plaidml code

* plugins.train remove plaidml code

* lib.convert - remove plaidml code

* tools.model: remove plaidml code

* Remove plaidML tests from unit tests

* remove plaidml_utils and docsting cleanups

* Remove plaidML refs from configs

* fix keras imports
2023-06-21 12:57:33 +01:00
Ching-Yuan Huang
8f08832c0f
Fixed UnicodeDecodeError (#1316)
* Update image.py

use encoding="utf8", in line303, 413, 524, 803, 1459
fix UnicodeDecodeError: 'cp950' codec can't decode byte 0x83 in position 52: illegal multibyte sequence

* Update image.py

fix : ValueError: binary mode doesn't take an encoding argument

---------

Co-authored-by: Ching-Yuan Huang <47504492+che610369@users.noreply.github.com>
2023-06-16 15:30:05 +01:00
torzdf
e0eda1cf80 bugfix: Extract memory leak 2023-06-16 13:31:45 +01:00
torzdf
77723a6b66 bugfix: config encoding - force to utf-8 2023-06-12 17:29:47 +01:00
torzdf
02239d4183 locales: Train settings 2023-06-11 23:30:05 +01:00
torzdf
50a5113690 locales: Add GUI menu translations 2023-06-07 14:16:27 +01:00