1
0
Fork 0
mirror of https://github.com/deepfakes/faceswap synced 2025-06-07 10:43:27 -04:00
Commit graph

58 commits

Author SHA1 Message Date
torzdf
ea63f1e64a Mask tool. Add ability to output custom imported masks 2024-06-28 13:50:14 +01:00
torzdf
2bad105dc8 bugfix: Alignment tool, auto-detect alignments
- Random linting and typing
2024-04-19 11:33:52 +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
4502824481 Add mask dilation/erosion option for training 2024-03-26 18:06:48 +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
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
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
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
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
andentze
e8a3016882
create even more RU translations (#1322)
* create translations for GUI menus

* locale: Add RU translations to extract global config

* locales: general refactor + extract, train and general config translations

* add more translations
2023-06-17 12:09:59 +01:00
torzdf
02239d4183 locales: Train settings 2023-06-11 23:30:05 +01:00
torzdf
a66214c58e locales: Add global extract settings 2023-06-08 16:45:18 +01:00
torzdf
50a5113690 locales: Add GUI menu translations 2023-06-07 14:16:27 +01:00
andentze
e2ad3e271b
add ru locale (#1311) 2023-04-27 15:38:09 +01:00
torzdf
ec95c19534 alignments tool - Add batch mode 2023-02-24 00:38:28 +00:00
torzdf
d0a8d59812 mask tool: Add batch-mode 2023-02-20 23:51:20 +00:00
torzdf
cd94b7e046 Mask tool update:
- Allow creation of masks on face sets without an alignments file
  - Auto-detect alignments file location when not provided
2023-02-20 15:05:23 +00:00
DonOhhhh
eaa33ae28e
Korean translations added (#1287) 2023-01-18 22:12:29 +00:00
torzdf
34b558426e bugfix:
- preview tool - Prevent tkinter variables from exiting main thread
refactor:
    - preview tool - Split module to smaller sub-modules + docs, locales
Typing:
    - tools.preview.cli
Unit test:
    - tools.preview.viewer
2023-01-17 15:03:29 +00:00
torzdf
80f63280ca Bugfixes
- plugin.train.unbalanced - decoder b
  - gui.stats - crash when log folder deleted
  - setup.py - install gcc=12.1.0 on linux (scipy dep)
  - setup.py - don't test ROCm unless valid
  - typofix - cli_args extract singleprocess help
typing
  - lib.gui.analysis.event_reader
  - lib.gpu_stats.directml - make platform specific
unit tests
  - lib.gui.analysis.event_reader
2023-01-13 23:29:51 +00:00
torzdf
9e2026f6fe Extract: Implement re-align/2nd pass
- implement configurable re-align function in extract
  - update locales + documentation
  - re-factor align._base and split to separate modules
  - move normalization method to plugin parent
  - bugfix: FAN use zeros for pre-processing crop
  - lint AlignedFilter
2022-11-22 00:37:29 +00:00
torzdf
0f5d2e887c Face-filter updates:
- Allow selecting folder as well as multiple images
  - Lower default threshold and update helptext
  - bugfix: detector error when using all aligned faces
  - Standardize output folder name
2022-11-04 18:43:55 +00:00
torzdf
1d1face00d Update Face Filter
- Remove old face filter
  - plugins.extract.pipeline: Expose plugins directly
  - Change `is_aligned` from plugin level to ExtractMedia level
  - Allow extract pipeline to take faceswap aligned images
  - Add ability for recognition plugins to accept aligned faces as input
  - Add face filter to recognition plugin
  - Move extractor pipeline IO ops to own class
2022-10-31 18:25:32 +00:00
torzdf
f1e3339fbe Add vggface2 to extraction pipeline 2022-10-10 13:09:02 +01:00
torzdf
a7d0898f64 sort tool: Add sort by roll 2022-09-23 14:18:48 +01:00
torzdf
50d23792ca Aligner filter - set sensible defaults 2022-09-21 01:04:33 +01:00
torzdf
2d312a9db2 Minor updates and fixups
- Mask Tool - Typing + BiSeNet mask update fix
  - Alignments Tool - Auto search for alignments file
2022-09-14 19:14:03 +01:00
torzdf
98d01760e4 Overhaul sort:
- Standardize image data reading and writing
  - Optimize loading (just one pass required)
  - Make all sort groups binnable (to greater or lesser results)
  - Add sort by pitch
  - Deprecate multiple options
  - linting, docs + locales
2022-09-13 13:08:59 +01:00
torzdf
89d124c311 Sort - Add Batch Mode. Speed up yaw sort 2022-09-07 12:40:19 +01:00
torzdf
13cfb3f39e extract: Add batch processing mode 2022-08-31 19:48:47 +01:00
torzdf
629c02a61e Add "custom" mask 2022-08-05 14:09:05 +01:00
torzdf
7b9fc0454d Live Preview - Replace cv2 with matplotlib viewer 2022-07-01 13:07:01 +01:00
torzdf
eb3c612f29 Replace restore tool with model tool 2022-06-28 14:27:23 +01:00
torzdf
6437cd7ab0 alignments tool - Add from-faces job
- Allows user to regenerate alignments file(s) from a folder of extracted faces
2022-05-24 12:42:52 +01:00
torzdf
a9908b46f7 Alignments tool - Replace 'extract-large' with 'min-size' 2022-05-21 17:06:12 +01:00
torzdf
23d92c1f0d Bugfixes
- Sort - Fix rare help-text parsing bug
  - Manual - Fix issue where frame count is incorrect when een > 1 used on extract
2022-03-30 02:54:29 +01:00
torzdf
ee92cff6fc tools.sort - Linting and languages 2021-08-07 12:39:09 +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
6c439944cd Masks updates
- Add head centering support to training
  - Update helptext/tooltips
2021-05-17 18:20:08 +01:00
torzdf
eb0cc9c271 alignments tool - Update alignments file tooltip 2021-05-08 11:39:39 +01:00
torzdf
2bcb7d572a tools.sort
- Add sort by size
  - Centralize some of the image loading routines
2021-03-23 16:50:37 +00:00
torzdf
5f598ca825 Locales Update 2021-03-22 18:41:55 +00:00
Claudio Sánchez
79b89610b1
Spanish translations for GUI tooltips. (#1134)
* Spanish translations for GUI tooltips.
* Added/updated spanish translations for preview and manual tooltips
2021-03-22 18:26:39 +00:00
torzdf
51376bee6e Update translations 2021-03-20 14:18:08 +00:00
torzdf
784155fe27 locales - Add in missing manual tool source translations 2021-03-20 13:47:29 +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
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