33 Commits
Author SHA1 Message Date
torzdf c698f45a35 Aligner - Add feature position filter 2022-11-08 17:09:43 +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 765e385177 Extract: Typing and standardization 2022-09-30 18:36:35 +01:00
torzdf c79175cbde Alignments Tool updates
- Copy info back to alignments file from faces
2022-09-26 19:32:09 +01:00
torzdf e5356a417e Alignments update:
- Store face embeddings in PNG header when sorting
  - typing + refactor
  - Update alignments keys for 'identity' and 'video_meta' + bump to v2.3
  - General typing fixes
2022-09-25 18:22:48 +01:00
torzdf a7d0898f64 sort tool: Add sort by roll 2022-09-23 14:18:48 +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 2a7c18ac1d bugfixes:
- lib.training: Correct  input + output size for pre-existing models
  - lib.align.detected_faces - fix trace logging
  - lib.util.debug_times
2022-08-28 12:25:30 +01:00
torzdf 9e503bdaa2 bugfix: debug landmarks 2022-08-23 19:19:16 +01:00
torzdf 66845ea5f0 bugfix: Alignments - Thumbnail generation check 2022-08-22 10:41:33 +01:00
torzdf 2beceffad9 Data Augmentation update (#1263)
- lib.detected_face
    - Subclass Masks for Landmark based masks
    - Add training mask propery + methods to DetectedFace
  - lib.training_training
    - subclass TrainingDataGenerator for training and preview data
    - Split cache into own module
    - Reduce thread count to 1 to prevent image corruption + data re-use
    - Process on largest model input/output size rather than stored image size
    - Size and crop masks during caching stage
    - Implement ring buffer for data flow
    - Fix preview reload bug
  - augmentation
    - typing
    - switch color aug order
    - better initialization
    - Fix warp + landmark warp to correctly apply at different image scales
    - Slightly improved warp caching
    - Don't store whether image is_preview. Handle all data as training images implicitly
  - plugins.trainer: Typing and fixes to work with trainingdata refactor
2022-08-21 18:59:45 +01:00
torzdf 5e73437be4 lib.align updates:
- alignments.py
    - Add typed dicts for imported alignments
    - Explicitly check for presence of thumb value in alignments dict
    - linting
  - detected_face.py
    - Typing
    - Linting
    - Legacy support for pre-aligned face
    - Update dependencies to new property names
2022-08-19 12:36:08 +01:00
torzdf a2de4a9798 lib.align.aligned_face updates
- Typing
  - Legacy support for pre-aligned faces
  - Coverage support for pre-aligned faces
  - Standardized retrieval of sub-crops
2022-08-19 11:53:46 +01:00
torzdf 3295089737 lib.detected_face.Mask
- Add source + target offset and coverage to set_sub_crop method
2022-08-19 10:57:40 +01:00
torzdf c2595c46d4 bugfix - add missing mask key to alignments on legacy update 2022-05-20 17:06:25 +00: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 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 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 51b316ee6c lib.training.generator - Catch mismatched image sizes in training folder 2021-04-03 11:31:58 +01:00
torzdf a2a53c553b bugfix - lib.align - Fix edge case aligned face sub crop 2021-02-24 23:55:32 +00:00
torzdf 0401dd15a5 tools.alignments - Update png header when removing faces 2021-02-23 19:23:11 +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 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 2208eb308b Bugfix: Edge case extracted face sub-cropping error 2021-01-23 15:55:52 +00:00
torzdf 5a79a6f5e9 Bugfix - Warp to landmarks 2020-12-21 18:39:50 +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 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